Table of Contents

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:

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"
  • Type is required once Enabled is true — an empty value stops the server at startup with "Lock server type is not configured."
  • Operations is required once Enabled is true ("Lock server AvaliableOperations is not configured."), in the form Name:Id:Enabled, ;-separated. Two-factor authentication is the TOTP operation: it must be present and true. LocalTotp ignores the Id part, so TOTP:TOTP:true is the usual value.
  • Url, ApplicationId, ApplicationSecret, the Proxy* keys, ServiceWebSite and 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: