Skip to content

Commit 7cd5cb7

Browse files
committed
get federated signin working without extra clicks
1 parent d17996d commit 7cd5cb7

8 files changed

+34
-599
lines changed

site-config/globals.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ virtualenv: /opt/kolla/venv
3232
####################
3333

3434
kolla_base_distro: "ubuntu"
35+
kolla_install_type: "source"
36+
3537

36-
# point at the docker registry we want
37-
# docker_namespace: kolla
38-
# docker_registry: docker.chameleoncloud.org
3938

4039
# default superadmin user and project
4140
keystone_admin_user: "admin"
@@ -78,12 +77,17 @@ keystone_identity_providers:
7877
identifier: "https://auth.dev.chameleoncloud.org/auth/realms/chameleon"
7978
public_name: Login with Chameleon Dev
8079
attribute_mapping: chameleon_mapping
81-
metadata_folder: "{{ node_custom_config }}/keystone/federation/metadata"
8280

8381
keystone_identity_mappings:
8482
- name: chameleon_mapping
8583
file: "{{ node_custom_config }}/keystone/idp_mapping.json"
8684

87-
keystone_image_full: ghcr.io/chameleoncloud/kolla/keystone:2023.1-ubuntu-jammy
88-
keystone_fernet_image_full: ghcr.io/chameleoncloud/kolla/keystone-fernet:2023.1-ubuntu-jammy
89-
keystone_ssh_image_full: ghcr.io/chameleoncloud/kolla/keystone-ssh:2023.1-ubuntu-jammy
85+
keystone_oidc_client_id: "keystone-ciab-dev"
86+
keystone_oidc_client_secret: "public"
87+
keystone_oidc_provider_metadata_url: "{{ keystone_identity_providers[0].identifier }}/.well-known/openid-configuration"
88+
89+
# keystone must support mapping multiple projects or keycloak federation will fail
90+
keystone_image_full: ghcr.io/chameleoncloud/kolla/ubuntu-source-keystone:2023.1-ubuntu-jammy
91+
keystone_fernet_image_full: ghcr.io/chameleoncloud/kolla/ubuntu-source-keystone-fernet:2023.1-ubuntu-jammy
92+
keystone_ssh_image_full: ghcr.io/chameleoncloud/kolla/ubuntu-source-keystone-ssh:2023.1-ubuntu-jammy
93+
horizon_image_full: ghcr.io/chameleoncloud/kolla/ubuntu-source-horizon:2023.1-ubuntu-jammy

site-config/node_custom_config/horizon/custom_local_settings

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,29 @@ OPENSTACK_IMAGE_BACKEND = {
9999
],
100100
}
101101

102+
{% if enable_keystone_federation | bool %}
103+
WEBSSO_ENABLED = True
104+
105+
WEBSSO_CHOICES = (
106+
{% for idp in keystone_identity_providers %}
107+
("{{ idp.name }}", "{{ idp.public_name }}"),
108+
{% endfor %}
109+
)
110+
WEBSSO_IDP_MAPPING = {
111+
{% for idp in keystone_identity_providers %}
112+
"{{ idp.name }}": ("{{ idp.name }}", "{{ idp.protocol }}"),
113+
{% endfor %}
114+
}
115+
WEBSSO_DEFAULT_REDIRECT = True
116+
117+
# This really shouldn't have to be set, but it's set at configuration parse
118+
# time and derived from a value (OPENSTACK_KEYSTONE_URL) that is overriden by
119+
# our configuration.
120+
WEBSSO_KEYSTONE_URL = "{{ keystone_public_url }}/v3"
121+
WEBSSO_DEFAULT_REDIRECT_REGION = '{{ keystone_public_url }}/v3'
122+
WEBSSO_DEFAULT_REDIRECT_PROTOCOL = 'openid'
123+
{% endif %}
124+
102125
# The OPENSTACK_HEAT_STACK has the only setting available - enable_user_pass,
103126
# which can be used to disable the password field while launching the stack.
104127
# Set to False if HEAT uses trusts by default otherwise it needs to be set as True.

site-config/node_custom_config/keystone/federation/metadata/auth.chameleoncloud.org%2Fauth%2Frealms%2Fchameleon.client

Lines changed: 0 additions & 4 deletions
This file was deleted.

site-config/node_custom_config/keystone/federation/metadata/auth.chameleoncloud.org%2Fauth%2Frealms%2Fchameleon.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

site-config/node_custom_config/keystone/federation/metadata/auth.chameleoncloud.org%2Fauth%2Frealms%2Fchameleon.provider

Lines changed: 0 additions & 291 deletions
This file was deleted.

site-config/node_custom_config/keystone/federation/metadata/auth.dev.chameleoncloud.org%2Fauth%2Frealms%2Fchameleon.client

Lines changed: 0 additions & 4 deletions
This file was deleted.

site-config/node_custom_config/keystone/federation/metadata/auth.dev.chameleoncloud.org%2Fauth%2Frealms%2Fchameleon.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)