setup instructions seem complex

Bug #999992 reported by Robert Collins
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
django-openid-auth
New
Undecided
Unassigned

Bug Description

we were discussing how to configure django-openid-auth for a new instance of a django app:

11:32 < hloeung> what I'd then like is to add these users to a new team and just give the whole team access to login to the django admin panel
11:33 < james_w> right
11:33 < james_w> INSTALLED_APS and AUTHENTICATION_BACKENDS as you have done
11:33 < james_w> plus: LOGIN_URL = /openid/login/
11:33 < james_w> and LOGIN_REDIRECT_URL = /admin/
11:33 < james_w> OPENID_SSO_SERVER_URL = https://login.ubuntu.com/
11:34 < james_w> OPENID_CREATE_USERS = True
11:34 < james_w> OPENID_UPDATE_DETAILS_FROM_SREG = True
11:34 < james_w> OPENID_SREG_EXTRA_FIELDS = ['language']
11:35 < james_w> OPENID_SREG_REQUIRED_FIELDS = ['email', 'nickname']
11:35 < james_w> OPENID_LAUNCHPAD_STAFF_TEAMS = ['canonical-losas', 'some-other-team-to-control-admin-access-here']
11:36 < james_w> OPENID_LAUNCHPAD_TEAMS_MAPPING = {'canonical-losas': 'admin', 'some-other-team-to-control-admin-access-here': 'admin'}
11:36 < james_w> all of that in settings.py
11:36 < hloeung> ack
11:36 < james_w> then at the top of urls.py
11:36 < james_w> import django_openid_auth.urls
11:37 < james_w> then in the urlpatterns in urls.py
11:37 < james_w> url(r'^openid/', include(django_openid_auth.urls)),
11:37 < james_w> create the team on LP and add the rpconfig, and we should be good to test
11:38 < james_w> unfortunately we'll need a code change for anyone to ever actually see a link to log in, but once we've tested I can do that
11:39 < hloeung> james_w: https://pastebin.canonical.com/66110/
11:39 < james_w> hloeung, oh, sorry, you'll have to stringify that
11:39 < james_w> LOGIN_URL = '/openid/login/'
11:39 < hloeung> gotcha
11:40 < james_w> same for LOGIN_REDIRECT_URL and OPENID_SSO_SERVER_URL
11:40 < hloeung> now I get https://pastebin.canonical.com/66111/
11:41 < james_w> hmm
11:42 < james_w> hloeung, oh, seems those instructions are out of date
11:42 < james_w> INSTALLED_APPS needs 'django_openid_auth'
11:42 < hloeung> great... how would I have figured that one out? lol
11:42 < james_w> and AUTHENTICATION_BACKENDS = ('django_openid_auth.auth.OpenIDBackend', 'django.contrib.auth.backends.ModelBackend',)

....
11:48 < lifeless> james_w: that seems horribly complex; https://login.ubuntu.com/ + OPENID_LAUNCHPAD_TEAMS_MAPPING seems sufficient for non-defaults
11:48 < lifeless> james_w: where would we file bugs to get that made simpler
11:49 < james_w> hloeung, and the AUTHENTICATION_BACKENDS needs a "django_" at the start of the last line I think
11:49 < james_w> lifeless, https://launchpad.net/django-openid-auth I think
11:49 < james_w> lifeless, I don't know what the defaults are for some of those things
11:49 < james_w> so it's lack of clarity as much as anything

It would be nice, when nothing unusual is being done, to just specify the SSO server to use and the teams to map.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.