Two-factor authentication (TOTP) and the Lock Server
MIB signs users in with a second factor through the Authorization Server's Lock Server feature: after the password, the user enters a time-based one-time code (TOTP, RFC 6238) from an authenticator app.
The Lock Server has two providers, chosen by LockServer.Type:
| Provider | What it is | Status |
|---|---|---|
LocalTotp |
Platform-agnostic TOTP run by the Authorization Server itself. Users pair any authenticator app (Microsoft Authenticator, Google Authenticator, …) by scanning a QR code. | Use this one. |
Latch |
Telefónica's Latch service (needs a Latch licence and application). Adds Latch pairing and Latch-protected operations. | Deprecated — see Deprecated: Latch. |
Where users meet it, from MIB 7.0:
- Pairing happens on the CMS Account page (avatar → Manage account → Lock Service) — see Pair an account with TOTP.
- Sign-in asks for the code on the React Auth UI's MFA step — see Sign in with two-factor authentication.
Note
The Authorization Server's own server-rendered pages (/Account, the legacy login) are deprecated in
7.0 and are not where 2FA is set up any more. See
Administration in the CMS.
Configure LocalTotp
The keys live in the lockserver section of
MibAuthorizationServerConfig:
MIBAUTHORIZATIONSERVERCONFIG_LOCKSERVER_ENABLED=true
MIBAUTHORIZATIONSERVERCONFIG_LOCKSERVER_TYPE=LocalTotp
MIBAUTHORIZATIONSERVERCONFIG_LOCKSERVER_OPERATIONS=TOTP:TOTP:true
MIBAUTHORIZATIONSERVERCONFIG_LOCKSERVER_ISSUER=MIB Production # the name the authenticator app shows; default "Agile Tv"
Typeis required onceEnabledistrue— an empty value stops the server at startup with "Lock server type is not configured."Operationsis required onceEnabledistrue("Lock server AvaliableOperations is not configured."), in the formName:Id:Enabled,;-separated. Two-factor authentication is theTOTPoperation: it must be present andtrue.LocalTotpignores theIdpart, soTOTP:TOTP:trueis the usual value.Url,ApplicationId,ApplicationSecret, theProxy*keys,ServiceWebSiteand the logo keys are read only by the Latch provider.
Database
The fields live on ADM_USERS and come from the Authorization Server migrations — run them all (see
MibMigrator):
| Migration | Adds |
|---|---|
202501231644370_Mib_AddLockServerFields |
LOCK_ENABLED, LOCK_ACCOUNT_ID |
202502071220550_Mib_AddLockServerTOTPFields |
LOCK_TOTP_ENABLED, LOCK_TOTP_ID |
202604141553430_Mib_AddTwoFATOTPFields |
LOCK_TOTP_SECRET, LOCK_TOTP_LASTTIMESTEP (required by LocalTotp) |
Messages
The lock-server endpoints answer with dictionary tags that the UI translates — under lockserver (e.g.
MESSAGESERVICEDISABLED, SERVICEUNAVALIABLE) and totp (e.g. INVALIDCODE, OPERATIONDISABLED).
Override them in the dictionaries like any other tag:
<translations>
<lockserver>
<MESSAGESERVICEDISABLED></MESSAGESERVICEDISABLED>
<SERVICEUNAVALIABLE></SERVICEUNAVALIABLE>
<MESSAGEUSERNEEDSTOBEPAIRED></MESSAGEUSERNEEDSTOBEPAIRED>
</lockserver>
<totp>
<INVALIDCODE></INVALIDCODE>
<OPERATIONDISABLED></OPERATIONDISABLED>
<MESSAGETOTPCODEREQUIRED></MESSAGETOTPCODEREQUIRED>
</totp>
</translations>
Deprecated: Latch
Type=Latch still works on 7.0 but is deprecated and should not be used for new installs. Under
LocalTotp the Latch controls are hidden from the Account page, and the Latch-only operations (such as
UserChangePassword) never block anything
(MEDIAIBOX-12336). The Latch pages are kept
for installs that still run it: