CLI command
skarbiec login factor
Know, without a sign-in, which second factor each login's sign-in demands after its password and whether the vault holds what answers it, so an automated sign-in never stops at a factor nobody stored and an account without a second factor is told apart from one whose authenticator was never kept.
Invocation#
skarbiec login factor list [<item-id>]
skarbiec login factor set <item-id> --factor <none|totp|push|sms|email|security-key>
skarbiec login factor unset <item-id>Purpose#
Know, without a sign-in, which second factor each login's sign-in demands after its password and whether the vault holds what answers it, so an automated sign-in never stops at a factor nobody stored and an account without a second factor is told apart from one whose authenticator was never kept.
Required inputs and options#
- list takes an optional login id; without it every live login is judged. set takes one login id and --factor: none, totp (an authenticator code), push (an approval pushed to a phone or trusted device), sms, email or security-key. unset takes one login id. POST /v1/operator/items/factors takes an optional id, POST /v1/operator/items/factor/set id and factor, POST /v1/operator/items/factor/unset id; the MCP tool skarbiec_login_factors takes an optional item.
Output and state effects#
- The record is kept with the login, in its sealed context as second_factor: factor, by (owner for set, weles for the challenge a Weles sign-in met) and at (seconds since the Unix epoch). list judges each login from its record and, for an authenticator code, from the seed totp seed judges on the identity the login signs in as: held (none, or totp with a seed that computes a code), undeclared (nothing recorded), missing-seed (totp and no seed), invalid (totp and a seed that computes none) or not-held (push, sms, email or security-key, which the vault keeps nothing to answer). Each row prints item, second_factor, state, identity, seed_state and fix; the sweep prints ok (true only when every login is held and none is unreadable), counts per state and unreadable, logins, unreadable and factors. set writes the record as the login's next revision and journals login-factor-set; unset removes it and journals login-factor-unset; both print ok, item, before and second_factor. Every write of an item refuses a record of another shape as payload-second-factor-invalid. totp missing reads the record (a login recorded totp needs a seed wherever it signs in), totp seed prints it, doctor --check sign-in-factors lists every login not held, and Weles refuses to start a subscription sign-in whose recorded factor the vault does not hold. Desktop's Settings → Policy shows it as Sign-in factors (Judge every login, Record, Remove the record, Run the doctor check).
Refusals#
- No verb, an unknown verb, a missing or extra item, a flag the verb does not take, set without --factor, or a factor not among the six exit 2 (arguments-form-missing, arguments-form-unknown, arguments-missing, arguments-extra, arguments-flag-unknown, arguments-value-unfit), for example `--factor must be one of none, totp, push, sms, email, security-key, and "fingerprint" is not`; on the route or the MCP tool an id or item that is present but not non-empty text is refused with the usage. An item that is not a login is login-factor-not-login, exit 1: `<id> is a <kind>, and a second factor is recorded for logins only; fix: name a login: skarbiec list --kind login lists them`. unset on a login that records nothing is login-factor-none-recorded, exit 1: `<id> records no second factor, so there is nothing to remove`. An item the vault does not hold or cannot open is refused by the item-open cause that names it, and in the sweep a login that does not open, or whose identity does not, is listed under unreadable with its error; an item this host may not write is refused by the owner-write causes.
- skarbiec.login-factor-list login-factor-not-login — exit 1: {doing} {id}; fix: name a login: skarbiec list --kind login lists them; skarbiec login factor list names every login's record
- skarbiec.login-factor-set login-factor-not-login — exit 1: {doing} {id}; fix: name a login: skarbiec list --kind login lists them; skarbiec login factor list names every login's record
- skarbiec.login-factor-set login-factor-none-recorded — exit 1: removing the {what} recorded for {id}; fix: skarbiec login factor list {id} says what the second factor record holds; login factor via {id} and login factor page {id} read the other two
- skarbiec.login-factor-observe login-factor-not-login — exit 1: {doing} {id}; fix: name a login: skarbiec list --kind login lists them; skarbiec login factor list names every login's record
- skarbiec.login-factor-observe login-factor-observe-no-page — exit 1: observing what the account of {id} asks after the password; fix: skarbiec login factor page {id} --set <https address of the account's two-step settings>; or a sign-in of {id} through Weles that meets a second step records it; or skarbiec login factor set {id} --factor <none|totp|push|sms|email|security-key>
- skarbiec.login-factor-observe login-factor-observe-weles-refused — exit 1: {doing} {login}; fix: the message names Weles's own fix; weles errors show credentials lists every cause of its admission, and weles worker status says whether its worker is ready