Setting up your second factor (MFA): the first enrolment

Julia Brown (jbrown, administration) has always worked in the office, with the password alone. From Monday she will work two days a week from home: from outside, the Atlas console and the VPN will…

Situation

Julia Brown (jbrown, administration) has always worked in the office, with the password alone. From Monday she will work two days a week from home: from outside, the Atlas console and the VPN will ask her for a 6-digit code as well, generated by an app on her phone. That code is the second factor. Julia has never done this and is not a technician: this scenario guides her, step by step, from the first screen to the test of her first sign-in with the code.

The administrator’s side (Laura White, lwhite) is at the end: how to enrol the token in place of a user, how to remove it if the phone is lost, how to end single sign-on sessions.

The second factor, the internal networks and single sign-on are explained in the chapter Fundamental concepts; the page itself, with all its states, in User tools («MFA enrollment»); opening the console to the internet in the scenario console on the internet; the VPN in VPN off site.

What you need

  • A phone with an authenticator app. The Atlas Caveau works (entries with the «One-time password (OTP)» show the current code: see step 7), or any 6-digit code app of your choice, such as Google Authenticator or Aegis: the console names exactly these two. The app must support a time-based code (TOTP), the most common kind.
  • The phone’s clock set to automatic. A skewed clock makes a correct code look wrong.
  • Your user name and your domain password (jbrown).
  • To be in the office or on the VPN when you enrol the token. From the internet, without an already active token, you cannot get in and so cannot even enrol it (scenario 32).

Tip Do the enrolment sitting at your desk, with the phone in your hand and the page open. The QR is shown only once: if you get up or close the tab halfway, you will have to start over.

Steps

A. Signing in with user name and password

  1. From the PC in the office open the console’s address, https://atlas.johnsmith.test/.
  2. On the «Sign in» page («Enter your credentials to continue.») type your «Username» jbrown and your «Password» and press «Log in».
The sign-in pageThe sign-in page
The sign-in page

From the office the password is enough: no code is asked (you do not have one yet). If single sign-on is active, the page also offers «Sign in with single sign-on»: you can use it, or the password as here. You get in as a non-administrator: the menu shows only the Tools area.

B. Opening the enrolment page

  1. Open Tools → MFA enrollment. The path at the top says «Tools › MFA enrollment». The token you enroll here counts for the VPN and for the console from the internet.
  2. Under «Token» and your name you see «No token enrolled for this user.» and, at the bottom right, the «Enroll token» button.
The page before enrolmentThe page before enrolment
The page before enrolment

If you read something else instead of this page, go to «If something goes wrong»: for example «Multi-factor authentication is not enabled: it comes with the VPN (Settings → VPN Roadwarrior) or with single sign-on.»

C. Enrolling the token

  1. Press «Enroll token».
  2. The panel «Scan the QR with your authenticator app» appears, with the notice «The code is shown only once. Scan it now with Google Authenticator, Aegis or similar.» Under the QR is a line of fixed-width text starting with otpauth://totp/…: this is the address that holds the token’s secret (the value after secret=).
The QR and the secretThe QR and the secret
The QR and the secret
  1. With the phone, add a new account in the app and scan the QR. Pick the app you use:
    • Atlas Caveau (from Tools → Caveau, also from the Edon app): create an entry, in the «One-time password (OTP)» section use «Scan with camera» and point at the QR («QR code decoded» appears); alternatively «Upload an image» with a screenshot of the QR, or «Paste image from clipboard». Save the entry: «Show code» gives you the current 6-digit code, with the countdown.
    • Google Authenticator, Aegis or a similar app: «Add account» → «Scan a QR code» and point at the QR on the screen.
    • If the camera does not work: every app has an «Enter a setup key» entry (the name varies from app to app). As key type the value that follows secret= in the otpauth://… text, up to the next & (in the picture’s example KRSXG5CTMVRXEZLUKN2XAZLSKNSWG4TF, an invented value: yours is different); as type choose «time-based». The console has no separate field with the secret: it is only that text, to copy. This route is part of the otpauth format, but we have not tried it app by app.
  2. The app shows a 6-digit code that changes about every 30 seconds. Do not close the page.

Warning The QR and the secret are shown only once. Whoever sees them can generate your codes: do not leave photos of them around, do not send them by mail. If after step 5 you close the page without scanning the QR, the token stays «pending verification» and the QR cannot be seen again: it must be revoked (see «If something goes wrong») and enrolled again.

D. Verifying, to activate the token

  1. In the «Confirm the code» field type the 6 digits the app shows at that moment (the field shows 123456 as an example).
  2. Press «Verify and activate».

A token does not count until you verify it: while the state is «pending verification» the access from outside rejects you as if you had none. If you close the page before step 10, when you reopen it you find exactly this state:

A token pending verificationA token pending verification
A token pending verification

The token appears with its serial number, the type totp and the «pending verification» badge, «Last use» «never used» and «Failed attempts» 0 / 10, with the «Confirm the code» field. If you still have the app with the entry already added, type the code and press «Verify and activate»; if you never scanned the QR, press the bin («Revoke token») and start again from step 5.

E. Checking that it is active

  1. After «Verify and activate» the page reloads and shows the token with the green «active» badge.
The active tokenThe active token
The active token

The panel also says «Last use» and «Failed attempts» (in the picture 0 / 10: the second number is the ceiling, at which the token locks). Next to the bin is the «Current code» field: it is needed only to revoke the token (see below). Every user has at most one token.

F. The next sign-in: password, then code

  1. From home (or from any network that is neither trusted nor the VPN) open https://atlas.johnsmith.test/, type jbrown and the password and press «Log in».
  2. The «Verification code» page appears with the text «You are signing in from outside the internal network: enter the code from your authenticator app.» Type in «OTP code» the 6 digits the app shows now and press «Verify». Within five minutes of the password, otherwise the page says «The time to enter the code has run out: sign in again.»
The code pageThe code page
The code page
  1. From inside, in the office, you keep signing in with the password alone. If you use from outside a session started from inside, the console shows «Confirm your access» and asks for the code before continuing.
  2. With single sign-on (SSO) the code is asked on the sign-in server’s page, after the password. If the «Passkeys» panel is present on the enrolment page, you can also add a passkey with «Add passkey» (fingerprint, face or the device’s PIN): with a passkey you sign in without password and without code. It appears only where single sign-on exists.
  3. For the VPN and for Edon Client without single sign-on there is no second page: in the password field type the password followed immediately by the 6-digit code, without spaces (<password>123456).

For the technician The code server is privacyIDEA (edon-mfa); the token is a TOTP. The QR is produced by the server at enrolment time and is not kept: the page holds it only in the response of that call. From a user session an active token is revoked or replaced only with its current code (otherwise a stolen password would be enough to replace the token with the attacker’s); the administrator can do it without.

Check

  • In Tools → MFA enrollment the token is «active» and not «pending verification».
  • From a network that is neither the LAN nor the VPN (for example the phone on the mobile network) the password alone does not let you in: «Verification code» appears. With the right code you get in; with a wrong one you read «Invalid OTP code.»
  • After a sign-in with the code, «Last use» should show the date and time; we have not verified this on a real appliance.
  • In the office the password alone still works.

If something goes wrong

What you see What it means What to do
«Multi-factor authentication is not enabled: it comes with the VPN (Settings → VPN Roadwarrior) or with single sign-on.» The code server is not running, or none of the four conditions in «What you need» is true Tell the administrator: check System → Modules and System → Status
«Multi-factor authentication is not required for your account.» Your account is not a person’s (service, system object) Use your personal account
«The domain controller did not answer, so the user list cannot be shown. This is not an empty domain — check that the Active Directory DC is running.» Active Directory is not answering Try again later; tell the administrator
«The domain is not configured yet. Complete the Active Directory setup first.» The domain is missing Administrator: scenario first installation
«Wrong or expired code. Try again with the current one.» The code changed while you typed it, or the phone’s clock is skewed Wait for the next code and type it at once; set the phone’s clock to automatic
«Enter the OTP code.» You pressed «Verify and activate» with the field empty Type the 6 digits
«You already have an active token: to replace it, revoke it first, with its code.» You already have a token and try to enrol another Revoke the old one (below)
«This operation is not allowed for this user.» The account is not a person, or the appliance no longer has any condition that asks for the code Tell the administrator
The QR is gone, the token is «pending verification» You closed the page before scanning it Press the bin («Revoke token»: a pending token does not ask for the code), then «Enroll token»
«Enter the code the token shows now.» / «Wrong or expired code: the token was not revoked.» You pressed «Revoke token» on an active token without the «Current code», or with a wrong one Type the code the app shows now in the «Current code» field and try again
Signing in from outside: «From outside the internal network an OTP code is needed, but your account has no active token: register the token from the internal network or the VPN.» You have no token, or it is still «pending verification» Enrol and verify it from the office or on the VPN
«Invalid OTP code.» Wrong or expired digits Try again with the current code
«The token is locked after too many wrong codes: ask an administrator to unlock it.» Too many wrong codes in a row (the ceiling is the second number of «Failed attempts»): the «locked» badge An administrator presses «Unlock» (or you do it yourself, from your own page, signing in from the office)
«From outside the internal network an OTP code is needed, but the MFA service is not answering. Try again later, or sign in from the internal network or the VPN.» The code server is down Sign in from inside or on the VPN; tell the administrator
«The time to enter the code has run out: sign in again.» More than five minutes after the password Start again from the password
«Too many failed attempts. Try again later.» Too many errors from the same account or address Wait; do not repeat the attempt in bursts
«Single sign-on is not answering: try again later.» The sign-in server (for passkeys) is not answering Try again later; the OTP code stays valid

I lost my phone, or changed it

The token cannot be moved: revoking it needs the code, and that code was on the lost phone. Proceed like this:

  1. Julia tells the administrator and, if she can, signs in from the office with the password (inside, the code is not needed).
  2. The administrator revokes the token (see below, «Revoke token»): no code is needed.
  3. Julia opens Tools → MFA enrollment, sees «No token enrolled for this user.» again, presses «Enroll token» and repeats the steps from C on with the new phone.

Warning If the phone was stolen and not just lost, the administrator must also change the account’s password and, with single sign-on, end the open sessions («End the sessions», below) and delete the passkeys the phone may have held.

The administrator’s side

In the same Tools → MFA enrollment entry the administrator (lwhite) sees an area with the list of all people (and a search field): touch a person and manage their token with the same buttons, in the detail’s bar at the top right, next to the name.

The administrator's viewThe administrator's view
The administrator's view
Item What it does
«Enroll token» (if the person has none) Enrols a token for that person: the QR appears on your screen. Do it with them beside you, scanning it and dictating the code, or on their PC
«Verify token» (icon, if the token is pending) Opens the «Confirm the code» field to activate an interrupted token
«Unlock» (icon, if the token is «locked») Resets the lock after too many wrong codes, without touching the token
«Revoke token» (bin) Deletes the token without asking for the code: the tool for a lost phone. The person will have to enrol a new one
«Passkeys» With single sign-on: the person’s passkeys, with «Rename» and «Delete passkey» (unusable at once)
«Open single sign-on sessions: N» and «End the sessions» With single sign-on: how many sessions the person has and the button that ends all of them, including those open in Atlas. It asks for confirmation

A typical case: Julia has changed phone.

  1. Open Tools → MFA enrollment, find jbrown in the list and select her.
  2. Press «Revoke token» (the red bin in the detail’s bar). The panel goes back to «No token enrolled for this user.»
  3. If you want, enrol the new token yourself with Julia beside you: «Enroll token», she scans the QR, you type the code she dictates and press «Verify and activate»; otherwise tell her to do it herself.
  4. If the person used single sign-on and you want them to get back in at once with the new phone, press «End the sessions».

Tip The QR shown to you is the person’s secret: do not leave the page open and do not take screenshots of it. If you are not sure they scanned it, revoke and redo.

If the list does not load and you read «The domain controller did not answer…», it is not a domain without users: Active Directory is not answering.

Things to know

  • One token per user. To change phone you revoke and enrol again; there is no second «spare» enrolment.
  • From outside, the code is asked of everyone, even those without the VPN, and the root user does not get in from outside anyway.
  • The Caveau can keep the code on the phone or in the browser, but the code for your own sign-in to Atlas should not be kept in the Atlas Caveau if you need it to get into the Caveau from outside: you would be locked out. Keep it on the phone.
  • What we could not verify here: the exact behaviour of each authenticator app (the entry names vary) and the passkey step on your device, which depends on the browser and the system.
LET’S TALK INFRASTRUCTURE

Control starts with a conversation.

Tell us about your infrastructure. Let’s start with what you actually need.

Talk to an engineer