diff --git a/doc/source/topics/settings.rst b/doc/source/topics/settings.rst index c30d20203..f8c582f24 100755 --- a/doc/source/topics/settings.rst +++ b/doc/source/topics/settings.rst @@ -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.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`` -------------------- diff --git a/openstack_dashboard/local/local_settings.py.example b/openstack_dashboard/local/local_settings.py.example index 395f0e05b..acc450534 100644 --- a/openstack_dashboard/local/local_settings.py.example +++ b/openstack_dashboard/local/local_settings.py.example @@ -296,6 +296,13 @@ TIME_ZONE = "UTC" # the password. # 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 # 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 diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py index fc0400384..ed3beecd6 100644 --- a/openstack_dashboard/settings.py +++ b/openstack_dashboard/settings.py @@ -164,6 +164,7 @@ INSTALLED_APPS = [ TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' AUTHENTICATION_BACKENDS = ('openstack_auth.backend.KeystoneBackend',) +AUTHENTICATION_URLS = ['openstack_auth.urls'] MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage' SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies' diff --git a/openstack_dashboard/urls.py b/openstack_dashboard/urls.py index 3b8aa372a..beef71e4c 100644 --- a/openstack_dashboard/urls.py +++ b/openstack_dashboard/urls.py @@ -32,11 +32,16 @@ import horizon urlpatterns = patterns( '', 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'', 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. urlpatterns += staticfiles_urlpatterns()