Skip to content

Commit

Permalink
Fix Single Logout on federated scenarios. (#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanPTM authored Jul 13, 2023
1 parent 784f652 commit a9c1f34
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions environments/custom/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ keycloak_key_provider_component_name: "rsa-for-keystone"

keystone_client_id: "keystone"
keystone_redirect_uris:
- "https://api.testbed.osism.xyz:5000/redirect_uri"
- "https://api.testbed.osism.xyz:5000/redirect_uri/"
- "https://api.testbed.osism.xyz"
- "https://192.168.16.254:5000/redirect_uri"
- "https://192.168.16.254:5000/redirect_uri/"
- "https://192.168.16.254"

keycloak_private_key_file_path: "{{ configuration_directory }}/environments/custom/files/keycloak/private_key.pem"
Expand Down
4 changes: 4 additions & 0 deletions environments/custom/playbook-keycloak-oidc-client-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
--set publicClient=true
--set secret="{{ keystone_container_federation_oidc_client_secret }}"
--set 'attributes."pkce.code.challenge.method"="S256"'
--set 'attributes."post.logout.redirect.uris"="https://api.testbed.osism.xyz/auth/logout/"'
--set 'attributes."backchannel.logout.revoke.offline.tokens"="true"'
--set 'attributes."backchannel.logout.session.required"="true"'
--set 'attributes."backchannel.logout.url"="https://api.testbed.osism.xyz:5000/redirect_uri/?logout=backchannel"'
when: keystone_client_id not in available_clients
run_once: true
no_log: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
LOGOUT_URL = 'https://keycloak.testbed.osism.xyz/auth/realms/osism/protocol/openid-connect/logout/?client_id=keystone&post_logout_redirect_uri=https://api.testbed.osism.xyz/auth/logout/'

WEBSSO_ENABLED = True

WEBSSO_KEYSTONE_URL = "https://api.testbed.osism.xyz:5000/v3"
Expand Down
4 changes: 2 additions & 2 deletions environments/kolla/files/overlays/keystone/wsgi-keystone.conf
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ LogLevel info
OIDCOAuthVerifyCertFiles {{ keystone_federation_openid_certificate_key_ids | join(" ") }}
{% endif %}
OIDCCryptoPassphrase {{ keystone_federation_openid_crypto_password }}
OIDCRedirectURI {{ keystone_public_url }}/redirect_uri
OIDCRedirectURI {{ keystone_public_url }}/redirect_uri/
{% if enable_memcached | bool %}
OIDCCacheType memcache
OIDCMemCacheServers "{% for host in groups['memcached'] %}{{ 'api' | kolla_address(host) | put_address_in_context('memcache') }}:{{ memcached_port }}{% if not loop.last %} {% endif %}{% endfor %}"
{% endif %}

<Location ~ "/redirect_uri">
<Location ~ "/redirect_uri/">
Require valid-user
AuthType openid-connect
</Location>
Expand Down

2 comments on commit a9c1f34

@garloff
Copy link
Contributor

@garloff garloff commented on a9c1f34 Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be copied (cherry-picked) to cfg-generics, so it ends up in 6.0.0 (and also -- probably by another cherry-pick -- in 5.3.0).

@berendt
Copy link
Member

@berendt berendt commented on a9c1f34 Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not yet have the feature to merge cfg-generics with existing config repositories. I am currently working on this. Merge of ansible.cfg is already finished. Merge of all other files in the config repository will be the next step.

Please sign in to comment.