Skip to content

AMFA authentication system — administration

A chapter for the administrator: where in the panel you set what the user sees on the login screen. The gateway administration panel is available at the deployment DNS name (for example https://webui.<domain>/) over HTTPS on port 443. Do not use the retired port 8443.

Entering the panel

Panel login screen: the AMITRONIC mark, a username field, a password field and the Sign in button

Directory accounts are given with their realm (name@realm) so that they reach the right resolver. The engine verifies the credentials: when an account requires a second factor, the panel shows the one-time code step, and when the second factor is a key — the key signing step. A panel administrator is an account from the administrative directory group (or a subject from the allowlist); any other account that passes authentication enters in user view and sees only its own tokens.

Tokens

Token list in the panel: serial, type, description, account, state, failure count and row actions

The list shows the tokens of all users, filtered by realm and account: type, description, assigned account, state and failure count. A token is created from the account card in the Users view and assigned from the row of the token list; the user will then see it on the login screen as the second factor.

Token state and assignment

Assigning a token to an account from the row of the token list: choosing the realm and the account

Column What it means
Serial The token's identifier in the engine; it is how you find the token in the logs.
Type The kind of token: hotp, totp, webauthn, paper; a FIDO2 key has the type webauthn.
Description A free-form description — it helps recognise what the token was issued for.
Account Whom the token belongs to (login and realm). A token with no account authenticates nobody, which is why it is assigned to an account after issuance.
State Whether the token works: active, inactive, locked, revoked; a token being enrolled shows the rollout state (waiting for the client (two-step issuance), waiting for code verification, issuance waiting for approval). A key issued in two steps waits with the rollout label until the user finishes enrolment.
Failure count Wrong codes against the threshold (0 / 10): from 70 % of the threshold the counter gets a warning badge, at the threshold a red one.
Last use, Created When the token was last used to authenticate and when it was created.

Token material (the seed, the QR code) is shown by the issuance wizard and by the user self-service view — briefly, and only to the person receiving it. Screenshots of that material have the values masked, and it is absent from this chapter for the same reason: there is no reason for it to sit in the documentation.

Offline data

AMFA uses three independent central AUTH policies: offline HOTP, offline FIDO2 and key-only sign-in. During online authentication, AUTH issues Ed25519-signed offline grants for the token owner. The credential provider checks the signature, method, identity and expiry, and stores data locally under DPAPI and ACL protection. A grant is valid for at most 30 days; a successful online sign-in can renew it, but offline sign-in cannot extend it. HOTP codes are single-use; FIDO2 requires a valid authenticator assertion. Local sign-in and unlocking without AMFA or AD require valid offline data and, for domain accounts, the necessary Windows credential cache. RDP and CredUI require online MFA. Revocation does not immediately reach a disconnected workstation.

Policies

Engine policies: name, scope, priority, state, conditions and actions

Policies decide how authentication behaves: when the second factor is required, how long offline data is valid, whether the key needs a PIN. Our profiles are set up by the script infra/ha/privacyidea/amfa-policies.py in the product repository — after changing a policy through the panel it is worth checking that it does not diverge from what the script sets up.

A practical note: the server refuses to authenticate when two matching policies have different values of the same action. Before changing a value, align all matching policies, including those set up by hand.

Realms and resolvers

Directory and realm: the realm table with assigned resolvers and the mapping of directory attributes to user fields

A realm is the name under which users reach authentication, and a resolver is the source of those users — in our case an Active Directory domain controller. The amfa_realm registry entry must point to a realm that exists here; a typo in the realm name is the most common mistake during a deployment.

The mapping of Windows domains to realms is set on the provider side — see the Configuration chapter.

AD groups and permissions — direct membership

Group permissions are resolved by direct membership in an Active Directory group. The engine reads the memberOf attribute, and that is a backlink attribute: it shows the groups the account is written into directly and does not close transitive membership. A group the user belongs to only through a child group does not appear in their group set — neither in the set seen by the resolver nor in the Keycloak federation group mapping, which reads that same set.

The directory exposes transitive membership by other means — through tokenGroups or through the matching rule 1.2.840.113556.1.4.1941. The engine queries neither; the group set that permissions are resolved against is always direct membership.

Deployment consequence: grant a permission to a group the user is a member of directly. A right granted to a parent group, with users kept in child groups, does not take effect.

Symptom: the user does not get a permission granted only by a parent group, and the parent group does not appear in their group set. When diagnosing, check:

  • whether the account is written directly into the group that was granted the permission (the account's memberOf),
  • whether the group carrying the permission is not only a parent group relative to the user's group,
  • whether the group set seen by the resolver and by the Keycloak federation mapping contains the group with the permission.

On the credential provider side, exclusion groups are resolved the same way — by direct membership.

Server maintenance

Run administrative commands in the amfa-auth container (for example podman exec amfa-auth pi-manage db current). Database migrations are performed by the release update procedure after backup and according to HA ordering; do not run migrations independently on both nodes.