fix(iam): make the ZITADEL OIDC secrets and identity links IaC-owned
Every consumer SSO login failed for two independent reasons, and neither was recorded in git. 1. The OIDC client secrets lived only in the cluster. They are written by scripts/iam/zitadel-provision.py, whose `apply` phase calls _generate_client_secret for every app on every run. A rotation therefore invalidated the stored secret in ArgoCD, Grafana, MinIO, Immich and Paperless, with no git value to compare against. Declaring the five Secrets as SOPS manifests makes ArgoCD the owner, so the next rotation is a reviewable diff instead of silent drift. 2. Forgejo, Paperless and Immich store the identity-provider link inside their own databases, not in Kubernetes. Those rows still carried the Authentik subject and provider, which produced three different symptoms from one cause: Forgejo never left /user/link_account, Paperless showed the social signup page, and Immich answered 400 "email already linked to different account". The PostSync Job re-points each row at the ZITADEL `sub`, matching on email or username rather than the numeric ids this was first observed on, so a re-run converges. Verified with a real browser login against a live ZITADEL session: Forgejo, Paperless, Immich, Grafana and ArgoCD all reach their authenticated landing page. Vault has no UI by design. MinIO remains open: the operator sidecar serves its console with no OIDC environment, so it advertises form login only.
This commit is contained in:
@@ -30,6 +30,16 @@ files:
|
||||
- paperless-ai-secrets.enc.yaml
|
||||
- memory-agent-oidc.enc.yaml
|
||||
- oauth2-credentials.enc.yaml
|
||||
# ZITADEL OIDC client secrets for the consumer apps. These used to live only
|
||||
# in the cluster, written by scripts/iam/zitadel-provision.py, so a rotation
|
||||
# there left every consumer holding a stale secret and no git record of the
|
||||
# real value. Declaring them here makes ArgoCD the owner and the rotation
|
||||
# outcome reviewable in a diff.
|
||||
- argocd-oidc.enc.yaml
|
||||
- grafana-oidc.enc.yaml
|
||||
- minio-oidc.enc.yaml
|
||||
- immich-oidc.enc.yaml
|
||||
- paperless-oidc.enc.yaml
|
||||
- forgejo-registry-token.enc.yaml
|
||||
- pi-sandbox-secrets.enc.yaml
|
||||
- etcd-defrag-creds.enc.yaml
|
||||
|
||||
Reference in New Issue
Block a user