From 1025c40561a34847f84999f893dab82bdb4c590c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D1=82=D0=B0=D0=BB=D0=B8=D0=B9=20=D0=A7=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Thu, 24 Sep 2026 17:41:44 +0300 Subject: [PATCH] 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 --- Chart.yaml | 2 +- changelog.yaml | 3 +++ templates/dex-authenticator.yaml | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index 6287580..d206bb3 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,5 +1,5 @@ name: cluster-map -version: 0.8.0 +version: 0.8.1 dependencies: - name: deckhouse_lib_helm version: 1.72.24 diff --git a/changelog.yaml b/changelog.yaml index 57d9e99..503c56d 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -1,3 +1,6 @@ +v0.8.1: + fixes: + - "Actions: the DexAuthenticator is annotated allow-access-to-kubernetes, so the user's token carries the kubernetes audience and the API server accepts it. In v0.8.0 the token lacked that audience, the API server rejected it and actions were unavailable." v0.8.0: features: - "Problem badges: a yellow or red \"!\" on cards, namespace and node boxes and in the tree, from object state (crash loops, pending pods, readiness, failed CronJob runs, Services without endpoints, node pressure), Warning events and Deckhouse ClusterAlerts." diff --git a/templates/dex-authenticator.yaml b/templates/dex-authenticator.yaml index 8c04182..4a7663e 100644 --- a/templates/dex-authenticator.yaml +++ b/templates/dex-authenticator.yaml @@ -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 }}