Skip to content

Commit 3b4021c

Browse files
committed
IDP specific websso
Allow handling websso requests per IDP. Depends-On: Ie20e21eb95c2250e301165012eef5591243620e9 Implements: bp federation-idp-websso Change-Id: Icf2d89c8fbafd09e5bf1f03d4071e43dbf2352f6
1 parent fc64d3b commit 3b4021c

File tree

2 files changed

+63
-10
lines changed

2 files changed

+63
-10
lines changed

doc/source/topics/settings.rst

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -766,11 +766,46 @@ Default::
766766
("saml2", _("Security Assertion Markup Language"))
767767
)
768768

769-
This is the list of authentication mechanisms available to the user. It includes
770-
Keystone federation protocols such as OpenID Connect and SAML. The list of
771-
choices is completely configurable, so as long as the id remains intact. Do not
772-
remove the credentials mechanism unless you are sure. Once removed, even admins
773-
will have no way to log into the system via the dashboard.
769+
This is the list of authentication mechanisms available to the user. It
770+
includes Keystone federation protocols such as OpenID Connect and SAML, and
771+
also keys that map to specific identity provider and federation protocol
772+
combinations (as defined in ``WEBSSO_IDP_MAPPING``). The list of choices is
773+
completely configurable, so as long as the id remains intact. Do not remove
774+
the credentials mechanism unless you are sure. Once removed, even admins will
775+
have no way to log into the system via the dashboard.
776+
777+
778+
``WEBSSO_IDP_MAPPING``
779+
----------------------
780+
781+
.. versionadded:: 8.0.0(Liberty)
782+
783+
Default: ``{}``
784+
785+
A dictionary of specific identity provider and federation protocol combinations.
786+
From the selected authentication mechanism, the value will be looked up as keys
787+
in the dictionary. If a match is found, it will redirect the user to a identity
788+
provider and federation protocol specific WebSSO endpoint in keystone, otherwise
789+
it will use the value as the protocol_id when redirecting to the WebSSO by
790+
protocol endpoint.
791+
792+
Example::
793+
794+
WEBSSO_CHOICES = (
795+
("credentials", _("Keystone Credentials")),
796+
("oidc", _("OpenID Connect")),
797+
("saml2", _("Security Assertion Markup Language")),
798+
("acme_oidc", "ACME - OpenID Connect"),
799+
("acme_saml2", "ACME - SAML2")
800+
)
801+
802+
WEBSSO_IDP_MAPPING = {
803+
"acme_oidc": ("acme", "oidc"),
804+
"acme_saml2": ("acme", "saml2")
805+
}
806+
807+
.. note::
808+
The value is expected to be a tuple formatted as: (<idp_id>, <protocol_id>).
774809

775810

776811
``OPENSTACK_CINDER_FEATURES``

openstack_dashboard/local/local_settings.py.example

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,33 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_"
147147
# Determines which authentication choice to show as default.
148148
#WEBSSO_INITIAL_CHOICE = "credentials"
149149

150-
# The list of authentication mechanisms
151-
# which include keystone federation protocols.
152-
# Current supported protocol IDs are 'saml2' and 'oidc'
153-
# which represent SAML 2.0, OpenID Connect respectively.
150+
# The list of authentication mechanisms which include keystone
151+
# federation protocols and identity provider/federation protocol
152+
# mapping keys (WEBSSO_IDP_MAPPING). Current supported protocol
153+
# IDs are 'saml2' and 'oidc' which represent SAML 2.0, OpenID
154+
# Connect respectively.
154155
# Do not remove the mandatory credentials mechanism.
156+
# Note: The last two tuples are sample mapping keys to a identity provider
157+
# and federation protocol combination (WEBSSO_IDP_MAPPING).
155158
#WEBSSO_CHOICES = (
156159
# ("credentials", _("Keystone Credentials")),
157160
# ("oidc", _("OpenID Connect")),
158-
# ("saml2", _("Security Assertion Markup Language")))
161+
# ("saml2", _("Security Assertion Markup Language")),
162+
# ("acme_oidc", "ACME - OpenID Connect"),
163+
# ("acme_saml2", "ACME - SAML2")
164+
#)
165+
166+
# A dictionary of specific identity provider and federation protocol
167+
# combinations. From the selected authentication mechanism, the value
168+
# will be looked up as keys in the dictionary. If a match is found,
169+
# it will redirect the user to a identity provider and federation protocol
170+
# specific WebSSO endpoint in keystone, otherwise it will use the value
171+
# as the protocol_id when redirecting to the WebSSO by protocol endpoint.
172+
# NOTE: The value is expected to be a tuple formatted as: (<idp_id>, <protocol_id>).
173+
#WEBSSO_IDP_MAPPING = {
174+
# "acme_oidc": ("acme", "oidc"),
175+
# "acme_saml2": ("acme", "saml2")
176+
#}
159177

160178
# Disable SSL certificate checks (useful for self-signed certificates):
161179
#OPENSTACK_SSL_NO_VERIFY = True

0 commit comments

Comments
 (0)