Security
Sign-in security
How Berth protects panel accounts with argon2id, a breach-password check, hardened sessions, optional two-step verification with an authenticator app or passkeys, new-device alerts, re-authentication for sensitive actions and per-login IP allow-lists.
On this page
Every account in Berth (administrator, reseller, customer, auditor or restricted login) signs in through the same hardened flow. This article explains what protects that flow, which extra steps each user can turn on, and what an administrator can set for the whole server.
If your organisation already has an identity provider such as Entra ID, Google Workspace or Keycloak, also read Single sign-on.
Passwords
- argon2id. Passwords are hashed with argon2id, a memory-hard algorithm designed to make offline guessing expensive. The panel never stores or logs a password in readable form.
- Breach check. New passwords are checked against the Pwned Passwords collection of known leaked passwords using k-anonymity: only the first five characters of the password's SHA-1 hash leave the server, never the password or the full hash. A password that appears in a breach is refused. The check is on by default. Turn it off under Settings → Access, card Check passwords against data breaches, or with
berth security pwned-check --off. - Brute-force protection. Sign-in attempts are rate-limited, and an address that keeps failing is temporarily blocked. Failed sign-ins also feed fail2ban, see Firewall and bans.
Sessions and cookies
- The session cookie is host-only,
HttpOnly,Secureand carries the__Host-prefix, so it cannot be set or read by another subdomain. - The session identifier is rotated at sign-in.
- A session ends after a period of inactivity, and in any case after a fixed maximum lifetime.
- Every write, including the sign-in form itself, requires a CSRF token. API clients that use a session send it as
X-CSRF-Token. - Panel pages are served with a strict Content Security Policy,
X-Frame-Options: DENYandReferrer-Policy: no-referrer.
Each user sees their active sessions under Account → Active sessions and can end any of them, or End all others. An administrator can do the same for a login with berth admin sessions list and berth admin sessions revoke.
Two-step verification (recommended)
Two-step verification is optional, and strongly recommended for anyone who manages servers or customers. Setting it up takes a minute, and each login chooses what suits them.
Authenticator app (TOTP)
- Go to Account and choose Set up next to Authenticator app.
- Scan the QR code with any authenticator app (TOTP, RFC 6238) and enter the code it shows.
- Store the eight one-time recovery codes somewhere safe. Each code works once, in place of the app.
Passkeys and security keys
Passkeys (WebAuthn) are phishing-resistant: a passkey only works on the panel it was registered with, so a look-alike site cannot use it. Touch ID, Windows Hello, a phone or a hardware key such as a YubiKey all work.
- Go to Account and choose Add next to Passkeys and security keys.
- Give the passkey a name and confirm on your device.
With a passkey that has a PIN or biometrics, you can also use Sign in with a passkey on the sign-in screen without typing a name or password.
Passkey-only sign-in
A login with at least two passkeys can switch off its password altogether with Sign in with passkey only. Two are required so that losing one device does not lock you out. To return to a password, an administrator sets a new one for the login.
Lost all factors
If someone has lost their phone, their passkeys and their recovery codes, an administrator resets their second step on the customer page or on the server:
berth admin mfa reset --login acmeWhen four-eyes approvals are on, resetting another administrator's second step needs a second administrator. See Audit trail and approvals.
Remember this device
After the second step, the panel can remember the browser for a while so that it asks only for the password. An administrator chooses off, 12 or 24 hours under Settings → Access, card Remember device after the second step, or with:
berth security remember-device --hours 12Administrators, auditors and resellers are remembered for at most 12 hours. Each user sees their remembered devices under Account → Remembered devices and can forget them.
Alerts for a new device or country
After a sign-in from a browser the account has not used before, or from a country it has not signed in from recently, the user gets a notification. It contains a This wasn't me link. One click on it:
- ends every session of that account;
- forgets all remembered devices;
- revokes the account's API tokens;
- replaces the password;
- informs the administrator (and the reseller, if there is one).
The administrator then checks the activity log and helps the owner back in. The country comes from a local geolocation database on the server; no address is sent to a lookup service. An administrator can list or reset the known devices of a login:
berth admin devices --login acme
berth admin devices --login acme --forgetThese notices are in the Account and access category. Each user can switch them off under Account → My notifications, but leaving them on is what makes This wasn't me useful. See Notifications and alerts.
Re-authentication for sensitive actions
Some actions require a fresh confirmation even inside a valid session:
- setting a password for a mailbox, database user, FTP or SFTP account, protected directory or another login;
- adding an SSH key;
- exporting or downloading a database, a backup, the backup history, a customer data export or a transfer file;
- deleting a customer, domain, database, mailbox or backup;
- loosening outbound traffic restrictions, switching off the write lock, or creating an API key.
Signing in counts as a confirmation. After that, the panel asks again once the confirmation is older than the window set under Settings → Access, card Re-confirm for sensitive actions. The window is 1 to 15 minutes (5 by default) or every time:
berth admin mfa-policy --reauth-minutes 5You confirm with a passkey, a code from your app, or your password if the login has no second step. Logins linked to an identity provider can confirm at the provider instead, see Single sign-on.
In the API such a call returns 403 with "code": "reauth_required". API tokens cannot re-authenticate: a token needs the sensitive scope (berth token create --sensitive) for these actions, otherwise it gets 403 with sensitive_scope_required. See REST API.
Sign in only from known addresses
Any login, including customers, can be limited to specific IP addresses or ranges. Sign-in attempts from elsewhere are refused, even with the right password and second step.
- Self-service: Account → Only from known addresses → Set up, then enter the addresses or CIDR ranges.
- For an administrator, on the server:
berth admin allowed-ips --login acme --set 192.0.2.10,198.51.100.0/24
berth admin allowed-ips --login acme --clearThe panel as a whole can also be limited by country, see Firewall and bans.
See who has access
Settings → Access lists every account with its role, whether it has a second step, its last sign-in, its sessions and its API tokens, with Export (CSV) for an access review. On the server: berth admin access. See Evidence for audits.
SSH is separate
Two-step verification for SSH and SFTP logins of customers is configured per domain, under Two-step verification for SSH. See Files, FTP and SSH.