Skip to content

Commit e9ef806

Browse files
committed
🐛(helm) fix OIDC authentication with standard scopes
Replace custom OIDC scopes with standard OpenID Connect scopes to fix Keycloak authentication flow. Changes: - Replace OIDC_RP_SCOPES from "openid email given_name usual_name" to "openid email profile" - Update OIDC_USERINFO_FULLNAME_FIELDS from "given_name,usual_name" to "given_name,family_name" - Add OIDC_REDIRECT_ALLOWED_HOSTS to allow Keycloak callback redirects The previous configuration used custom scopes (given_name, usual_name) that were not configured in Keycloak, causing authentication to fail with "invalid_scope" error. Using the standard "profile" scope includes all necessary user claims (given_name, family_name, etc.) and works with default Keycloak configuration. This fixes the issue where users were redirected to /home after authentication instead of staying logged in, because the OIDC flow was failing and session cookies were not being set properly.
1 parent 8f8d467 commit e9ef806

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/helm/env.d/dev/values.impress.yaml.gotmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ backend:
3232
LOGGING_LEVEL_LOGGERS_ROOT: INFO
3333
LOGGING_LEVEL_LOGGERS_APP: INFO
3434
OIDC_USERINFO_SHORTNAME_FIELD: "given_name"
35-
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,usual_name"
35+
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,family_name"
3636
OIDC_OP_JWKS_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/docs/protocol/openid-connect/certs
3737
OIDC_OP_AUTHORIZATION_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/docs/protocol/openid-connect/auth
3838
OIDC_OP_TOKEN_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/docs/protocol/openid-connect/token
@@ -42,7 +42,7 @@ backend:
4242
OIDC_RP_CLIENT_ID: docs
4343
OIDC_RP_CLIENT_SECRET: ThisIsAnExampleKeyForDevPurposeOnly
4444
OIDC_RP_SIGN_ALGO: RS256
45-
OIDC_RP_SCOPES: "openid email given_name usual_name"
45+
OIDC_RP_SCOPES: "openid email profile"
4646
LOGIN_REDIRECT_URL: https://docs.127.0.0.1.nip.io
4747
LOGIN_REDIRECT_URL_FAILURE: https://docs.127.0.0.1.nip.io
4848
LOGOUT_REDIRECT_URL: https://docs.127.0.0.1.nip.io

src/helm/env.d/feature/values.impress.yaml.gotmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ backend:
3333
LOGGING_LEVEL_LOGGERS_ROOT: INFO
3434
LOGGING_LEVEL_LOGGERS_APP: INFO
3535
OIDC_USERINFO_SHORTNAME_FIELD: "given_name"
36-
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,usual_name"
36+
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,family_name"
3737
OIDC_OP_JWKS_ENDPOINT: https://{{ .Values.feature }}-docs-keycloak.{{ .Values.domain }}/realms/docs/protocol/openid-connect/certs
3838
OIDC_OP_AUTHORIZATION_ENDPOINT: https://{{ .Values.feature }}-docs-keycloak.{{ .Values.domain }}/realms/docs/protocol/openid-connect/auth
3939
OIDC_OP_TOKEN_ENDPOINT: https://{{ .Values.feature }}-docs-keycloak.{{ .Values.domain }}/realms/docs/protocol/openid-connect/token
@@ -43,7 +43,7 @@ backend:
4343
OIDC_RP_CLIENT_ID: docs
4444
OIDC_RP_CLIENT_SECRET: ThisIsAnExampleKeyForDevPurposeOnly
4545
OIDC_RP_SIGN_ALGO: RS256
46-
OIDC_RP_SCOPES: "openid email given_name usual_name"
46+
OIDC_RP_SCOPES: "openid email profile"
4747
LOGIN_REDIRECT_URL: https://{{ .Values.feature }}-docs.{{ .Values.domain }}
4848
LOGIN_REDIRECT_URL_FAILURE: https://{{ .Values.feature }}-docs.{{ .Values.domain }}
4949
LOGOUT_REDIRECT_URL: https://{{ .Values.feature }}-docs.{{ .Values.domain }}

0 commit comments

Comments
 (0)