Get started
Docs menu

Security

Security model

On this page

Introduction

Signari decides who signs in to your applications, so a weakness in it is usually a way to become somebody else. This page says what Signari protects, what it cannot protect, and what you must do yourself. It then gives the argument for those claims: who Signari defends against, where trust changes hands, and which design principles and reviews back each claim.

Note

To report a vulnerability, follow the security policy. This page explains the design and does not take reports.

What Signari protects

When Signari is deployed as these pages describe, you can expect the following:

  • Only the right person signs in. Passwords are stored as Argon2id hashes, never as text, or as PBKDF2 hashes when the engine runs in FIPS 140-3 mode. A hash brought in by an import is kept as it was until that person's first sign-in, which replaces it. Passkeys are bound to your sign-in address, so a look-alike site cannot use them. Failed passwords are limited to 30 every 15 minutes for each account and 20 every 5 minutes from each address, without locking the account.
  • Tokens cannot be forged or replayed for long. Every ID token and JSON Web Token (JWT) access token is signed with a key only Signari holds. Refresh tokens and opaque access tokens are random values that Signari stores only as hashes. Access tokens last five minutes by default. A spent refresh token presented again, outside the application's retry grace, ends every refresh token descended from the same grant, the "refresh family".
  • Secrets at rest stay sealed. Signing keys and directory bind passwords are encrypted with AES-256-GCM under the root key, which is kept outside the database. Secrets Signari must present to other servers, such as an upstream provider's client secret and tokens, are sealed under the root key too. Authenticator seeds, and attributes declared personal, are sealed under each person's own key, which is sealed under the root key in turn. Signari's own client secrets, refresh tokens, opaque access tokens and one-time codes are stored only as hashes. A stolen database backup reveals none of these. It does show what is stored in the clear: usernames, names, email addresses, attributes not declared personal, and group memberships.
  • Organisations stay apart. The console's role sees only the organisation it names, through PostgreSQL's row-level security (RLS). The engine's own role sees every organisation, because it must find an application before it knows which organisation the application belongs to. So the engine's queries name the organisation themselves, and a test fails any lookup by name that does not. A third role, signari_maintenance, bypasses RLS for work across organisations. It cannot sign in to the database, and is reached only by SET ROLE. See how Signari works.
  • Revocation is read on every request. Sessions and revocations come from the database on every request and are never cached, so a revoked session cannot be used from a stale copy. Signari's own endpoints and its introspection endpoint refuse a revoked token at once. An API that checks a JWT access token itself accepts it until it expires. If an API must hear of a revocation at once, give it opaque access tokens or have it use introspection.
  • Administration is separate and accountable. The Admin API listens on its own address and refuses plaintext HTTP unless you allow it explicitly. Each token names what it may change, and the most damaging changes can require a second administrator's approval. Every change is written to an audit trail that is a hash chain, and the chain's newest entry is signed every hour by default. An entry edited or removed in the database is detected, as long as you keep a signed head outside it: see signed audit heads.
  • Signari does not become a way into your network. Every HTTP call to an address that a request, another server or a stored setting can name goes through one dialler. It refuses private and internal addresses unless you name them, so a URL an attacker supplies cannot reach your internal services. Mail servers, directories, an audit syslog collector, guacd for remote access, a Vault or OpenBao transit engine and a tracing collector are addresses only you configure, and are dialled directly. The outbound communication inventory lists every connection.
  • An injected script does not run on the sign-in pages. They are served under a content security policy that starts from default-src 'none' and allows scripts only from Signari itself, not inline. A CAPTCHA, when you turn one on, adds its provider's addresses. The pages that hand a response to an application by posting a form run one inline script, allowed by a nonce made for that page alone. Cookies are Secure, HttpOnly and SameSite, and the session cookie carries the __Host- prefix.

What Signari cannot protect against

Some threats are outside what Signari can stop on its own. You should plan for these yourself:

  • Anyone who holds both the root key and the database can read every sealed secret. Keep them apart, as backing up and restoring describes.
  • A PostgreSQL superuser ignores row-level security. The engine never needs to run as one, and must not.
  • Whoever controls the machine running the engine can read the keys from its memory. Signing keys can live in a hardware security module (HSM) instead: see signing keys in a hardware module.
  • An Admin API token is as powerful as its scopes. Give each token the narrowest scopes it needs, and require approvals for erasure and ownership changes.
  • A phished password or one-time code works for whoever types it in. Passkeys resist phishing. Passwords, emailed codes and text messages do not.
  • Your applications' handling of tokens is outside Signari. Once an application holds a token, keeping it safe is the application's job.
  • Traffic floods. Signari limits guessing and its own resources. It does not absorb a network-level denial-of-service attack. Put it behind infrastructure that does.
  • Plain HTTP. Without a certificate, the engine serves plain HTTP and warns that sign-ins will not persist. Serve it over Transport Layer Security (TLS), directly or through a proxy you control.

What you must do

  • Keep the root key outside the database, back it up separately, and never commit it. See configuration.
  • Run the engine as signari_engine, never as a PostgreSQL superuser.
  • Serve every listener over TLS, and keep the Admin API on a private network.
  • Keep a signed audit head outside the database, through the audit stream or an export.
  • Run signari doctor after every change to a deployment, and fix what it reports.
  • Upgrade when a release fixes a vulnerability. Upgrading says how.
  • Verify a release's signature before you run it, as the security policy describes.

Who Signari defends against

AttackerWhat they wantWhere they start
A stranger on the internetTo sign in as someone, or to make Signari issue a token it should notThe sign-in pages and the OAuth and OpenID Connect endpoints
A malicious or compromised applicationTokens for people or scopes it was not givenA registered client, with its own credentials
A malicious site the person visitsTo act in the person's sessionThe person's browser
A person in one organisationAnother organisation's dataA valid account in their own organisation
An administrator of one organisationMore than their role allowsA valid Admin API token or console session
Someone with a database backupKeys, secrets and personal dataA copy of the database, without the root key
A server Signari callsTo use Signari to reach your internal networkA webhook, an upstream provider or a metadata URL it serves

Where trust changes hands

A "trust boundary" is a place where data passes from something less trusted to something more trusted. Signari checks everything that crosses one:

BoundaryWhat crosses itWhat Signari checks
Browser to the sign-in pagesForms, redirects and cookies from anyoneStrict input parsing, cross-site request forgery (CSRF) tokens, registered redirect URIs, Proof Key for Code Exchange (PKCE), the limits on guessing
Proxy to the engineThe client's address, as a proxy reports itA forwarded address is believed only from the proxies SIGNARI_TRUSTED_PROXIES names, since the limits on guessing count by address
Application to the token endpointCodes, refresh tokens and client credentialsClient authentication, one use per code, sender-constrained tokens where configured
Automation to the Admin APIChanges to configuration and peopleA token's scopes and organisation on every route, approvals, an audit entry for each change
Console to the databaseReads for the screensThe signari_admin role, with no privileges on the engine's tables and only views under RLS
Engine to the databaseEvery read and writeThe signari_engine role, never a superuser. It sees every organisation, so its queries name the organisation themselves
Engine to other serversWebhooks, upstream providers, metadata, text-message gateways, mail and directoriesOne dialler that refuses internal addresses for every HTTP call whose address can be chosen, TLS 1.2 or later with certificate verification, size limits on what comes back
Engine to your extensionsHook calls and their answersExtensions run outside the engine, and each one declares whether it fails open or closed
Outpost to the engineCredential questions from an outpost, which holds no database credentialsHTTPS, and the outpost's own token, which signari outpost rotate replaces
Directory protocols to the engineLightweight Directory Access Protocol (LDAP), Remote Authentication Dial-In User Service (RADIUS) and Kerberos requestsOff until configured. RADIUS requires its Message-Authenticator

Design principles

These are Saltzer and Schroeder's principles of secure design, and where Signari applies each:

PrincipleHow Signari applies it
Economy of mechanismOne dialler for every outbound HTTP call whose address a request or a stored setting can choose, one root key over everything Signari seals for itself to read back, one listener for administration
Fail-safe defaultsThe engine refuses to start without its root key, on a schema it was not built for, or with a key it cannot unwrap. The console's role sees no organisation it has not named
Complete mediationRevocations and administrator roles are read on every request, never cached, as decision records 7 and 12 in the repository's adr/ folder set out
Open designThe code, the reviews below and the conformance results are public. Nothing depends on an algorithm being secret
Separation of privilegeErasure and ownership changes can require two administrators (two-person approvals)
Least privilegeThe engine never runs as a superuser, the console has no privileges on the engine's schema (decision record 4 in adr/), and Admin API tokens are narrowed to scopes, organisations and objects
Least common mechanismEach person's authenticator seeds and personal attributes are sealed under their own key, and each organisation can be given its own budget of tokens and sign-ins a minute, so one cannot use up what another needs
Psychological acceptabilityA passkey is both the safest way to sign in and the quickest, and signari doctor names what to fix in plain words

Common weaknesses, and how they are countered

The code has been reviewed entry by entry against published standards and lists of common weaknesses. Each review names the mitigation, with the file and line or the test that guards it:

  • The Common Weakness Enumeration (CWE) Top 25 for 2025, the most dangerous weaknesses: injection, cross-site scripting, server-side request forgery, missing authorisation and the rest.
  • The Application Security Verification Standard 5.0 from the Open Worldwide Application Security Project (OWASP), requirement by requirement.
  • RFC 9700, the OAuth security best practice.
  • FAPI 2.0, the OpenID Foundation's security profile of OAuth for high-value APIs.
  • NIST SP 800-63B, the National Institute of Standards and Technology's guidance on passwords, second factors and sessions.

How the claims are kept true

Every change runs through checks that would catch a claim on this page going false:

  • The test suite, twice, and the race detector on the packages that do their work concurrently.
  • gosec, CodeQL and staticcheck on the code, govulncheck and composer audit on the dependencies. Security scanning lists what gosec, govulncheck and CodeQL found.
  • The seed inputs of the fuzz targets. Every parser that reads what a stranger sends, before anything about the sender is known, has one: see fuzzing.

Some checks run on a schedule or at release instead:

  • The OpenID Foundation's conformance suite runs every week from a fresh clone, and whenever its harness changes.
  • A release is rebuilt from its tag and must match byte for byte before it is signed.

Changed Signari v0.2