Allow specifying authentication URLs from settings
To allow us to have authentication mechanisms that live out of tree as AUTHENTICATION_BACKENDS do we need to have a way to load the views that service those backends. Provide a means via settings that we can add new routes to the /auth urls. Closes-Bug: #1433358 Change-Id: I1ffc8a4e0bbfa58c7b50351432668d49d3a7dab1
This commit is contained in:
parent
28b65ea91c
commit
06688a99ca
|
@ -280,6 +280,18 @@ Most of the following settings are defined in
|
||||||
``openstack_dashboard/local/local_settings.py``, which should be copied from
|
``openstack_dashboard/local/local_settings.py``, which should be copied from
|
||||||
``openstack_dashboard/local/local_settings.py.example``.
|
``openstack_dashboard/local/local_settings.py.example``.
|
||||||
|
|
||||||
|
``AUTHENTICATION_URLS``
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
.. versionadded:: 2015.1(Kilo)
|
||||||
|
|
||||||
|
Default: ``['openstack_auth.urls']``
|
||||||
|
|
||||||
|
A list of modules from which to collate authentication URLs from. The default
|
||||||
|
option adds URLs from the django-openstack-auth module however others will be
|
||||||
|
required for additional authentication mechanisms.
|
||||||
|
|
||||||
|
|
||||||
``API_RESULT_LIMIT``
|
``API_RESULT_LIMIT``
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|
|
@ -296,6 +296,13 @@ TIME_ZONE = "UTC"
|
||||||
# the password.
|
# the password.
|
||||||
# ENFORCE_PASSWORD_CHECK = False
|
# ENFORCE_PASSWORD_CHECK = False
|
||||||
|
|
||||||
|
# Modules that provide /auth routes that can be used to handle different types
|
||||||
|
# of user authentication. Add auth plugins that require extra route handling to
|
||||||
|
# this list.
|
||||||
|
#AUTHENTICATION_URLS = [
|
||||||
|
# 'openstack_auth.urls',
|
||||||
|
#]
|
||||||
|
|
||||||
# The Horizon Policy Enforcement engine uses these values to load per service
|
# The Horizon Policy Enforcement engine uses these values to load per service
|
||||||
# policy rule files. The content of these files should match the files the
|
# policy rule files. The content of these files should match the files the
|
||||||
# OpenStack services are using to determine role based access control in the
|
# OpenStack services are using to determine role based access control in the
|
||||||
|
|
|
@ -164,6 +164,7 @@ INSTALLED_APPS = [
|
||||||
|
|
||||||
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
|
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
|
||||||
AUTHENTICATION_BACKENDS = ('openstack_auth.backend.KeystoneBackend',)
|
AUTHENTICATION_BACKENDS = ('openstack_auth.backend.KeystoneBackend',)
|
||||||
|
AUTHENTICATION_URLS = ['openstack_auth.urls']
|
||||||
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
|
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
|
||||||
|
|
||||||
SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'
|
SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'
|
||||||
|
|
|
@ -32,11 +32,16 @@ import horizon
|
||||||
urlpatterns = patterns(
|
urlpatterns = patterns(
|
||||||
'',
|
'',
|
||||||
url(r'^$', 'openstack_dashboard.views.splash', name='splash'),
|
url(r'^$', 'openstack_dashboard.views.splash', name='splash'),
|
||||||
url(r'^auth/', include('openstack_auth.urls')),
|
|
||||||
url(r'^api/', include('openstack_dashboard.api.rest.urls')),
|
url(r'^api/', include('openstack_dashboard.api.rest.urls')),
|
||||||
url(r'', include(horizon.urls)),
|
url(r'', include(horizon.urls)),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
for u in getattr(settings, 'AUTHENTICATION_URLS', ['openstack_auth.urls']):
|
||||||
|
urlpatterns += patterns(
|
||||||
|
'',
|
||||||
|
url(r'^auth/', include(u))
|
||||||
|
)
|
||||||
|
|
||||||
# Development static app and project media serving using the staticfiles app.
|
# Development static app and project media serving using the staticfiles app.
|
||||||
urlpatterns += staticfiles_urlpatterns()
|
urlpatterns += staticfiles_urlpatterns()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue