Problem
Nora's OIDC support is limited to CI/CD workload identity (JWT Bearer token
validation via JWKS). There is no way to authenticate in the Web UI using an
external identity provider. This forces operators to manage htpasswd users
manually, which does not scale:
- No self-service registration or password reset
- No integration with existing SSO (Authentik, Keycloak, Google, Azure AD)
- Every user must be pre-provisioned in
users.htpasswd on every replica
- No support for MFA, password policies, or account lifecycle management
Context
- Nora version: 0.9.5
- Deployment scenario: Production with Authentik as the central IdP,
currently usable only for CI/CD pipelines (OIDC workload identity) but
missing Web UI login for human users.
Proposed Solution
Add OIDC Authorization Code flow with PKCE for Web UI login.
Flow
- User clicks "Log in with SSO" on the Nora login page
- Browser redirected to the configured IdP's authorization endpoint
- IdP authenticates the user and redirects back with an auth code
- Nora exchanges the code for an ID token + access token
- Nora validates the ID token (
iss, aud, exp, signature via JWKS)
- A Web UI session is created (signed cookie or in-memory token)
- User is now authenticated in the UI
Configuration Sketch (TOML)
[auth.oidc]
[[auth.oidc.ui_providers]]
name = "authentik"
display_name = "Log in with Authentik"
issuer = "https://auth.example.com/application/o/nora/"
client_id = "..."
client_secret = "..."
scopes = ["openid", "profile", "email"]
role_claim = "groups"
role_map = { "nora-admin" = "admin", "nora-write" = "write" }
auto_provision = true
link_claim = "email"
Design Considerations
Session management
Nora currently has no concept of Web UI sessions. A simple signed-JWT cookie
(httpOnly, SameSite=Lax) stored in a sessions/ directory would work
for single-replica. Multi-replica might need a shared session store (Redis, DB).
Role mapping
The IdP groups claim (or similar) should map to Nora roles (read/write/admin).
This lets the IdP be the source of truth for authorization.
Coexistence
Must work alongside existing htpasswd auth and existing OIDC workload identity
(CI/CD JWT Bearer). They are independent authentication methods.
PKCE
Required for public clients (SPA). The Nora Web UI is a SPA served from the
same origin, so Authorization Code + PKCE is the recommended OAuth 2.0 BCP.
admin_users integration
OIDC-authenticated users who map to the admin role should also be able to
mint admin tokens via POST /api/tokens (currently restricted to htpasswd
users listed in auth.admin_users).
Alternatives Considered
- ForwardAuth (Traefik/Authentik): Breaks Docker CLI, pip, npm — they need
HTTP 401/WWW-Authenticate, not a redirect. Not viable.
- htpasswd-only: Works but imposes manual user management burden that does
not scale.
Prior Art
Harbor, Nexus, Artifactory, and the GitLab Container Registry all support
OIDC Web UI login alongside token-based registry auth. The common pattern:
the IdP handles authentication, the registry issues short-lived tokens for
protocol clients (Docker/PyPI/npm) and sessions for the Web UI.
Related Registry
UI/Dashboard
Problem
Nora's OIDC support is limited to CI/CD workload identity (JWT Bearer token
validation via JWKS). There is no way to authenticate in the Web UI using an
external identity provider. This forces operators to manage htpasswd users
manually, which does not scale:
users.htpasswdon every replicaContext
currently usable only for CI/CD pipelines (OIDC workload identity) but
missing Web UI login for human users.
Proposed Solution
Add OIDC Authorization Code flow with PKCE for Web UI login.
Flow
iss,aud,exp, signature via JWKS)Configuration Sketch (TOML)
Design Considerations
Session management
Nora currently has no concept of Web UI sessions. A simple signed-JWT cookie
(
httpOnly,SameSite=Lax) stored in asessions/directory would workfor single-replica. Multi-replica might need a shared session store (Redis, DB).
Role mapping
The IdP
groupsclaim (or similar) should map to Nora roles (read/write/admin).This lets the IdP be the source of truth for authorization.
Coexistence
Must work alongside existing htpasswd auth and existing OIDC workload identity
(CI/CD JWT Bearer). They are independent authentication methods.
PKCE
Required for public clients (SPA). The Nora Web UI is a SPA served from the
same origin, so Authorization Code + PKCE is the recommended OAuth 2.0 BCP.
admin_usersintegrationOIDC-authenticated users who map to the
adminrole should also be able tomint admin tokens via
POST /api/tokens(currently restricted to htpasswdusers listed in
auth.admin_users).Alternatives Considered
HTTP 401/WWW-Authenticate, not a redirect. Not viable.
not scale.
Prior Art
Harbor, Nexus, Artifactory, and the GitLab Container Registry all support
OIDC Web UI login alongside token-based registry auth. The common pattern:
the IdP handles authentication, the registry issues short-lived tokens for
protocol clients (Docker/PyPI/npm) and sessions for the Web UI.
Related Registry
UI/Dashboard