On Tue, Jun 1, 2010 at 10:50 PM, Iain Duncan <iainduncanli...@gmail.com>wrote:

> I know this is not enough info for a real diagnosis, but thought maybe
> someone would be able to say where I might look for issues from a
> description.
> I wrote a bfg app using repoze.who, and it uses a custom authentication
> plugin. In the apps zcml I'm using
> <repozewho1authenticationpolicy/>
> <aclauthorizationpolicy/>
> My authentication plugin is working fine. I made a login view that checks
> for the authenticated user
> userid = authenticated_userid(request)
> log.info("login_view() userid: %s" % userid)
> log.info("login_view: environ['REMOTE_USER']: %s" %
> request.environ.get('REMOTE_USER') )
> and returns a status 403 to generate the form if the remote user isn't
> found. This is all working fine.
> Then... I took the code from this app and ported it over to another, that
> is packaged slightly differently. I'm pulling my hair out because as far as
> I can tell, functionally the auth and auth is handled the exact same, but on
> the new one, after authentication, the REMOTE_USER key doesn't stick around.
> My authentication plugin fires fine, and authenticates the user ( verified
> with good old pdb )
> but outside of that ( in in views ) there is no repoze.who.identity object
> in the environ or REMOTE_USER key.
> Does anyone have any idea where I might look for what has changed? or know
> what other info I could provide to help debug this. I did switch from a raw
> virtual env to a buildout environment, but everything else seems to be
> fine.

Well in case anyone ever sees this looking for something similar, it was a
dependency problem. My buildout needed to explicitly ask for
repoze.who.plugins.sa  I feel like I have landed planes with coconuts here (
cargo culting ) as I don't know when that got installed in the old
environment or why everything ran but didn't actually work in the new one,
but at least the planes are landing again.

comments from those who understand what happened would still be appreciated
though! =)
Repoze-dev mailing list

Reply via email to