Merge "Add option websso_choices_hide_keystone"

This commit is contained in:
Zuul 2022-08-09 15:01:14 +00:00 committed by Gerrit Code Review
commit 59a265a7e3
3 changed files with 20 additions and 0 deletions

View File

@ -466,6 +466,12 @@
# ['saml2', 'Security Assertion Markup Language']
# ]
#
# [*websso_choices_hide_keystone*]
# (optional)The WEBSSO_CHOICES option will by default include an entry for
# "Keystone Credentials". Setting this option to true will hide it.
# Note that websso_initial_choice will need to be set to a valid option.
# Default to false
#
# [*websso_idp_mapping*]
# (optional)Set the WEBSSO_IDP_MAPPING option.
# A dictionary of specific identity provider and protocol combinations.
@ -634,6 +640,7 @@ class horizon(
$websso_enabled = false,
$websso_initial_choice = undef,
$websso_choices = undef,
$websso_choices_hide_keystone = false,
$websso_idp_mapping = undef,
$websso_default_redirect = false,
$websso_default_redirect_protocol = undef,
@ -668,6 +675,10 @@ and usage of a quoted value is deprecated.')
$cache_server_ip_real = inet6_prefix($cache_server_ip)
}
if $websso_choices_hide_keystone and !$websso_initial_choice {
fail('websso_initial_choice is required when websso_choices_hide_keystone is true')
}
$hypervisor_defaults = {
'can_set_mount_point' => true,
'can_set_password' => false,

View File

@ -0,0 +1,7 @@
---
features:
- |
Added a new option ``websso_choices_hide_keystone``. This lets you hide
the ability to log in with Keystone-credentials when using federation.
Be aware that this also requires you to set ``websso_initial_choice`` to
a valid value.

View File

@ -334,7 +334,9 @@ WEBSSO_INITIAL_CHOICE = "<%= @websso_initial_choice %>"
#)
<% if @websso_choices.kind_of?(Array) -%>
WEBSSO_CHOICES = (
<% if not @websso_choices_hide_keystone -%>
("credentials", _("Keystone Credentials")),
<% end -%>
<% @websso_choices.each do |r| -%>
("<%= r[0] -%>", _("<%= r[1] -%>")),
<% end -%>