Operator sign-in (SSO)
Operators can sign in at their organization’s identity provider instead
of holding a long-lived client certificate from the operators’ PKI.
ferritor login --oidc signs them in with the OAuth 2.0 device flow, and
the server exchanges the provider’s ID token for a short-lived client
certificate, as it does a workload’s token
(workload identity). The certificate names
the person (sso/admins/alice), the group they’re in decides the
identity’s prefix, and config rules grant that prefix admin actions with
a pattern (sso/admins/*). The audit log names the person in every entry.
operator identity provider ferritor (exchange listener) │ ferritor login --oidc │ │ │ ── device code request ─────► │ │ │ ◄── a code and an address ─── │ │ │ (approve in any browser: sign in, enter the code) │ │ ── poll ────────────────────► │ │ │ ◄── ID token ──────────────── │ │ │ ── ID token + CSR ───────────────────────────────────────────► │ verify, map groups, audit │ ◄── certificate (2 h) ──────────────────────────────────────── │Secured mode only, with [identity] set up
and an issuing CA (ferritor identity init).
At the identity provider
Section titled “At the identity provider”Any OpenID Connect provider with the device authorization grant (RFC 8628) will do. Create a client for the CLI:
- public (no client secret: the CLI runs on people’s machines), with the device authorization grant allowed;
- its ID tokens’ audience is the client’s ID, which the server’s issuer then expects;
- the ID token carries a claim naming the person that the provider keeps
unique and never reassigns, and that fits in one path segment
(letters, digits,
.,_,-; an email address, with its@, maps to nothing), and the person’s groups, a list of names (oftengroups; some providers add it only with a scope or a mapper of their own). OpenID Connect doesn’t promisepreferred_usernameis either: use it only where your provider does (unique per realm or tenant, not reusable after a deletion), elsesubor a claim of the provider’s that is. Two people mapped to one identity share its grants, its cutoffs and its audit entries; - sign-in with multi-factor authentication: whoever signs in as an admin group’s member is an operator.
The provider’s discovery document must be at
<issuer>/.well-known/openid-configuration and name the device
authorization endpoint.
The server
Section titled “The server”A login issuer in ferritor.toml, its mappings from groups to identity
prefixes, and config rules for those prefixes:
[[identity.issuer]]name = "sso"issuer = "https://idp.example.com/realms/corp" # the ID tokens' iss, exactlyaudience = "ferritor-cli" # the CLI's client IDjwks_url = "https://idp.example.com/realms/corp/protocol/openid-connect/certs"login = true # people: config rules may name themlifetime_secs = 7200 # the default for a login issuer
# The first mapping whose group the person is in decides: admins first.[[identity.issuer.map]]identity = "sso/admins/{preferred_username}"require = [{ claim = "groups", one_of = ["ferritor-admins"] }]
[[identity.issuer.map]]identity = "sso/readers/{preferred_username}"require = [{ claim = "groups", one_of = ["ferritor-readers", "sre"] }]
[[policy]]name = "sso-admins"identity = "sso/admins/*"actions = ["status", "init", "unseal", "seal", "rekey", "rotate", "rewrap", "purge", "destroy_kek", "namespace", "policy", "identity", "schedule"]
[[policy]]name = "sso-readers"identity = "sso/readers/*"actions = ["status", "read", "list"]all_paths = truelogin = trueis what lets config rules name the issuer’s identities, admin actions included. A workload issuer’s never may: the server refuses to start.- A
requireon a list claim (groups) holds when any item is one ofone_of; the audit entry of the exchange records the group that matched and the username. Someone in no listed group gets no certificate (TOKEN_REFUSED). sso/admins/*grants every identity belowsso/admins, by whole segments (identity patterns), so adding a person to the group is all it takes. Stored policies may use patterns too, for secret actions.- Settings reload on SIGHUP, as for every issuer (configuration).
Signing in
Section titled “Signing in”export FERRITOR_ADDR=https://ferritor.internal:7070 FERRITOR_CA=ca.pemexport FERRITOR_EXCHANGE=https://ferritor.internal:7071export FERRITOR_OIDC_ISSUER=https://idp.example.com/realms/corp FERRITOR_OIDC_CLIENT_ID=ferritor-cli
ferritor login --oidc --cert-out me.pem --key-out me-key.pem# To sign in, open https://idp.example.com/…/device?user_code=WDJB-MJHT# (or https://idp.example.com/…/device and enter the code WDJB-MJHT).# Waiting for the sign-in to be approved…# identity: sso/admins/alice# expires: 2026-12-04T16:02:11Z
ferritor --cert me.pem --key me-key.pem statusOpen the address in any browser, on any device: nothing listens on the
machine running the CLI, so it works over SSH. The CLI polls until the
sign-in is approved, refused, or its code expires (the provider decides
how long: usually minutes). --oidc-scope asks for more scopes past
openid (repeatable; FERRITOR_OIDC_SCOPES, space-separated) where the
provider puts groups behind one. --oidc-ca (FERRITOR_OIDC_CA) verifies
a provider with a private CA; by default the public web PKI roots do.
Every address the provider gives must be https://.
The key is written as ferritor login always writes it (yours alone), and
the ID token goes nowhere but the exchange: not to the terminal, a file
or a log.
How long, and cutting someone off
Section titled “How long, and cutting someone off”A login issuer’s certificates live lifetime_secs (two hours by
default, 60 seconds to a day) from the sign-in, even past the ID token’s
own exp, which providers set to minutes; then sign in again. The ID
token must still be valid at the exchange, and every check of
revoking applies on every request:
- someone removed at the provider, or from a group, keeps their
certificate until it expires; to end it at once, add a cutoff for them
(
[[identity.revoke]],identity = "sso/admins/alice") and SIGHUP. It refuses their certificates issued before it, and their ID tokens issued before it too (byiat): a token from before the cutoff, still carrying the groups they had, buys no new certificate. A sign-in after it gets one, with whatever the provider says then; - a cutoff for the whole issuer (its
not_before) does the same for everyone; removing the issuer ends every sign-in; - sealing ends them all, as every exchanged certificate.
What a login issuer means for the security model, an identity
provider’s admins being operators among it, is in
the security model.