Running in production
signari doctor
On this page
Introduction
A deployment can start without complaint and still be wrong: an issuer served
over plain HTTP, an unset root key, or password-reset email that only ever
reaches a log file. signari doctor checks the whole deployment at once. For each
problem it finds, it says what is wrong, why it matters and what to do.
It exits with a non-zero status when it finds anything critical, so a deploy script or a scheduled job can stop on it. Run it with the same settings the engine uses:
Shellsignari doctor # exit 1 if anything critical is found
Why
Several commands each check one feature. proxy check checks that the
forward-auth route is protected. scim verify checks that a deprovisioned person
is gone from the downstream application. policy test checks that the rules
match their stated intent.
signari doctor checks whether the deployment as a whole is sound. That covers
configuration that otherwise goes unchecked until it fails: an issuer served over
plaintext, an unset root key, a Security Assertion Markup Language (SAML)
provider whose sign-out is refused, or recovery email that goes only to a log
file.
Output
Findings first, ranked, each with what is wrong, why it matters, and what to do:
Text [CRITICAL] issuer the issuer is plaintext HTTP: every token, code and client secret in the flow crosses the network readable fix: serve over HTTPS and set SIGNARI_ISSUER to the https:// URL [CRITICAL] root key no root key is configured fix: set SIGNARI_ROOT_KEY to base64 of 32 random bytes. It wraps every stored private signing key; without it nothing can be unsealed [CRITICAL] logout delivery 364 notice(s) have exhausted their retries and been parked fix: these are logouts and security events that never reached the relying party. Those sessions may still be live at the application. Inspect core.outbox last_error [warning ] mail no SMTP is configured, so account recovery cannot send email checked: issuer URL, root key, admin API token, outbound mail, signing keys, OAuth clients, SAML service providers, external sign-in providers, delivery queue, access policy 3 critical, 1 warning, 0 info
Two properties of that output are deliberate.
Every finding carries a fix. A test, TestEveryFindingCarriesAFix, fails if
a finding above info has no Fix line.
A clean run still prints checked:. Without the list of what ran, a run that
found nothing would look the same as a run that checked nothing.
Exit status
signari doctor exits non-zero when anything critical is found, so it can gate a
deploy or run from cron:
Shellsignari doctor || { echo "refusing to deploy"; exit 1; }
Both cases were checked without a pipe, because a pipe reports the exit status of the last command in it:
Shell$ SIGNARI_ISSUER=http://auth.example.com signari doctor >/dev/null 2>&1; echo $?1$ SIGNARI_ISSUER=https://auth.signari.dev SIGNARI_ROOT_KEY=... signari doctor >/dev/null 2>&1; echo $?0
Warnings and info do not fail the run. You should fix them soon, but they do not block a release.
What it checks
| Area | Finding | Severity |
|---|---|---|
| issuer | missing | critical |
| issuer | plaintext http:// on a real host | critical |
| issuer | plaintext on loopback | info: usual during development |
| issuer | trailing slash | warning: iss is compared exactly |
| root key | neither SIGNARI_ROOT_KEY nor ..._REF set | critical |
| database | the role SIGNARI_DSN signs in as, acts as or may SET ROLE to is a superuser or has BYPASSRLS | critical. The reason is not row-level security, which lets signari_engine read every organisation by design. Such a role gives a compromised engine, or one SQL injection, powers it never needs: running programs and reading files on the database server (COPY ... PROGRAM, pg_read_server_files), changing its configuration (ALTER SYSTEM), every database on the cluster, and with BYPASSRLS every row-level policy on every table it may read. serve reads the same variable and refuses to start on the same answer, from the same query, unless -allow-rls-bypass or SIGNARI_ALLOW_RLS_BYPASS=1 says otherwise; this finding is how a deployment that does so is still told. Serve as signari_engine, which signari setup sets up (Serving as signari_engine) |
admin API | token shorter than 32 characters | critical |
admin API | no token at all | not a finding: the API is off unless an address is given |
no SMTP_HOST/MAIL_FROM | warning: no one can recover an account | |
| keys | none, or none active | critical |
| keys | no active RS256 | info: SAML needs one, and most SAML applications cannot verify ECDSA |
| clients | plaintext redirect URI on a non-loopback host | critical |
| clients | enabled client not requiring Proof Key for Code Exchange (PKCE) | warning |
| clients | hybrid-flow exemption past the review date client set-hybrid recorded | warning |
| clients | signing algorithm (client set-alg) with no active key on its instance | critical: its tokens cannot be minted |
| claim mappers | required_scope neither standard nor declared by the organisation | warning: the claim is released to no one |
| providers | an enabled extension provider with no signing secret | warning: it is called without Signari-Signature and cannot tell this engine's calls from anyone else's; provider rotate gives it one |
| saml | sign-out URL registered but no SP certificate | warning: every sign-out from it is refused |
| federation | generic OpenID Connect (OIDC) provider allows sign-up with untrusted email verification | info: sign-up will always refuse |
| flows | a stored sign-in flow that does not load | critical: the organisation runs the last flow that did, or the built-in one |
| flows | a sign-in flow that refuses a passkey sign-in where people hold passkeys, or a provider sign-in where a provider is enabled | warning: a sign-in's proving stage must be the proof presented, so a flow naming only password refuses both; see a sign-in's proving stage |
| authorization | a stored model that does not load | critical: the engine evaluates the stored copy, so that organisation's decisions are failing |
| outbox | notices parked after exhausting retries | critical: sessions may still be live downstream |
| policy | none in force | info: everything is open, which may be correct |
| theme | SIGNARI_THEME_DIR unreadable | critical: every page falls back to the built-in one |
| theme | a page override was refused | warning: that page works, but shows the built-in version, not yours |
| theme | the directory overrides nothing | warning: usually a filename that does not match a page |
| theme | not configured | not a finding: theming is optional |
| theme | a loaded language is incomplete | warning: that language's pages render half in English |
A refused override shows up as a page that looks normal. Signari does not stop
for one: it serves the built-in page and logs the refusal. Without these checks,
the only evidence is a log line at startup. A stock sign-in form looks the same
whether the override was refused, the directory is wrong, or you edited the wrong
file. signari theme check catches it earlier still.
The three tables that arrived in later migrations (saml_providers,
identity_providers, access_policies) are probed first and skipped if absent,
so the command still runs against an older schema instead of failing. Those
checks are then not listed in checked:.
Every check
The table above gives the common findings. This one lists every check doctor
runs, by the name the checked: line prints, with the most serious finding each
can make. A test, TestEveryDoctorCheckIsDocumented, fails the build when a check
exists that this table does not name, or this table names one that does not exist.
| Check | What it looks at | At worst |
|---|---|---|
issuer URL | Whether an issuer is set, served over HTTPS, and written without a trailing slash | critical |
root key | Whether a root key is configured and loads | critical |
admin API token | The length of SIGNARI_ADMIN_TOKEN, when one is set | critical |
admin API tokens | Scoped admin tokens expiring within 14 days, tokens never used in 30, and an Admin API reachable only with the environment token | warning |
outbound mail | Whether SMTP is configured, without which account recovery cannot send email | warning |
email second factor | Codes by email enabled with no way to send email, which locks people out mid sign-in | critical |
text messages | The SMS settings serve would refuse, the gateway in use, and SMS allowed to every country | critical |
notification channels | Active accounts with only an email address to receive security notices | info |
signing keys | Whether there are signing keys and one is active, RS256 for SAML, and keys smaller than Signari makes | critical |
credential lifetime against key retention | Settings that keep retired signing keys published longer, because a credential they signed lives longer | info |
OAuth clients | Plaintext redirect URIs, clients without PKCE, overdue hybrid-flow exemptions, and signing algorithms with no active key | critical |
client profiles | Clients that have left the security profile they are held to, so the token endpoint refuses them | warning |
mutual-TLS clients | Clients registered for tls_client_auth with no authority to check their certificates against | critical |
SAML service providers | Providers that require signed requests but have no certificate to verify them, which refuses every sign-in through them, and sign-out URLs with no certificate | critical |
SAML certificate expiry | How long the SAML signing certificate has before it expires | critical |
external sign-in providers | Generic OIDC providers that allow sign-up while not trusting their own email verification | info |
delivery queue | Sign-out notices and security events that ran out of retries and were parked | critical |
access policy | Whether any access policy is in force, and policies that ask about a country or a network with no database configured to answer | warning |
sign-in flows | Stored sign-in flows that do not load, branch on a condition no provider answers, or refuse a passkey or provider sign-in people use | critical |
claim mapper scopes | Claims released only for a scope nobody defined, so they reach nobody | warning |
provider signing | Extension providers called without a signing secret | warning |
extension hooks | Extension providers registered on a hook nothing consults | warning |
authorization models | Stored authorization models that do not load | critical |
grants to groups | Relations granted to groups that do not exist, which a group made later under that name would hold | warning |
outposts | Enabled Lightweight Directory Access Protocol (LDAP) and Remote Authentication Dial-In User Service (RADIUS) outposts not heard from for three minutes, three missed heartbeats | warning |
password-only binds | Organisations where LDAP, RADIUS PAP or an outpost accepts a password alone, whatever the sign-in flow asks | warning |
authenticator models | A SIGNARI_FIDO_MDS_PATH that cannot be read | warning |
approved authenticator models | A passkey allow-list with no FIDO catalogue to check against, which refuses every registration | warning |
passwords | Password hash settings serve would refuse, hashes made with a pepper no longer configured, and hashes still to move to the current cost or pepper | critical |
fips | What FIPS 140-3 mode would refuse here, and passwords still hashed outside the module | critical |
subject erasure | How much personal data is sealed under per-person keys that erasure destroys | info |
tenant isolation | Organisation-scoped tables without row-level security forced on their owner | critical |
database role | A database role that is, acts as or may become a superuser or a BYPASSRLS role | critical |
PostgreSQL version | A PostgreSQL older than 16, or newer than this release was tested on | critical |
query mode | The two pgx query modes the engine does not work in | critical |
schema against its ledger | Whether the live schema still matches what the last migration recorded | critical |
schema fingerprint pinning | Whether this binary was built pinned to its schema's fingerprint | warning |
audit chain | Whether the audit trail verifies, as an export would judge it | critical |
janitor backlog | Sessions and codes long past their end, which mean no node is sweeping | warning |
table growth | The largest tables | info |
page theme | An unreadable theme directory, refused overrides, overrides that match no page, and incomplete languages | critical |
What it does not do
It does not reach the network. It reads configuration and the database, so it is
safe to run against production and cheap enough for cron. To check the view from
outside (that the discovery document is reachable and the forward-auth route is
protected), use proxy check and the conformance runbook, which need a live
endpoint and a real client.