Skip to content

Security

How Authio stores passwords and secrets, protects its pages and sessions, stands up to attacks and records who did what, with the numbers the code uses.

This page describes the controls the product has today, with the numbers the code enforces. Where a control depends on how the environment or your realm is configured, it says so.

Passwords

A password is kept only as a hash, never in a form that can be read back: PBKDF2-HMAC-SHA512, with a random 128-bit salt and 210,000 iterations, the minimum OWASP recommends today for that algorithm. A hash written with fewer iterations is redone with the current count on the person’s next sign-in.

A sign-in with an account that does not exist pays the same verification cost as one with a real account, so the response time does not reveal which accounts exist.

Hashes from another provider

In a user migration, Authio accepts the hashes that describe themselves — PBKDF2 over SHA-256 or SHA-512, salted SHA-2 ({SSHA256} and {SSHA512}), bcrypt and Argon2id — within cost limits that stop a row of the file from asking for too much processing or memory on every attempt. On the first sign-in, the password is checked against the old hash and stored again in Authio’s own format. Hashes over SHA-1 or scrypt are not accepted: those people set a new password through password recovery.

Password rules

  • A new realm starts out requiring 15 characters, with an uppercase letter, a lowercase letter, a digit and a symbol, and refuses the person’s last 3 passwords. The realm’s administrator adjusts each rule; see Password rules.
  • The breached password check is optional per realm. A new password is looked up in Have I Been Pwned through k-anonymity: only the first 5 characters of its SHA-1 hash leave Authio. If the lookup does not answer, the password is accepted rather than locking anyone out.
  • Your console team has a floor that no setting loosens: recent passwords cannot be reused, and a password expires after 90 days at most.

Stored data

What the platform has to read back, and so cannot keep as a hash, is encrypted with AES-256-GCM, with a fresh nonce for every value. The key comes from the environment and has no default: without it, the API does not start.

WhatHow it is stored
PasswordsOnly the hash, as described above.
Client secrets, consumer credentials, API keys, personal access tokens and account secretsEncrypted with AES-256-GCM. The value is shown in full only when it is created or replaced; afterwards, only its last 4 characters.
Identity and connection provider secrets, connected account tokens and webhook signing secretsEncrypted with AES-256-GCM.
Private keys that sign and encrypt the tokensEncrypted with AES-256-GCM.
Issued tokens that are recordedWithout their readable value.
Authenticator app keys and recovery codesEncrypted by ASP.NET Data Protection, whose key ring is kept in the database, encrypted with AES-256-GCM.
The CPF or CNPJ of whoever founds an accountEncrypted with AES-256-GCM. A separate HMAC index prevents a duplicate sign-up without storing the readable number.
The credentials of each Dedicated environmentEncrypted with AES-256-GCM in the platform’s database.
Cached copies of database recordsEncrypted with AES-256-GCM before they reach Redis.

The keys that sign tokens belong to each client and rotate by themselves, every 90 days by default; a replaced key stays published in the JWKS until the last token it signed has expired. The key that encrypts stored data lives in a protected variable of the hosting environment, with no KMS or HSM, and does not rotate yet.

In transit

The site, the console, the API and the hosted pages are served over HTTPS. All of them send HSTS for one year, subdomains included, so the browser does not fall back to HTTP; the console also sends the preload directive.

Hosted pages and the console

  • The hosted pages — sign-in, sign-up, password recovery, consent and the account portal — carry a Content Security Policy under which only script holding that response’s nonce runs, with no unsafe-inline or unsafe-eval, and they do not open inside another site (X-Frame-Options: DENY).
  • The hosted forms carry an antiforgery token, and the session cookies are HttpOnly, Secure and SameSite=Lax.
  • The console keeps your session’s tokens on the server, sealed in Redis under a key only your cookie holds, and the browser never receives a bearer token. Every call that goes through the console checks that it came from the console’s own page (Sec-Fetch-Site, with Origin as the fallback).
  • The production containers of the API and the console run without root.

Limits and attacks

  • Rate limits apply per caller: 300 requests a minute on most routes and 50 on sensitive ones, such as token issuance, imports, secrets and impersonation. Above them sit ceilings of 1,000 requests a minute per caller and 6,000 per realm or account.
  • Attack protection counts every wrong password by source and by account, and reacts at once to credential stuffing, password spraying, brute force on one account, push bombing and password recovery abuse. A blocked source is refused before the account is even looked up.
  • Account lockout is set per realm. A new realm locks an account for 5 minutes after 3 wrong attempts in a row.
  • The human check, with Cloudflare Turnstile, guards sign-in, the request for an e-mailed code, password recovery and sign-ups when the environment has Cloudflare’s keys.

Audit trails

TrailWhat it recordsKept for
AccessEvery authentication attempt, accepted or refused: who tried, from which IP address, browser and device, by which method and with what result.90 days
ChangesEvery write to the Admin API, which the console uses too — creates, updates, deletes and impersonations — with the author, the IP address, the resource and the result.365 days
Webhook deliveriesEach event sent to your endpoints and the outcome of every attempt.30 days
  • A job deletes what is past its retention once a day. Reads are not recorded.
  • Reading the trails takes audit:read, which the Auditor role holds too. They are read through the Admin API and exported as CSV from the console; see Audit and insights.

Your team

Each member of your team signs in to the console with their own account and holds one of four cumulative roles — Auditor, Developer, Admin and Owner — and every change is recorded under the name of whoever made it. Only Admins and the Owner read, create and rotate secrets. Narrowing someone’s role, or removing them from the team, ends their sessions at once. See Account roles.

The Authio team’s access

The people who run the platform hold a reserved role that no customer account holds and that the API will not grant. An operator may open a realm or client of your account, for example to look into a ticket, and whatever they change goes into your account’s change trail, marked as made by the platform operator. This access asks for no approval from your account and sends no notice: the control is the record in the trail. Their reads, like anyone’s, are not recorded. Operators never see a Dedicated environment’s first-access credentials. See Authio operators.

Impersonation

Impersonating is receiving a token that acts as one of a realm’s users, to see what that person sees. The rules:

  • It is off in every realm. Only once the realm turns it on can an administrator impersonate one of its people. Turning it on is a change to the realm and goes into the trail, including when a platform operator is the one who turns it on.
  • Only a person signed in to the console, with realm:write, can impersonate. API keys, personal access tokens and other machine credentials are refused.
  • The record in the change trail is written before the token is issued. If it cannot be written, there is no token.
  • The token lasts 15 minutes at most, has no refresh token and carries the act claim (RFC 8693) with the id and name of whoever is impersonating, so your API knows it is not the person themselves acting.
  • Console users and inactive accounts cannot be impersonated.

The reasons for a refusal are listed in Error codes.

Code and dependencies

  • Every change goes through a pull request, with a build and tests in CI, runs first in the QA environment and only then is promoted to production, in a promotion approved by hand.
  • Dependabot watches the dependencies of the API and the console, and CI audits them for known vulnerabilities.
  • Found a flaw? See Vulnerability disclosure.

Next steps