Default OAuth2 providers to RS256 ID token signing #15

Merged
benvin merged 1 commits from benvin/oidc-rs256-signing into main 2026-07-31 21:19:47 +10:00
Owner

Why: OAuth2 providers with no signing_key sign ID tokens with HS256, which RS256-only RP clients reject (Failed to verify oidc token: unexpected signature algorithm "HS256"; expected ["RS256"]), breaking OIDC login for argocd/grafana/rancher/litellm/netbox/gitea.

How:

  • Add data.authentik_certificate_key_pair.signing resolving the estate's RSA keypair by name (var.oauth2_signing_key_name, default the built-in "authentik Self-signed Certificate", confirmed RSA with a private key).
  • Default every provider's signing_key to that keypair via coalesce, so all providers sign with RS256 while keeping the per-yaml signing_key override.

Plan: 0 to add, 6 to change, 0 to destroy - the 6 oauth2 providers (argocd, gitea, grafana, litellm, netbox, rancher) get signing_key set in-place; nothing else touched. On apply all OIDC apps switch to RS256, so a re-login is needed.

https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv

Why: OAuth2 providers with no signing_key sign ID tokens with HS256, which RS256-only RP clients reject (`Failed to verify oidc token: unexpected signature algorithm "HS256"; expected ["RS256"]`), breaking OIDC login for argocd/grafana/rancher/litellm/netbox/gitea. How: - Add `data.authentik_certificate_key_pair.signing` resolving the estate's RSA keypair by name (`var.oauth2_signing_key_name`, default the built-in "authentik Self-signed Certificate", confirmed RSA with a private key). - Default every provider's `signing_key` to that keypair via `coalesce`, so all providers sign with RS256 while keeping the per-yaml `signing_key` override. Plan: 0 to add, 6 to change, 0 to destroy - the 6 oauth2 providers (argocd, gitea, grafana, litellm, netbox, rancher) get signing_key set in-place; nothing else touched. On apply all OIDC apps switch to RS256, so a re-login is needed. https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
unkinben added 1 commit 2026-07-31 20:28:26 +10:00
Default OAuth2 providers to RS256 ID token signing
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
b6e9b6b6b9
OAuth2 providers with no signing_key fall back to HS256, which RS256-only
RP clients (argocd confirmed, and the rest) reject with "unexpected
signature algorithm HS256; expected [RS256]", breaking OIDC login.

- Add data.authentik_certificate_key_pair.signing, resolving the estate's
  RSA keypair by name (var.oauth2_signing_key_name, default the built-in
  "authentik Self-signed Certificate").
- Default every provider's signing_key to that keypair via coalesce, so all
  providers sign with RS256 while keeping the per-yaml signing_key override.

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
benvin merged commit 819996b0c7 into main 2026-07-31 21:19:47 +10:00
benvin deleted branch benvin/oidc-rs256-signing 2026-07-31 21:19:47 +10:00
Sign in to join this conversation.