Skip to content

chore: move Kiali login-token signing key to AWS Secrets Manager via ESO#51

Merged
ausbru87 merged 1 commit into
mainfrom
chore/kiali-signing-key-eso
Jun 10, 2026
Merged

chore: move Kiali login-token signing key to AWS Secrets Manager via ESO#51
ausbru87 merged 1 commit into
mainfrom
chore/kiali-signing-key-eso

Conversation

@ausbru87

Copy link
Copy Markdown
Collaborator

What

The kiali-server Helm chart renders a random 32-byte login_token.signing_key literal into the committed deploy/istio/observability/kiali.yaml. That value signs Kiali's session tokens, so it is a real secret and should not live in git.

This change references it as login_token.signing_key: "secret:kiali:signing-key". Chart 2.26.0 detects that pattern and mounts the signing-key entry of the ESO-managed Secret kiali at /kiali-override-secrets/login-token-signing-key/value.txt, which overrides the placeholder reference string in the ConfigMap. No secret value is rendered into the repo.

Changes

  • kiali-server-values.yaml: add login_token.signing_key: "secret:kiali:signing-key" and document the rationale.
  • kiali.yaml: regenerated (helm template 2.26.0). The literal key is gone; the ConfigMap now holds the reference string and the Deployment gains the override-secret volume/mount.
  • externalsecret-kiali-oauth.yaml: the existing dataFrom.extract already syncs every ASM JSON key, so the kiali Secret now also carries signing-key; comment updated.
  • setup-kiali-oidc.py: stores a 32-byte signing-key in ASM usgov-coderdemo/observability/kiali-oauth alongside oidc-secret, preserving an existing valid key across re-runs so it is not rotated unnecessarily.

Live rotation + verification

A new 32-byte key was written to ASM, ESO synced it into the kiali Secret, and the regenerated manifest was applied with a Kiali rollout in istio-system. Verified after cutover:

  • Pod Running, ready, 0 restarts; signing-key file mounted (32 bytes).
  • Logs: Using authentication strategy [openid], with no "signing key is not 16, 24 nor 32 bytes" downgrade warning (so the authorization-code flow is intact).
  • GET /kiali/api/auth/info returns HTTP 200 with strategy=openid and a valid authorizationEndpoint.

The 16/24/32-byte length is required to keep Kiali on the OIDC authorization-code flow; a different length silently downgrades to the implicit flow.

Context: secret-hygiene remediation

This is part of the secret-hygiene pass. The repo-wide secret scan (added in #49) surfaced this committed Kiali signing key, which the earlier manual review had missed. A full sweep found no other inline secrets. Companion work: #50 (rotate + ESO-migrate the synthetic datastore-mcp Postgres credentials) and #49 (gitleaks pre-commit + CI guardrails). Git history purge was intentionally declined; rotation is the remediation.

Generated by Coder Agents, on behalf of @ausbru87.

The kiali-server Helm chart rendered a random 32-byte login_token.signing_key
literal into the committed kiali.yaml. Reference it as secret:kiali:signing-key
instead, so the chart mounts the key from the ESO-managed Secret "kiali" (ASM
usgov-coderdemo/observability/kiali-oauth, key signing-key) and no secret value
is committed to git. setup-kiali-oidc.py now stores and preserves the signing
key alongside oidc-secret. Rotated live in istio-system and verified: Kiali is
healthy on the openid authorization-code flow with the key sourced from ESO.

Generated by Coder Agents.
@ausbru87 ausbru87 merged commit 8841ea5 into main Jun 10, 2026
@ausbru87 ausbru87 deleted the chore/kiali-signing-key-eso branch June 10, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant