Docs Version v0.2
Docs menu

Running in production

signari doctor

Changed 9 min readv0.2

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

AreaFindingSeverity
issuermissingcritical
issuerplaintext http:// on a real hostcritical
issuerplaintext on loopbackinfo: usual during development
issuertrailing slashwarning: iss is compared exactly
root keyneither SIGNARI_ROOT_KEY nor ..._REF setcritical
databasethe role SIGNARI_DSN signs in as, acts as or may SET ROLE to is a superuser or has BYPASSRLScritical. 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 APItoken shorter than 32 characterscritical
admin APIno token at allnot a finding: the API is off unless an address is given
mailno SMTP_HOST/MAIL_FROMwarning: no one can recover an account
keysnone, or none activecritical
keysno active RS256info: SAML needs one, and most SAML applications cannot verify ECDSA
clientsplaintext redirect URI on a non-loopback hostcritical
clientsenabled client not requiring Proof Key for Code Exchange (PKCE)warning
clientshybrid-flow exemption past the review date client set-hybrid recordedwarning
clientssigning algorithm (client set-alg) with no active key on its instancecritical: its tokens cannot be minted
claim mappersrequired_scope neither standard nor declared by the organisationwarning: the claim is released to no one
providersan enabled extension provider with no signing secretwarning: it is called without Signari-Signature and cannot tell this engine's calls from anyone else's; provider rotate gives it one
samlsign-out URL registered but no SP certificatewarning: every sign-out from it is refused
federationgeneric OpenID Connect (OIDC) provider allows sign-up with untrusted email verificationinfo: sign-up will always refuse
flowsa stored sign-in flow that does not loadcritical: the organisation runs the last flow that did, or the built-in one
flowsa sign-in flow that refuses a passkey sign-in where people hold passkeys, or a provider sign-in where a provider is enabledwarning: 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
authorizationa stored model that does not loadcritical: the engine evaluates the stored copy, so that organisation's decisions are failing
outboxnotices parked after exhausting retriescritical: sessions may still be live downstream
policynone in forceinfo: everything is open, which may be correct
themeSIGNARI_THEME_DIR unreadablecritical: every page falls back to the built-in one
themea page override was refusedwarning: that page works, but shows the built-in version, not yours
themethe directory overrides nothingwarning: usually a filename that does not match a page
themenot configurednot a finding: theming is optional
themea loaded language is incompletewarning: 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.

CheckWhat it looks atAt worst
issuer URLWhether an issuer is set, served over HTTPS, and written without a trailing slashcritical
root keyWhether a root key is configured and loadscritical
admin API tokenThe length of SIGNARI_ADMIN_TOKEN, when one is setcritical
admin API tokensScoped admin tokens expiring within 14 days, tokens never used in 30, and an Admin API reachable only with the environment tokenwarning
outbound mailWhether SMTP is configured, without which account recovery cannot send emailwarning
email second factorCodes by email enabled with no way to send email, which locks people out mid sign-incritical
text messagesThe SMS settings serve would refuse, the gateway in use, and SMS allowed to every countrycritical
notification channelsActive accounts with only an email address to receive security noticesinfo
signing keysWhether there are signing keys and one is active, RS256 for SAML, and keys smaller than Signari makescritical
credential lifetime against key retentionSettings that keep retired signing keys published longer, because a credential they signed lives longerinfo
OAuth clientsPlaintext redirect URIs, clients without PKCE, overdue hybrid-flow exemptions, and signing algorithms with no active keycritical
client profilesClients that have left the security profile they are held to, so the token endpoint refuses themwarning
mutual-TLS clientsClients registered for tls_client_auth with no authority to check their certificates againstcritical
SAML service providersProviders that require signed requests but have no certificate to verify them, which refuses every sign-in through them, and sign-out URLs with no certificatecritical
SAML certificate expiryHow long the SAML signing certificate has before it expirescritical
external sign-in providersGeneric OIDC providers that allow sign-up while not trusting their own email verificationinfo
delivery queueSign-out notices and security events that ran out of retries and were parkedcritical
access policyWhether any access policy is in force, and policies that ask about a country or a network with no database configured to answerwarning
sign-in flowsStored sign-in flows that do not load, branch on a condition no provider answers, or refuse a passkey or provider sign-in people usecritical
claim mapper scopesClaims released only for a scope nobody defined, so they reach nobodywarning
provider signingExtension providers called without a signing secretwarning
extension hooksExtension providers registered on a hook nothing consultswarning
authorization modelsStored authorization models that do not loadcritical
grants to groupsRelations granted to groups that do not exist, which a group made later under that name would holdwarning
outpostsEnabled Lightweight Directory Access Protocol (LDAP) and Remote Authentication Dial-In User Service (RADIUS) outposts not heard from for three minutes, three missed heartbeatswarning
password-only bindsOrganisations where LDAP, RADIUS PAP or an outpost accepts a password alone, whatever the sign-in flow askswarning
authenticator modelsA SIGNARI_FIDO_MDS_PATH that cannot be readwarning
approved authenticator modelsA passkey allow-list with no FIDO catalogue to check against, which refuses every registrationwarning
passwordsPassword hash settings serve would refuse, hashes made with a pepper no longer configured, and hashes still to move to the current cost or peppercritical
fipsWhat FIPS 140-3 mode would refuse here, and passwords still hashed outside the modulecritical
subject erasureHow much personal data is sealed under per-person keys that erasure destroysinfo
tenant isolationOrganisation-scoped tables without row-level security forced on their ownercritical
database roleA database role that is, acts as or may become a superuser or a BYPASSRLS rolecritical
PostgreSQL versionA PostgreSQL older than 16, or newer than this release was tested oncritical
query modeThe two pgx query modes the engine does not work incritical
schema against its ledgerWhether the live schema still matches what the last migration recordedcritical
schema fingerprint pinningWhether this binary was built pinned to its schema's fingerprintwarning
audit chainWhether the audit trail verifies, as an export would judge itcritical
janitor backlogSessions and codes long past their end, which mean no node is sweepingwarning
table growthThe largest tablesinfo
page themeAn unreadable theme directory, refused overrides, overrides that match no page, and incomplete languagescritical

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.