feat(auth): sign in with OpenID Connect providers #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/oidc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
feat/alerting); first of three auth changes (OIDC, then email verification, then 2FA / WebAuthn).Changes
TraefikControl.Secrets: the alert-secret encryption extracted and keyed by purpose; existing alert secrets still decrypt (tested against the old derivation).identity_providersanduser_identitiestables,users.has_password(portable migration; round trip with data verified on SQLite and PostgreSQL).TraefikControl.Identity: authorization code flow with PKCE (S256), state and nonce, usingoidcc(new dependency, withjoseandtelemetry_registry). The ID token's signature, issuer, audience, expiry and nonce are verified; https certificates are always verified.subsigns in; a signed-in user in sudo mode can link; a new account needs a verified email in an allowed domain and an allowing provider; an email that already has an account is refused, never linked./auth/oidc/:slug,/callback,/link; pending request is single use, 10 minutes, bound to its provider; failures are logged by shape only (no claims or nonces)./admin/identity-providers(server admins, recent login required), sign-in buttons, linked accounts in settings,member.joinedaudit event for automatic organization membership.TRAEFIK_CONTROL_OIDC_ALLOW_HTTPfor development providers; README updated.Verification
mix format --check-formatted,mix compile --warnings-as-errors,mix credo --strict,mix dialyzer: clean.mix test: 1154 passed on SQLite and on PostgreSQL. New tests use a real local OIDC provider (Bandit, RSA JWKS) that enforces client credentials, redirect URI, single-use codes and PKCE.ghcr.io/navikt/mock-oauth2-serverwith the app in a browser: provider added in the admin page, account created on first sign-in, linked account listed in settings, unlinking the only way in refused, linking an identity owned by another user refused. This found that oidcc requiresscopes_supported, which that server omits; handled and covered by the fake provider.