Skip to content

Commit f53460c

Browse files
committed
get federated signin working without extra clicks
fix container ref, enable federation by default we need chi's KA for federation metadata
1 parent 121d8f7 commit f53460c

9 files changed

+33
-598
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ansible
33
ansible-core>=2.13,<=2.14
44

5-
git+https://github.com/openstack/kolla-ansible@unmaintained/2023.1
5+
git+https://github.com/ChameleonCloud/kolla-ansible@backport/2023.1
66

77
# client tools
88
openstackclient

site-config/globals.yml

Lines changed: 9 additions & 5 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"
@@ -69,7 +68,7 @@ horizon_custom_themes:
6968
# Federated login config
7069
########################
7170

72-
enable_keystone_federation: false
71+
enable_keystone_federation: true
7372

7473
keystone_identity_providers:
7574
- name: "chameleon_dev"
@@ -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

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
8790
keystone_image_full: ghcr.io/chameleoncloud/kolla/keystone:2023.1-ubuntu-jammy
8891
keystone_fernet_image_full: ghcr.io/chameleoncloud/kolla/keystone-fernet:2023.1-ubuntu-jammy
8992
keystone_ssh_image_full: ghcr.io/chameleoncloud/kolla/keystone-ssh:2023.1-ubuntu-jammy
93+
horizon_image_full: ghcr.io/chameleoncloud/kolla/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)