billingHelp

Super-admin sign-in and security

Signing in, two-step sign-in, lockouts and unlock links, sessions and devices, the signed release manifest, adding or resetting super admins from the command line.

Signing in#

Super admins sign in at /super/login. Passwords are hashed with Argon2id. After 5 wrong passwords in 15 minutes the account is locked and an unlock link is emailed; 50 failures from one address within 15 minutes block that address for a while.

Sessions end after 30 minutes without activity and after 12 hours in any case. The session id changes at sign-in and whenever privileges change.

Two-step sign-in#

Profile → Two-step sign-in → Set up adds a code from an authenticator app after the password, with ten single-use recovery codes. The steps are the same as for workspace members: see Two-step sign-in and security settings.

Super → Security → Require two-step sign-in from every super admin makes it compulsory. Turn it on for yourself first. Super admins without it are signed out and set it up at their next sign-in. The page also lists every super admin with their status, and how many workspaces require it from their members.

A super admin who lost phone and recovery codes is reset by another super admin on Super → Security (Reset), or on the server:

sudo -u www-data php app/cli.php staff:2fa-reset [email protected]                       # a super admin
sudo -u www-data php app/cli.php staff:2fa-reset [email protected] --workspace=tulix  # a workspace member
sudo -u www-data php app/cli.php security:super-2fa on                                 # require it (on | off | status)

The self-check item Two-step sign-in for staff warns until it is required for super admins and every super admin has it.

Profile#

Profile (your name at the bottom of the menu) changes your password and lists your signed-in devices; sign out one or all of them. Signing out also ends any acting as sessions you started.

Command line#

sudo -u www-data php app/cli.php super:create [email protected] "Your Name"   # add a super admin
sudo -u www-data php app/cli.php super:reset-password [email protected]       # new password, signs out every session

What the application enforces#

  • Tenant isolation — every query on workspace data carries the workspace; an id from another workspace answers "not found".
  • Roles and product access — the finance viewer cannot change anything; an admin limited to some products cannot open, list or export anything of the others; API keys follow the same limits.
  • Forms — every state-changing request needs the form token and must come from this site. Signed in, the token is derived from the session, so a token planted in a cookie or taken from another session is refused.
  • Customer registration — by default the form never tells whether an address already has an account; the mailbox gets the link (see How customers register).
  • Version number — anonymous visitors do not see which release runs (/health, sign-in pages, help, robots.txt, the API reference). Signed-in super admins see it at the bottom of the menu and on /health.
  • Webhooks — a provider event acts only on payments made with a credential set of the same provider and the same mode: an event signed by a test set never touches a live payment.
  • Customer accounts — an email address counts as confirmed only when the link was opened inside that account; an unconfirmed account never receives a purchase somebody else pays for (see Customers and access).
  • Password forms — the current password can be tried five times in 15 minutes on the change-password forms, for staff and customers alike.
  • Receipts — looking up confirmation codes that open nothing is limited to 30 tries in 10 minutes per address.

The test suite walks the whole route table for each of these rules; docs/SECURITY.md in the release package lists the tests and the review they came from.

Checking the installed code#

php app/cli.php security:manifest     # compares app/ and public/ with app/MANIFEST.sha256, checks its signature; exit 1 on a difference or a bad signature
php app/tools/verify_release.php /path/to/unpacked/release   # before installing: signature, then every file

The manifest is signed (app/MANIFEST.sig, Ed25519) with the release key, which never leaves the publisher's workstation. A changed file then needs a new manifest, and a new manifest breaks the signature. verify_release.php prints the key id: compare it with the release key id published outside the package (docs/SECURITY.md §5 and the delivery report). With --key=<public key> it trusts only the key you hold.

The self-check runs the same comparison daily and fails on a bad signature.

Good practice#

  • Give each operator their own super-admin account; the audit log then says who did what.
  • Keep the master key (data/keys/master.key) off the server, in a password manager or safe, and never next to the backups.
  • Use the hardened vhost with TLS, so cookies are __Host-, Secure and SameSite=Lax, and HSTS applies.
  • Run the self-check after every change to the server.