Quader Docs 0.176.0

Sign-in and identities

Connect an OpenID Connect provider, turn its claims into users and groups, keep a break-glass administrator, and manage users, groups and service accounts.

On this page

Where the settings live

People sign in through an OpenID Connect provider such as Keycloak, Dex or GitLab; machines use service-account tokens; one local break-glass account covers recovery.

What Where Applies
Providers, claims, group synchronization auth.oidc When a replica starts; a client secret file when it changes
Sessions, sign-in page, break-glass account auth.sessions, auth.login_page, auth.break_glass When a replica starts
Default and restricted visibility levels Admin area › Settings › General For every level set from then on
New users are external, token lifetimes Admin area › Settings › Authentication Within seconds, on every replica
Users, groups, service accounts Admin area › Identity Within seconds, on every replica

Every key with its default is in the reference (auth).

Connect an OpenID Connect provider

Who
the operator, in the configuration or the Helm values
  1. Set server.base_url to the address people use.
  2. At the provider, create a confidential client for the authorization code flow with the redirect URI https://quader.example.com/auth/oidc/<provider-id>/callback and, for sign-out, https://quader.example.com/ui/logged-out.
  3. Make the ID token or the userinfo answer carry the username claim and, for group synchronization, a groups claim.
  4. Configure the provider, then check Admin area › Settings › Authentication: each provider shows discovery document loaded.
yaml
auth:
  login_page:
    # default: straight to the provider when it is the only one;
    # /ui/login?auto_sign_in=false shows the page anyway
    auto_redirect: true
  oidc:
    providers:
      corp:                    # example: the ID, ^[a-z0-9][a-z0-9-]{0,31}$
        display_name: Corporate SSO # example; required: the button's text
        issuer: https://login.example.com/realms/acme  # example; required
        client_id: quader           # example; required
        # example; re-read when it changes (or client_secret_env)
        client_secret_file: /var/run/secrets/quader/oidc-corp/client-secret
        # default; or client_secret_post, none
        client_auth_method: client_secret_basic
        # default; add the scope that releases the groups claim
        scopes: [openid, profile, email]
        order: 0                    # default: the position of the button
        extra_auth_params: {}       # default
        # default; none and HS* are always refused
        allowed_signing_algs: [RS256, PS256, ES256]
        trusted_audiences: []       # default: audiences besides client_id
        clock_skew: 60s             # default; 0s to 5m
        max_id_token_age: 10m       # default; 1m to 24h
        use_user_info: true         # default
        discovery_refresh: 24h      # default
        rp_initiated_logout: true   # default: end the provider session
        claims:
          username: preferred_username  # default; a.b reads a nested claim
          email: email              # default
          display_name: name        # default
          groups: groups            # default
        username_prefix: ""         # default
        sync_username: true         # default: rename when the claim changes
        jit: true                   # default: create users at first sign-in
        require_verified_email: false  # default
        login_requires_groups: []   # default: admit only these group values
        # default; gitlab.com and accounts.google.com are always public
        public_issuer: false

With the Helm chart, list the provider under secrets.oidc with its Kubernetes Secret: the chart mounts it and sets client_secret_file (Configuration). Quader uses the code flow with PKCE, state and nonce.

Users from claims

The username claim is prefixed, normalized to lower case and must match ^[a-z0-9][a-z0-9._@+-]{0,127}$. E-mail and display name are updated at every sign-in. A first sign-in resolves in this order:

  1. The identity (issuer and subject) is linked to a user: that user signs in.
  2. A user pre-provisioned with this username and a pending link to this provider: the link completes.
  3. Another user holds the username: refused (username_taken).
  4. jit is on: a new user, joining every group with auto-join.
  5. Otherwise refused (not_provisioned).

For a public issuer Quader refuses to start with jit on and login_requires_groups empty, since anyone could become a user; there a match_regex rule starts with a literal namespace such as acme/.

A user of the identity provider or created by an administrator who has not signed in for auth.users.dormancy_period (90 days) is warned in the audit log (user.dormancy_warning) and then disabled by the nightly task user-dormancy. The tokens stay and answer 401 principal_disabled; the next sign-in through the provider enables the user again. The last administrator is never disabled.

Group synchronization

At every sign-in, the user's memberships from a provider become exactly the groups its rules produce. A rule has match (exact) or match_regex (the whole value; $1 in group). Manual and auto-join memberships stay untouched; without rules nothing is synchronized.

yaml
auth:
  oidc:
    providers:
      corp:
        group_sync:
          enabled: true                  # default
          # default: clear removes the provider's memberships,
          # keep leaves them, deny refuses the sign-in
          on_missing_claim: clear
          create_groups: false      # default: join only existing groups
          rules:
            - match: quader-admins       # example: a claim value
              group: platform-admins     # example: a Quader group
            - match_regex: "acme/team-(.+)"   # example
              group: "team-$1"           # example
What happens Shown as
The groups claim stops arriving Group claim missing at sign-in (user.groups.claim_missing), once per user and reason; a warning on the user's Groups
It is back Group claim back at sign-in (user.groups.claim_returned)
A rule yields no valid group name Invalid group name skipped at sign-in (user.groups.result_skipped), the user gets no group for it

A membership change at the provider reaches Quader at the user's next sign-in.

Administrators from the Helm values

config.authz.role_bindings declares which Quader group, user or service account holds a system role; quader migrate applies the list at every install and upgrade.

yaml
config:
  authz:
    role_bindings:
      # example; or security-admin, auditor, repository-admin, webhook-admin
      - role: admin
        # example: the Quader group a sync rule produces;
        # or user: or service_account:, exactly one
        group: platform-admins
  • A missing group is created empty, so the binding holds before anyone signs in; a missing user or service account fails the Job.
  • System roles shows these bindings as Helm configuration, without Unbind; an entry removed from the list is unbound at the next upgrade, but never the last administrator while the break-glass account is disabled.
  • Whoever changes the group at the provider decides who administers Quader. After an upgrade, the Job's log says role bindings of the configuration applied.

Sessions

A browser session ends after auth.sessions.idle_timeout (1 hour) without a request or absolute_timeout (12 hours). Minting credentials, changing policies, roles, exposure rules or authentication settings, deleting a repository and changing package owners need a sign-in within recent_auth_window (1 hour): Confirm it is you keeps what you entered. An ended session holds on all replicas within auth.revocation_bound (2 seconds).

The break-glass administrator

The one local account, admin by default, holds the admin role for the first setup and outages of the provider.

  1. Put a password of 20 characters or more, or an Argon2id hash, in a Kubernetes Secret and name it in secrets.breakGlass.existingSecret; without it the account is disabled.
  2. Sign in at https://quader.example.com/ui/login?auto_sign_in=false.
  3. Remove the Secret once an administrator signs in through the provider.
  • Five failed attempts in 15 minutes lock it for 15 minutes, from any address; Unlock on its user page or quader admin break-glass unlock ends that. Keep it disabled outside recovery.
  • Every sign-in, lock and unlock is a warning in the audit log (auth.breakglass.*). A rotated password ends its sessions.
  • Authentication settings shows whether the account can verify a password; an enabled account without a file refuses every sign-in.

Public content and requests without a credential

A request without a credential reads only what is Public in a Public project, with its open vulnerability findings, and only on an endpoint with auth.anonymous: true. It never writes; a refused request answers 401. While something is public, the application opens without a sign-in and offers Continue without signing in.

Internal and external users

Internal admits every signed-in person and every token, but external users with all their tokens. External user on a user's page sets the flag (identities:write); New users are external in Authentication settings sets it for every user created later. An external user reads what it is a member of, what a policy grants it and what is Public.

Users, groups and service accounts

Who
holders of identities:write change; identities:read reads
Screen What you do
Users New user pre-provisions an account with a pending link; a user's page corrects name and e-mail, has Add to group and End all sessions, and under Advanced disables (Also revoke all tokens of this user), unlocks or deletes
Groups New group; Add a member from a search. A group with Every user joins this group automatically holds no role and joins no project
Service accounts Accounts of no project, sa:<name>, with their technical tokens (Tokens); project accounts are their Owners' (Projects)

Nobody disables or deletes themself, nor the last administrator while the break-glass account is disabled (last_admin). A group a restore marks detached is no longer filled by the provider until Attach to group synchronization again.

For recovery, quader admin works on the database: break-glass unlock, sessions end, service-account create, user disable.

Every sign-in is recorded as auth.login.succeeded or auth.login.failed, whose reason the page Sign-in failed shows too:

Reason Cause
flow_expired, browser_mismatch, provider_mismatch, issuer_mismatch The sign-in took over 10 minutes, or its callback belongs to another browser's sign-in
id_token_invalid, id_token_expired, nonce_mismatch, userinfo_mismatch Compare allowed_signing_algs, clock_skew and the clocks
username_invalid, username_taken, not_provisioned A missing or reserved username, another user's name, or jit off without a pre-provisioned user
email_unverified, not_in_allowed_group, groups_claim_missing require_verified_email, login_requires_groups, on_missing_claim: deny
idp_error, token_exchange_failed, userinfo_failed, provider_unavailable The provider answered with an error, or not at all