Tokens
Oversee the tokens of the installation: list and revoke them, give service accounts technical tokens, set lifetimes and bind tokens to endpoints.
On this page
Token types
| Type | Prefix | Owner | Created by |
|---|---|---|---|
| Personal access token | qdr_pat_ |
A user | The user alone (Personal access tokens) |
| Service-account token | qdr_sat_ |
A service account | An administrator; for an account of a project or repository also its Owners |
| CI token | qdr_cit_ |
A GitLab CI job | The token exchange, for minutes (GitLab CI federation) |
A token acts as its owner and its scope only narrows that. Quader keeps its SHA-256, never the value.
The Tokens screen
- Who
admin,security-adminandauditorread;adminandsecurity-adminrevoke
Admin area › Identity › Tokens lists every token. Filters narrows by Owner, Type, State (Active first),
Expires before and Not used for (days), which also lists tokens never used. The last use is written at most every
auth.tokens.last_used_granularity (5 minutes), so it may lag a little.
- Revoke on a row, or Revoke selected, after a confirmation.
- Revoke by value takes a leaked token's value. Only an administrator learns whose it was; anyone else gets the same neutral answer, so the field tests no guesses.
- A token with the administrator scope whose owner lost the role shows Administrator rights inactive; it works again when the role returns.
Tokens of users and service accounts
A user's page lists the user's tokens with Revoke, and Revoke all tokens under Advanced. Nobody creates a personal token
for somebody else. A disabled user's tokens answer 401 principal_disabled until the user is enabled, unless they were revoked with it.
A service account has one technical token per system that uses it, under Technical tokens on its page:
| Act | What it does |
|---|---|
| New technical token | A name (fixed, such as nightly-mirror), a description and the fields of a personal token; the value is shown once |
| Rotate | A new secret; the old one ends Not at all (revoked now), after One hour or One day |
| Revoke | Ends the secret; the token stays, listed under Expired and revoked technical tokens |
| Issue new secret | A new value for an ended token, same name and download limit |
| Set limit | The token's own download limit (Download limits) |
An account holds at most 100 technical tokens. Creating, rotating and issuing need the admin role and a recent sign-in, or a token of
the account itself.
Tokens an Owner issues (for a project's or repository's account) always expire, within the maximum of service-account tokens, carry no administrator scope and no system item, and never rotate themselves: an Owner revokes and issues a new secret.
From the command line, with the installation's configuration:
# example; prints only the value
quader admin token create --service-account ci-builds \
--ttl 720h --scope-file scope.json
quader admin token revoke --value-stdin < leaked.txt
token create lives 15 minutes unless --ttl says otherwise; --service-account also takes web/partner or
web/npm-internal/release, and --replace replaces a live secret.
Scopes
A scope is a ceiling on the owner's permissions; it never grants. Its members:
| Member | Meaning |
|---|---|
inherit |
All repository permissions of the owner |
repositories |
Up to 50 grants of repositories (always with their project, web/npm-internal, */npm-*, @any), package or path patterns, actions |
admin |
The owner's system roles while the owner holds admin, and its Owner role in projects |
system |
Listed capabilities of those the owner's roles grant, such as content:metadata-read |
endpoints |
Up to 16 endpoints the token is valid on |
The token form offers inherit, inherit with admin for an administrator, or one grant. A scope without inherit reaches nothing of
the owner's own account but itself and the tokens created from it. A token can create a token of the same owner with no broader scope,
no later expiry and no more endpoints (403 derivation_exceeds_parent); it is revoked with its parent.
Lifetime limits and defaults
Admin area › Settings › Authentication, section Token lifetimes, holds for Personal tokens and Service account tokens the Default lifetime (days) and Maximum lifetime (days), and the Expiry notice. The ceilings come from the configuration:
| Key | Default |
|---|---|
auth.tokens.pat.default_ttl, auth.tokens.sat.default_ttl |
2160h (90 days) |
auth.tokens.pat.max_ttl, auth.tokens.sat.max_ttl |
8760h (one year), the ceiling of the screen's maximum |
auth.tokens.sat.allow_non_expiring |
false; only an administrator creates such a token |
auth.tokens.max_active_per_principal |
pat: 50, sat: 20 |
A lifetime above the maximum is refused (ttl_exceeds_maximum), never shortened. A lowered maximum survives a restore to an earlier
point. All keys: auth.
Binding tokens to endpoints
Each endpoint decides which credentials it accepts, under server.endpoints.<name>.auth:
| Key | Endpoint default |
Further endpoints |
|---|---|---|
token_types |
[pat, sat, cit] |
[sat] |
bound_tokens_only |
false |
true |
anonymous |
true, the ceiling of Public |
false |
A token with endpoints works only there; list default to keep the main address. The form shows Endpoints to whoever may read
them, offering those that accept the token's type; the binding is fixed and kept on rotation. A binding to an endpoint that refuses the
type answers 400 invalid_scope. A refused credential answers 401 invalid_token
(Endpoints).
Revocation and its propagation
A token is revoked by its owner, a holder of tokens:revoke, anyone with its value (POST /api/v1/tokens/revoke) or
quader admin token revoke. It is final.
- Tokens created from it go with it; a revocation by value also follows its rotations.
- Every replica refuses it within
auth.revocation_bound(2 seconds), also without Valkey. - A storage failure answers
503, never401, so clients keep working tokens. - Its row is deleted
auth.tokens.retention_after_end(90 days) after it ended; the audit log keeps its history.
Token events (token.created, token.rotated, token.revoked, token.expiring, token.rejected) never hold a value
(Audit events). The expiry notice is an event, not a mail.
Protection against guessing
Rejected credentials are counted per client address across all replicas. Above auth.rate_limit.failures_per_address (300 a
minute) an address gets 429 rate_limited for credentials not seen recently, while tokens validated within
recent_token_window keep working. List a build farm behind one address in auth.rate_limit.exempt_cidrs. A token as the password of
HTTP Basic works while auth.clients.basic.enabled is on (the default).