From 1169d796e7f3b0b6261e14586cb9f999b3a0db2b Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sat, 29 Aug 2026 21:52:30 +1000 Subject: [PATCH] grafana: stop pinning the internal CA for Authentik OAuth (#440) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Why `identity.unkin.net` moved from an internal `unkin.net` CA-issued cert to the LetsEncrypt `*.unkin.net` wildcard. `auth.generic_oauth`'s `tls_client_ca` pointed Grafana at the internal root only, so the OAuth handshake to the LE-issued cert now fails. Grafana's image trust store already contains the public roots. ## Changes - Remove `tls_client_ca: /etc/grafana/vault-ca/ca.crt` (and its stale comment) from `auth.generic_oauth`. - Remove the now-unused `vault-ca-cert` volume and volumeMount from the Grafana pod spec — nothing else in the pod referenced it (the CNPG `endpointCA` reference to `vault-ca-cert` for `s3.ceph.unkin.net` is a separate resource and stays). - Leave the auth/token/api URLs, scopes and `role_attribute_path` untouched. Reviewed-on: https://git.unkin.net/unkin/argocd-apps/pulls/440 Co-authored-by: unkin-agent Co-committed-by: unkin-agent --- apps/base/grafana/grafana.yaml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/apps/base/grafana/grafana.yaml b/apps/base/grafana/grafana.yaml index 82b6a1f..1665d71 100644 --- a/apps/base/grafana/grafana.yaml +++ b/apps/base/grafana/grafana.yaml @@ -26,13 +26,6 @@ spec: secretKeyRef: name: oauth-credentials key: client_secret - # identity.unkin.net is served by the internal unkin.net CA, which - # the stock Grafana image doesn't trust. Mount the reflected - # vault-ca-cert and point generic_oauth's tls_client_ca at it. - volumeMounts: - - name: vault-ca-cert - mountPath: /etc/grafana/vault-ca - readOnly: true resources: requests: cpu: 100m @@ -40,13 +33,6 @@ spec: limits: cpu: "1" memory: 1Gi - volumes: - - name: vault-ca-cert - secret: - secretName: vault-ca-cert - items: - - key: ca.crt - path: ca.crt config: server: root_url: "https://grafana.k8s.syd1.au.unkin.net" @@ -71,9 +57,6 @@ spec: auth_url: "https://identity.unkin.net/application/o/authorize/" token_url: "https://identity.unkin.net/application/o/token/" api_url: "https://identity.unkin.net/application/o/userinfo/" - # Trust the internal unkin.net CA that signs identity.unkin.net's cert - # (mounted from the reflected vault-ca-cert Secret). - tls_client_ca: "/etc/grafana/vault-ca/ca.crt" # Authentik permission groups -> Grafana roles. akP-grafana-admin is granted # to akR-global-admin members (and direct members) via terraform-authentik. role_attribute_path: "contains(ak_groups[*], 'akP-grafana-admin') && 'Admin' || 'Viewer'"