Administer
Second factor and passkeys
Every sign-in asks for a second factor, in the console and through the SSH gateway. It is part of every edition.
What users can enrol#
| Factor | Where it works |
|---|---|
| Authenticator app (TOTP, 6 digits) | console, SSH gateway, panic mode |
| Recovery codes (10, single use) | console and SSH, in place of a code |
| Security key or passkey (WebAuthn) | console sign-in |
Users enrol in Settings. The app is enrolled with a QR code or a key typed in groups of four. The ten recovery codes are shown once, with a .txt download: keep them away from the phone.
Passkeys and security keys are bound to the bastion's address. Browsers refuse them on a self-signed certificate.
Who must have one#
Every user, by default. At their first sign-in, users must enrol an app before they can do anything, and SSH sign-ins are refused until they have. To require it of administrators only, set BASTION_MFA_REQUIRE_USERS=false in deploy/compose/.env and run sudo bastionos apply. Administrators without a factor then see a banner on every page.
Security keys for administrators, off by default: with BASTION_MFA_REQUIRE_ADMIN_KEYS=true, administrators must sign in to the console with a security key or a passkey. A code alone opens a session that can only register a key.
Users of an identity provider set to the provider checks the second factor are not asked again by BastionOS.
RADIUS#
With a RADIUS server (Enterprise Basic), every password sign-in can ask for a code checked by that server, for example a hardware token or an SMS sent by your RADIUS appliance. See SCIM and RADIUS.
Recovering a lost factor#
- With a recovery code: sign in with it, then enrol a new app in Settings.
- Without: an administrator resets the user's second factor in Users. The user enrols again at the next sign-in.
- When every administrator lost theirs, from the host:
$ sudo bastionos compose exec -T controlplane service admin reset-mfa --username adminWhere the seeds live#
The app's seeds are sealed before they reach the database, with a local key (BASTION_MFA_SEED_KEY_FILE, the default) or with OpenBao Transit (BASTION_MFA_SEAL=openbao). The local key is in the encrypted part of every backup.