Skip to main content

Two-Factor Authentication

ProxCenter supports TOTP-based two-factor authentication (2FA) for local and LDAP accounts. OIDC accounts rely on the identity provider's own MFA: ProxCenter does not add a second factor on top of an OIDC sign-in.

What is TOTP?​

TOTP (Time-based One-Time Password) is the 6-digit code rotating every 30 seconds shown by authenticator apps like Google Authenticator, Authy, 1Password, Bitwarden, or Microsoft Authenticator. ProxCenter follows RFC 6238 with a SHA-1 HMAC and a one-step drift window on either side of the current time to absorb minor clock skew.

Enabling 2FA on your account​

  1. Open your avatar menu and select Profile.
  2. In the Two-Factor Authentication card, click Enable 2FA.
  3. Scan the QR code with your authenticator app, or copy the secret manually, then click Next.
  4. Enter the 6-digit code shown by the app and click Verify.
  5. Download and store the 10 recovery codes in a safe place. Each code works only once.
  6. Tick the confirmation checkbox and click Done.
Profile security card with the Enable 2FA button
Start authenticator enrollment from the Two-Factor Authentication card in Profile.
Enable two-factor authentication wizard, step 1 of 3: Scan the QR code, with a blurred QR code and an example secret in the Or type this secret manually field, Cancel and Next
Step 1: scan the QR code with your authenticator app, or type the secret shown below it, then click Next.
Wizard step 2 of 3: Enter the 6-digit code, with a code typed in the 6-digit code field, Back and Verify
Step 2: enter the current 6-digit code from the app and click Verify.
Wizard step 2 with the error Invalid code. Try again with the current 6-digit code from your authenticator.
A wrong or expired code is refused: type the code the app shows now and verify again.
Wizard step 3 of 3: Save your recovery codes, with the warning that they are shown only once, ten example recovery codes, Download as .txt, the ticked confirmation checkbox and Done
Step 3: download or copy the ten recovery codes, tick the confirmation and click Done. The codes are not shown again.

From the next sign-in onward, ProxCenter will ask for the authenticator code after your password.

Signing in with 2FA​

After your password is accepted, a dialog asks for the 6-digit code from your authenticator. You can also enter one of your recovery codes in the same field (format XXXXX-XXXXX). A recovery code is consumed and cannot be reused.

Sign-in dialog Enter the 6-digit code from your authenticator, with the hint You can also enter a recovery code in this field, Back and Verify
After the password, enter the code from your authenticator, or one of your recovery codes, in the same field.

If you cancel the dialog the password is dropped from memory; you'll need to re-enter it on the next attempt.

Flowchart of a sign-in after the password is accepted. If 2FA is not enabled and 2FA is required, by the Require 2FA flag on the user or by the super_admin policy, the user goes through forced enrollment: pages redirect to /profile/2fa/enrollment, API calls answer 403 ENROLLMENT_REQUIRED, and once the wizard is done the JWT is re-minted and the session opens. If 2FA is not required, the session opens directly. If 2FA is enabled, the code dialog takes the 6-digit code or a recovery code in the same field; 5 wrong codes within 15 minutes lock every attempt for 15 minutes. A 6-digit code is accepted within one 30-second step of drift, only if its step is later than the last one used, and opens the session. An unused recovery code of the form XXXXX-XXXXX is spent, logged as 2fa_recovery_used, with 2fa_recovery_low when fewer than 3 remain, and opens the session. Any other code is refused, logged as 2fa_login_failed, and the user tries again.Flowchart of a sign-in after the password is accepted. If 2FA is not enabled and 2FA is required, by the Require 2FA flag on the user or by the super_admin policy, the user goes through forced enrollment: pages redirect to /profile/2fa/enrollment, API calls answer 403 ENROLLMENT_REQUIRED, and once the wizard is done the JWT is re-minted and the session opens. If 2FA is not required, the session opens directly. If 2FA is enabled, the code dialog takes the 6-digit code or a recovery code in the same field; 5 wrong codes within 15 minutes lock every attempt for 15 minutes. A 6-digit code is accepted within one 30-second step of drift, only if its step is later than the last one used, and opens the session. An unused recovery code of the form XXXXX-XXXXX is spent, logged as 2fa_recovery_used, with 2fa_recovery_low when fewer than 3 remain, and opens the session. Any other code is refused, logged as 2fa_login_failed, and the user tries again.
After the password, the second factor is either the current authenticator code, used once, or a recovery code, spent for good. An account required to use 2FA enrolls before it can do anything else.

Disabling 2FA​

Open Profile, click Disable 2FA in the 2FA card, and confirm with either your password or a current TOTP code. If your administrator has enabled the "Require 2FA for super_admin" policy and you are a super_admin, disabling your own 2FA is refused with a 409 to prevent locking the platform.

Confirm to disable 2FA dialog with the Password and TOTP code switch on TOTP code, a code typed in Current 6-digit code, Cancel and Confirm
Confirm with your password or a current code from your authenticator before 2FA is removed.

Recovery codes​

You start with 10 single-use recovery codes. The 2FA card highlights the remaining count and warns when fewer than 3 remain. Click Regenerate recovery codes (requires re-authentication) to invalidate the entire previous batch and issue a fresh set.

Two-Factor Authentication card in Profile with Two-factor authentication is enabled, Enabled since 10/29/2026, Recovery codes remaining 2 (running low, regenerate soon), and the Regenerate recovery codes and Disable 2FA buttons
With 2FA on, the card shows when it was enabled and how many recovery codes are left, and warns when fewer than 3 remain. Regenerate the codes or disable 2FA from here.

Lost device​

If you lose access to your authenticator app, sign in with an unused recovery code from your saved backup. After regaining access, replace the authenticator and store a fresh set of recovery codes.

If no recovery code remains, ask a super_admin to reset your 2FA from Security & Access > Users. The administrator clicks Disable 2FA on your row (shown only when 2FA is enabled) and confirms by typing your email. Enroll again from Profile after the reset.

The 2FA action is not shown on an administrator's own row, so a sole super_admin who has lost both the authenticator and every recovery code must clear 2FA directly in the database: reset totp_enabled, totp_secret_enc, totp_enrolled_at and totp_last_used_step on users, then run DELETE FROM user_totp_recovery_codes WHERE user_id = '…'. Document this step in your operations runbook.

Administrator policy: require 2FA for super_admin​

A super_admin can enforce 2FA on all super_admin accounts via Security & Access > Compliance > Policies > Two-Factor Authentication Policy > Require 2FA for super_admin accounts.

Enabling the policy is gated: ProxCenter refuses the toggle (HTTP 409) if the admin attempting to enable it does not yet have 2FA on their own account. This is intentional and prevents an administrator from locking themselves out by mistake.

Two-Factor Authentication Policy card with Require 2FA for super_admin accounts switched on, its help text, and the error Enable 2FA on your own account before enforcing this policy
You must enable 2FA on your own account before you can require it for every super_admin.

Once enabled:

  • A super_admin without 2FA can still sign in, but every protected page navigation and every protected API call redirects them to /profile/2fa/enrollment until they complete the wizard.
  • The forced enrollment screen has no cancel affordance. The user must finish the flow before regaining the rest of the application.
  • After enrollment, the session JWT is re-minted server-side so the next request bypasses the redirect without requiring a full sign-out and sign-in.

OIDC accounts​

ProxCenter does not add a second factor on top of OIDC sign-ins. Configure MFA in your identity provider (Entra ID Conditional Access, Okta MFA, Authentik flows, Duo, Keycloak, etc.). The IdP's MFA takes effect on the OIDC sign-in step before the ProxCenter session is even created.

The 2FA card on Profile is hidden for OIDC users and replaced by a notice pointing back to the identity provider.

Replay defense​

ProxCenter records the latest TOTP step number consumed by each user and refuses to accept a code that maps to the same or an earlier step. This means a 6-digit code is single-use even within its 30-second window, defeating an attacker who would otherwise capture and replay a still-valid code on a parallel request.

Audit trail​

The following events are written to the audit log under category auth:

ActionStatusNotes
2fa_enrolledsuccessAfter the wizard completes
2fa_disabledsuccessdetails.by = "self" or "admin"
2fa_login_failedfailuredetails.reason = "invalid_code" | "invalid_recovery" | "malformed"
2fa_recovery_usedsuccessdetails.remaining = N
2fa_recovery_lowwarningEmitted when remaining count drops below 3
2fa_recovery_regeneratedsuccessAfter the regenerate flow

Successful 2FA logins are reported on the existing login event via the factors payload (currently logged only at backend level, not surfaced in the audit UI yet).