authtempo secret status
For: an operator who changes the app secret and wants to know when an old version can leave the config.
What it does: this page lists the flags of authtempo secret status, its JSON document, and the operator route that it calls.
Before you start
Section titled “Before you start”- The operator routes on, with
operator: { secretHash }in the config. Configuration lists the key. Core serves the route since plan 11c2. - The two-phase change of a version. Secrets gives the steps.
The command
Section titled “The command”The @authtempo packages are on npm. Add the CLI to your app with pnpm add -D @authtempo/cli, and run each command as pnpm exec authtempo ….
authtempo secret status https://api.example.com| Flag | What it does |
|---|---|
<base url> |
The origin of the API, with no path. |
--token-env <NAME> |
The variable of the operator secret. The default is AUTHTEMPO_OPERATOR_SECRET. Secrets gives the rule. |
--token-file <path> |
The file of the operator secret. A dash reads stdin. Secrets gives the rule. |
--base-path <path> |
The basePath of the deployment. The default is /auth. |
--timeout <seconds> |
The time limit of each request, from 1 to 120. The default is 10. |
--json |
Prints the document of The JSON. exit: the exit code of the run. stopped: the reason of a stop or a usage error, or null. |
-h, --help |
Prints the complete help. The command ignores every other argument. |
| Exit code | What it means |
|---|---|
| 0 | Each version that has rows is in the config. |
| 1 | A version that the config does not hold has rows. A person must look before the version goes. |
| 2 | A usage error, or a stop: no answer, the route is off, or the deployment refused the secret. |
The command prints one line per version on stdout, the current version first:
version 2: current, configured, totpSecrets 0, backupCodes 0, signingKeys 0, emailCodes 0, ssoClientSecrets 0, stateData 0version 1: old, configured, totpSecrets 1, backupCodes 10, signingKeys 1, emailCodes 0, ssoClientSecrets 0, stateData 0currentorold: whether the version seals each new value.configuredornot configured: whether the config holds the version.- The six counts under the version: TOTP secrets, unused backup codes, signing keys, live email codes, SSO client secrets, and live sealed payloads of
social.stateData.
A version that the config does not hold but has rows gives exit 1 and a warning on stderr. Its rows cannot open until the version is back. Add it back before you remove it: Secrets gives the rule.
The command reads counts only. No line holds a secret, a hash, or a sealed value.
The JSON
Section titled “The JSON”| Key | What it holds |
|---|---|
versions |
One entry per version, the current version first. Each entry holds version, configured, current, totpSecrets, backupCodes, signingKeys, emailCodes, ssoClientSecrets, and stateData: the key names of api.secrets.status(). |
exit |
The exit code of the run. |
stopped |
The reason of a stop or a usage error, or null. |
The document of a stop or a usage error holds versions: [], exit: 2, and the reason in stopped. The output gives the rule for every command.
The route
Section titled “The route”| Field | Value |
|---|---|
| Route | GET /operator/secrets/status |
| Header | Authorization: Operator <secret> |
| Answer | { versions }, the answer of api.secrets.status(). |
| Limit | The key operator-secrets:ip:<ip>, a window of 1 hour, and 120 calls, right or wrong secret, shared with secret rewrap and info. Limits lists every limit. |
| Errors | unauthorized, rate_limited |
A deployment with no operator in its config answers 404, and the command stops with exit 2.