need advice on remote authentication
i've got an app i'm trying to build for my division. i'd like to take advantage of zope's security model to control access to various parts of the site. seems straightforward, but for one wrinkle. i need to authenticate users via a remote authentication service run by the company's HR organization. my organization explicitly does not want to be maintaining our own users and passwords, so i'd like to automatically create users as needed, rather than manually via the zope management interface. i've built some test objects that do the authentication, but don't know, once i've figured out who someone is, how to fit this into zope's notion of users and roles. here's how the authentication works: assume the HR site is: foo.att.com/authenticate?return=mysite.att.com i redirect to that page, the user sees a login screen. he enters login/password, gets redirected back to mysite.att.com i use an FSSession to keep track of where to go next, and can find out who the user is via cookies set by the HR site. at this point, i assume that what i need is to somehow tell zope which user this is (creating one if needed), an that after that point everything works as if the normal mechanism had been used. can anyone give me some clue how to do this? also, if my general approach to this scheme is off base, i'd appreciate being told so. thanks -- Garry Hodgson Every night garry@sage.att.com a child is born Software Innovation Services is a Holy Night. AT&T Labs - Sophia Lyon Fahs
On Tue, 2 May 2000, Garry Hodgson wrote:
but for one wrinkle. i need to authenticate users via a remote authentication service run by the company's HR organization. my organization explicitly does not want to be maintaining our own users and passwords, so i'd like to automatically create users as needed, rather than manually via the zope management interface.
i've built some test objects that do the authentication, but don't know, once i've figured out who someone is, how to fit this into zope's notion of users and roles.
I think that both the GenericUserFolder and the LoginManager should be able to handle this. I think the LoginManager architecture would work better for what you are trying to do (but I don't know its current status). GUF would also be able to handle it - it will involve pulling out the username from your HR cookie in the docLogin hook (possibly transparently to the user with an automatic redirect), and having your userAuthenticate hook do the check if the cookie is valid. Let me know if you choose this method and get stuck. You could also subclass any of the existing UserFolders depending on how you plan to maintain the other information you need (list of valid usernames, role membership, valid logon domains). -- ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen
participants (2)
-
Garry Hodgson -
Stuart 'Zen' Bishop