Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ansible/roles/keystone_bootstrap/tasks/sso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@
idp: sso
mapping: sso_mapping

- name: Create mapped protocol
openstack.cloud.keystone_federation_protocol:
name: mapped
idp: sso
mapping: sso_mapping

- name: Create federated group mappings
ansible.builtin.include_tasks: sso_groups.yml
loop: "{{ keystone_bootstrap_groups }}"
Expand Down
24 changes: 24 additions & 0 deletions components/dex/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,30 @@ envVars:
name: oidc-sso
key: redirect-uri
optional: true
- name: CONNECTOR_SSO_ISSUER
valueFrom:
secretKeyRef:
name: connector-sso
key: issuer
optional: true
- name: CONNECTOR_SSO_CLIENT_ID
valueFrom:
secretKeyRef:
name: connector-sso
key: client-id
optional: true
- name: CONNECTOR_SSO_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: connector-sso
key: client-secret
optional: true
- name: CONNECTOR_SSO_REDIRECT_URI
valueFrom:
secretKeyRef:
name: connector-sso
key: redirect-uri
optional: true
- name: GRAFANA_SSO_CLIENT_SECRET
valueFrom:
secretKeyRef:
Expand Down
14 changes: 12 additions & 2 deletions components/keystone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ conf:
OIDCXForwardedHeaders X-Forwarded-Host X-Forwarded-Proto X-Forwarded-Port

# OIDC provider's .well-known/configuration URL
OIDCProviderMetadataURL {{ tuple "dex" "internal" "dex" $ | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}
OIDCProviderMetadataURL {{ tuple "dex" "internal" "dex" $ | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}/.well-known/openid-configuration
# this is so that in the OAuth 2.0 flows we can validate the JWT token
OIDCOAuthVerifyJwksUri {{ tuple "dex" "internal" "dex" $ | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}/keys
# Client / Application Identifier and Secret
OIDCClientID keystone
OIDCClientSecret "exec:/bin/cat /etc/keystone-sso/client-secret"
Expand All @@ -237,6 +239,7 @@ conf:

# set the REMOTE_USER to the value of preferred_username
OIDCRemoteUserClaim preferred_username
OIDCOAuthRemoteUserClaim preferred_username
# scopes that we want to request
OIDCScope "openid email profile groups"

Expand Down Expand Up @@ -271,6 +274,13 @@ conf:
Require valid-user
AuthType openid-connect
</Location>
# add OAuth 2.0 support for the identity provider 'sso' using the 'mapped' protocol
<Location /v3/OS-FEDERATION/identity_providers/sso/protocols/mapped/auth>
Require valid-user
AuthType oauth20
# TODO: variablize this better
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like the helm templating is supported here, so maybe just make it a configurable value with a sensible default?

OIDCPathAuthRequestParams connector_id=machine
</Location>
</VirtualHost>


Expand Down Expand Up @@ -317,7 +327,7 @@ endpoints:
dex:
# override this when full deployment
default: 5556
path: '/.well-known/openid-configuration'
path: ''

manifests:
job_credential_cleanup: false
Expand Down
Loading