From 3b4021c0ad0e8d7b10aa8c2dcd8c13a5717c450c Mon Sep 17 00:00:00 2001 From: lin-hua-cheng Date: Wed, 2 Sep 2015 23:49:31 -0700 Subject: [PATCH] IDP specific websso Allow handling websso requests per IDP. Depends-On: Ie20e21eb95c2250e301165012eef5591243620e9 Implements: bp federation-idp-websso Change-Id: Icf2d89c8fbafd09e5bf1f03d4071e43dbf2352f6 --- doc/source/topics/settings.rst | 45 ++++++++++++++++--- .../local/local_settings.py.example | 28 +++++++++--- 2 files changed, 63 insertions(+), 10 deletions(-) diff --git a/doc/source/topics/settings.rst b/doc/source/topics/settings.rst index 3d01981e6b..5a69a19629 100755 --- a/doc/source/topics/settings.rst +++ b/doc/source/topics/settings.rst @@ -766,11 +766,46 @@ Default:: ("saml2", _("Security Assertion Markup Language")) ) -This is the list of authentication mechanisms available to the user. It includes -Keystone federation protocols such as OpenID Connect and SAML. The list of -choices is completely configurable, so as long as the id remains intact. Do not -remove the credentials mechanism unless you are sure. Once removed, even admins -will have no way to log into the system via the dashboard. +This is the list of authentication mechanisms available to the user. It +includes Keystone federation protocols such as OpenID Connect and SAML, and +also keys that map to specific identity provider and federation protocol +combinations (as defined in ``WEBSSO_IDP_MAPPING``). The list of choices is +completely configurable, so as long as the id remains intact. Do not remove +the credentials mechanism unless you are sure. Once removed, even admins will +have no way to log into the system via the dashboard. + + +``WEBSSO_IDP_MAPPING`` +---------------------- + +.. versionadded:: 8.0.0(Liberty) + +Default: ``{}`` + +A dictionary of specific identity provider and federation protocol combinations. +From the selected authentication mechanism, the value will be looked up as keys +in the dictionary. If a match is found, it will redirect the user to a identity +provider and federation protocol specific WebSSO endpoint in keystone, otherwise +it will use the value as the protocol_id when redirecting to the WebSSO by +protocol endpoint. + +Example:: + + WEBSSO_CHOICES = ( + ("credentials", _("Keystone Credentials")), + ("oidc", _("OpenID Connect")), + ("saml2", _("Security Assertion Markup Language")), + ("acme_oidc", "ACME - OpenID Connect"), + ("acme_saml2", "ACME - SAML2") + ) + + WEBSSO_IDP_MAPPING = { + "acme_oidc": ("acme", "oidc"), + "acme_saml2": ("acme", "saml2") + } + +.. note:: + The value is expected to be a tuple formatted as: (, ). ``OPENSTACK_CINDER_FEATURES`` diff --git a/openstack_dashboard/local/local_settings.py.example b/openstack_dashboard/local/local_settings.py.example index e53ee35ed0..3e34e39929 100644 --- a/openstack_dashboard/local/local_settings.py.example +++ b/openstack_dashboard/local/local_settings.py.example @@ -147,15 +147,33 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_" # Determines which authentication choice to show as default. #WEBSSO_INITIAL_CHOICE = "credentials" -# The list of authentication mechanisms -# which include keystone federation protocols. -# Current supported protocol IDs are 'saml2' and 'oidc' -# which represent SAML 2.0, OpenID Connect respectively. +# The list of authentication mechanisms which include keystone +# federation protocols and identity provider/federation protocol +# mapping keys (WEBSSO_IDP_MAPPING). Current supported protocol +# IDs are 'saml2' and 'oidc' which represent SAML 2.0, OpenID +# Connect respectively. # Do not remove the mandatory credentials mechanism. +# Note: The last two tuples are sample mapping keys to a identity provider +# and federation protocol combination (WEBSSO_IDP_MAPPING). #WEBSSO_CHOICES = ( # ("credentials", _("Keystone Credentials")), # ("oidc", _("OpenID Connect")), -# ("saml2", _("Security Assertion Markup Language"))) +# ("saml2", _("Security Assertion Markup Language")), +# ("acme_oidc", "ACME - OpenID Connect"), +# ("acme_saml2", "ACME - SAML2") +#) + +# A dictionary of specific identity provider and federation protocol +# combinations. From the selected authentication mechanism, the value +# will be looked up as keys in the dictionary. If a match is found, +# it will redirect the user to a identity provider and federation protocol +# specific WebSSO endpoint in keystone, otherwise it will use the value +# as the protocol_id when redirecting to the WebSSO by protocol endpoint. +# NOTE: The value is expected to be a tuple formatted as: (, ). +#WEBSSO_IDP_MAPPING = { +# "acme_oidc": ("acme", "oidc"), +# "acme_saml2": ("acme", "saml2") +#} # Disable SSL certificate checks (useful for self-signed certificates): #OPENSTACK_SSL_NO_VERIFY = True