v0.8.1: request a kubernetes-audience token for actions
user-authn adds audience:server:client_id:kubernetes to the dex authenticator's scope only for DexAuthenticators annotated dexauthenticator.deckhouse.io/allow-access-to-kubernetes, which is what the console module does. v0.8.0 set sendAuthorizationHeader alone, so the token in the header was one the API server does not accept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f24eaa3f23
commit
1025c40561
@@ -10,6 +10,12 @@ metadata:
|
||||
name: cluster-map
|
||||
namespace: d8-cluster-map
|
||||
{{- include "helm_lib_module_labels" (list . (dict "app" "dex-authenticator" "name" "cluster-map")) | nindent 2 }}
|
||||
{{- if .Values.clusterMap.actions.enabled }}
|
||||
annotations:
|
||||
# user-authn then asks Dex for a token with the kubernetes audience,
|
||||
# which the API server accepts: actions run with it (as the console does)
|
||||
dexauthenticator.deckhouse.io/allow-access-to-kubernetes: "true"
|
||||
{{- end }}
|
||||
spec:
|
||||
applicationDomain: {{ include "helm_lib_module_public_domain" (list . "cluster-map") }}
|
||||
{{- if and $ingressEnabled (include "helm_lib_module_https_ingress_tls_enabled" .) }}
|
||||
@@ -22,7 +28,7 @@ spec:
|
||||
applicationIngressClassName: {{ include "helm_lib_module_ingress_class" . | quote }}
|
||||
{{- if .Values.clusterMap.actions.enabled }}
|
||||
# actions run as the viewer: the user's token goes to the module in the
|
||||
# Authorization header (and the token's audience includes kubernetes)
|
||||
# Authorization header
|
||||
sendAuthorizationHeader: true
|
||||
{{- end }}
|
||||
{{- with .Values.clusterMap.auth.allowedUserEmails }}
|
||||
|
||||
Reference in New Issue
Block a user