Free in every edition. A user with a local account can add a second factor: after the password, Netlens asks for a 6-digit code from the user’s own authenticator app (Google or Microsoft Authenticator, Authy, 1Password, a hardware token …). Netlens is not a TOTP provider: it only checks codes made by the standard algorithm (RFC 6238, tested against the RFC’s own test values), so nothing is installed or paid for on Netlens’s side and the user keeps the authenticator they already use.
Set it up under Settings → Account → Second factor: enter your password, scan the QR code (or type the key), enter the code it shows, and keep the ten recovery codes that appear once. Optional, per user; a user who has it sees a 2FA mark in Users & tokens.
How it is kept safe: the secret is stored encrypted with the same key as the other secrets and shown only at set-up; a code works once (an observed code cannot be replayed); between the password and the code there is no session, only a single-use challenge that ends after five wrong codes or five minutes; wrong codes count towards the same limits and alarms as wrong passwords, and a correct password does not reset them; recovery codes are stored only as hashes and work once, and signing in with one raises an event so a lost authenticator is noticed. Removing the factor or making new recovery codes needs the password and a code.
If the authenticator and the recovery codes are lost: docker exec -it netlens python -m app.cli reset-totp <user> (needs access to the container, like a password reset; there is deliberately no reset by e-mail). People who sign in through single sign-on use their identity provider’s own second factor. The access token and API tokens are not interactive and have no second factor.
For administrators
- Free in every edition. Requiring a second factor for roles, step-up re-authentication for privileged actions and session limits are planned business and enterprise features.
- Single sign-on users use the second factor of their identity provider; Netlens does not add a second prompt.
- API tokens and the access token are not interactive, so they have no second factor; keep tokens read-only where possible.
- A user list with a 2FA mark is in Settings → Users & tokens. An administrator cannot read a user’s secret: it is shown once, to the user, at set-up.