On this page

11.2 Sign-in and OIDC

Sign-in to the web interface uses a local account (user name and password, optionally with a second factor) or single sign-on through an OIDC identity provider such as Authentik, Keycloak, or Entra ID. OIDC is optional and set up in server.toml.

Local sign-in

On first start the page First start: create the administrator account asks for User name, Password (at least 12 characters), and Repeat password, and Create account and sign in creates the first admin account. An admin creates further accounts (see section 11.1 Users and roles).

After that the sign-in page asks for User name and Password. Sign in starts the session. If the account has a second factor, the step Second step for … follows: either enter the Code from the authenticator app, or choose Use a recovery code instead and enter one of the recovery codes (format xxxx-xxxx, each works once), then finish with Verify. A disabled account gets the message "This account is disabled. Ask an administrator to enable it."

A session lasts session_hours hours from sign-in (default 12, allowed 1 to 720). The session cookie __Host-pdc_session is Secure, HttpOnly, and SameSite=Strict. Disabling an account, or resetting its password or second factor, ends its sessions at once.

Lockout after failed attempts

Repeated wrong sign-ins lead to growing waiting times so that passwords cannot be guessed:

Counter

Limit

Waiting time

User name and client address together

5 failed attempts

doubles with each further failure, at most 15 minutes

Client address alone

10 failed attempts

as above, at most 15 minutes

User name from anywhere

50 failed attempts (soft limit)

at most 60 seconds

This way an attacker on another address cannot lock the real account out for long. Failures in the second step are counted separately. A successful sign-in resets the counters.

Sign-in
Sign-in

Single sign-on with OIDC

PDC-Backup supports OIDC with the authorization code flow and PKCE (S256). The server verifies the ID token against the provider's keys (JWKS; RS256 and ES256) as well as iss, aud, exp, iat, and nonce, and then creates a normal session. If [oidc] is configured, the sign-in page shows the button Sign in with … (label from label, otherwise "single sign-on") in addition to the form. A failed sign-in appears as "Single sign-on failed: …".

Setup

  1. At the identity provider, create a client for PDC-Backup and register https://<server>:8443/api/v1/auth/oidc/callback as redirect URI. The provider must offer a discovery document at <issuer>/.well-known/openid-configuration.

  2. Add an [oidc] section to server.toml in the server's data directory (see below).

  3. Restart the server so that it re-reads the file. Only the [oidc] section turns the feature on.

Fields of the [oidc] section

Option

Effect

Default

issuer

Address of the identity provider. The iss of the ID token must match it (a trailing slash does not matter).

–

client_id

Identifier of the client at the provider. The ID token must be issued for it (aud).

–

client_secret

Secret of a confidential client (sent as client_secret_post). Leave empty for public clients; PKCE alone then protects the flow.

empty

redirect_url

Exactly the return address registered at the provider: https://<server>:8443/api/v1/auth/oidc/callback.

–

scopes

Additional scopes. openid is always requested. For groups and names usually ["profile", "email", "groups"].

empty (only openid)

username_claim

Claim with the user name. If it is missing or empty, the server tries preferred_username, email, and sub in turn.

empty

role_claim

Claim with group or role names (text or list), for example groups.

empty (then groups)

role_map

Table [oidc.role_map]: claim value to role (admin, operator, restore, readonly). If several values match, the highest role wins.

empty

default_role

Role when no value is mapped. Empty: the sign-in is refused (403, "your account has no role in PDC-Backup").

empty

create_users

Creates accounts on first sign-in. Off: only already linked OIDC accounts may sign in.

false

label

Label of the sign-in button.

empty (shown as "single sign-on")

allow_http

Allows provider addresses with http://, for tests and lab setups only.

false

[oidc]
issuer = "https://auth.example.com/application/o/pdc/"
client_id = "pdc-backup"
client_secret = "…"          # empty for public clients (PKCE only)
redirect_url = "https://backup-pc:8443/api/v1/auth/oidc/callback"
scopes = ["profile", "email", "groups"]
role_claim = "groups"
create_users = true
label = "Company account"

[oidc.role_map]
"backup-admins" = "admin"
"family" = "restore"

What happens at sign-in

  • Accounts are linked by provider and subject (sub), not by name. On the first login the server creates the account (with create_users = true). The name comes from the claim; characters other than letters, digits, and . _ - @ become _, at most 64 characters. If the name is taken, the server appends -oidc; if that is taken too, the sign-in fails with a conflict.

  • The role follows the provider at every sign-in. If the provider changes the groups, the role changes at the next login. The rule "at least one active admin" still applies.

  • OIDC accounts have no local password and cannot sign in with a password. The second factor is up to the provider; in the user list they show the badge SSO.

  • A disabled account is refused (403).

  • The sign-in is bound to the browser that started it (cookie pdc_oidc, valid for 10 minutes, HttpOnly, Secure, SameSite=Lax). The server refuses a return from another browser (401).

  • Every sign-in is in the audit log (auth.login, detail oidc), new accounts as user.created_oidc (see section 11.4 Audit log).

Last updated Nov 15, 2026