Security
Sovrain holds the keys to everything a company uses, so security reports go to the front of the queue.
How Sovrain protects your data
This describes the Sovrain service and its source code as it is today. Where you see the name of an algorithm, it is the one the code uses.
One database per company
- Each organization is its own SQLite database file. The server picks the file from the address a request comes to, so a request for one company is answered from that company’s file alone.
- An export holds signing keys and password hashes, so Sovrain asks you to encrypt it (with age, X25519) or to confirm that you will keep it safe.
Keys and encryption at rest
- A master key (32 bytes) wraps one key per organization, and that key wraps the rest: the SAML and OpenID Connect signing keys, the SCIM tokens, the authenticator-app secrets and the import key. All are sealed with AES-256-GCM.
- The master key lives only in the server’s memory. The data directory holds just its fingerprint, and a server started with another key refuses to start.
- TLS certificates come from Let’s Encrypt. Their private keys are stored under the same master key.
Passwords and sign-in
- Passwords are hashed with bcrypt at cost 12. A sign-in for an account that does not exist costs the same work, so it does not reveal who has an account.
- Session, link and API tokens are random values of at least 256 bits. The server stores only their SHA-256, never the token itself.
- The session cookie is
HttpOnly,SecureandSameSite=Lax; the cookie for a pending second step isSameSite=Strictand lasts six minutes. Forms carry a CSRF token signed with HMAC-SHA-256. - Sign-in, password reset, two-step and single sign-on requests are rate-limited per address; sign-in and password reset also per account name typed in.
- Pages cannot be shown inside another site’s frame, and pages for a signed-in person are not cached.
Two-step sign-in
- Authenticator apps (TOTP, RFC 6238, six digits, 30 seconds). Each code works only once.
- Passkeys and security keys (WebAuthn Level 3) with ES256, EdDSA and RS256 keys.
- Backup codes, stored as scrypt hashes.
- An organization can require two-step sign-in for everyone, for one group or for one app.
Single sign-on
- OpenID Connect tokens are signed with RS256, and only RS256 tokens are accepted. PKCE accepts only S256. Redirect addresses must match the registered ones exactly.
- SAML responses are signed with RSA-2048 or ECDSA (P-256, P-384, P-521). Incoming SAML signatures must use SHA-256 or stronger: SHA-1 is refused.
- The XML reader refuses DOCTYPEs and custom entities, which closes the classic XML attacks (XXE, “billion laughs”).
- When Sovrain fetches a URL you give it (SAML metadata, a SCIM endpoint, a sign-out address), it refuses private and internal addresses and connects only to the address it checked.
Password manager
The password manager is in internal testing.
- Everything is encrypted and signed in your browser; the server stores ciphertext and checks only its shape.
- Entries and files use AES-256-GCM. Sharing uses X-Wing, a key exchange that combines X25519 with the post-quantum ML-KEM. Signatures combine Ed25519 with the post-quantum ML-DSA-65, and both must verify.
Report a vulnerability
Thank you for looking. Email contact@warsawdynamics.com with “Security” in the subject.
Please include:
- what is affected: the service at sovrain.net, a self-hosted release (with its version), or this website,
- the steps that show the problem, with requests and responses where you have them,
- what an attacker could do with it.
Do not report a vulnerability in a public place, such as a GitHub issue or Discord, before it is fixed.
What we do
- We confirm your report within 3 working days.
- We tell you what we found and when we expect a fix.
- We fix the problem, release the fix for self-hosted installations and tell you when it is out.
- With your agreement, we name you in the release notes.
Testing in good faith
If you follow this policy, we will not take legal action against you for your research. In return, please:
- test only on an organization you created yourself, never on another company’s data,
- stop as soon as you reach data that is not yours, and do not keep it,
- do not run denial-of-service attacks, spam or social engineering against our people,
- give us reasonable time to fix the problem before you publish it.
Out of scope
- Reports from automated scanners without a working example.
- Missing security headers or settings that do not lead to an attack.
- Attacks that need a device the attacker already controls.
The machine-readable version of this policy is at /.well-known/security.txt.