views:

89

answers:

5

I am tasked to create a web site using Django. It will be a 'sister' site to an existing Plone site. The same Apache instance will be the front end to the sites which allows me to use the same domain name.

However, the owners want the users to be able to log into one and still be logged into the other one.

How can this be accomplished?

Thanks! :)

A: 

Gut reaction is to use OAuth - see http://stackoverflow.com/questions/1936186/how-to-build-a-secure-django-single-signon-between-different-sites

Alternatively, have you tried this single sign-on app - http://code.google.com/p/django-sso/ ?

stevejalim
Thanks for the suggestions. I will read through them. Thanks! :)
Eric
A: 

Also have a look on Django's documentation on how to implement your own authorization backend at http://docs.djangoproject.com/en/dev/topics/auth/#writing-an-authentication-backend

lazerscience
A: 

My gut reaction is to use LDAP. Plone's LDAP support is a little rough, but it works. Does Django have equivalent or better LDAP support? If so, then I think you are off and running…

aclark
Thanks Alex. I think this is now moot... as the requirements have changed yet again.
Eric
A: 

You can move authentication to SQLPASPlugin and use the same table for Django and Plone.

dukebody
A: 

There are two problems here, shared logins, and single sign on. LDAP or SQL based logins will give you the first, but you'll still have to enter your password in both sites. You need single sign on to remain logged in across bpth.

plone.session 3.0 (part of Plone 4, but compatible with Plone 3.3 if you also add hashlib to your buildout) is compatible with Apache mod_auth_tkt single sign on. It should be simple enough to configure Django to use Apache authentication, or if you're not running Apache, wrap plone.session's tktauth.py in a simple wsgi wrapper. Use the Plone site's require_login script as the TKTAuthLoginURL.

Laurence Rowe