Skip to content

Commit c0725b6

Browse files
committed
Allow overriding OIDC username claim
Signed-off-by: Ryan Djurovich <git@ryan0x44.com>
1 parent 9659cdc commit c0725b6

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

templates/knc/opt/kube-apiserver/bin/run-kube-apiserver.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,10 @@ args=(
156156
"--oidc-client-id=${CLUSTER_ID}"
157157

158158
#
159-
# JWT claim to use as the user name. By default sub, which is expected
160-
# to be a unique identifier of the end user.
161-
# Note that sub is typically a stable user ID, but it may be more useful
162-
# for audit purposes to show the users' validated email address.
163-
# Easy OIDC by default puts the users' validated email address in the sub,
164-
# and a service identifier for trusted/federated tokens.
165-
#
166-
'--oidc-username-claim=sub'
159+
# Truster puts user and service identities in sub. Other OIDC providers may
160+
# select a different claim through OIDC_USERNAME_CLAIM.
161+
#
162+
"--oidc-username-claim=${OIDC_USERNAME_CLAIM:-sub}"
167163

168164
#
169165
# Prefix prepended to username claims to prevent clashes with existing

0 commit comments

Comments
 (0)