CLI reference / service / auth-check

stado service auth-check

Invocation

stado service auth-check [OPTIONS] --host <HOST> --url <URL> <NAME>

Purpose

Verify a managed service's bearer against a read-only loopback endpoint. With `--repair`, a failed check atomically synchronizes the secret, restarts the unit, and checks the endpoint once more.

Required inputs and options

Input or optionContract
<NAME>Service name, or the host's own name for the unit
--host <HOST>The single registry host to check
--item <ITEM>Skarbiec item containing the bearer. Required unless the bearer is read from the unit's own runtime environment with --variable and --env-file instead
--consumer <CONSUMER>Host-side Skarbiec consumer used to read --item (defaults to the host's own selection)
--token-file <TOKEN_FILE>Token file for --consumer
--field <FIELD>Exact string field in the Skarbiec item [default: token]
--url <URL>Read-only loopback HTTP endpoint that requires authentication
--post-empty-jsonSend an empty JSON POST instead of a GET; useful for auth-first APIs
--expect-status <EXPECT_STATUS>Treat this exact HTTP status as proof that authentication passed
--repairOn failure, synchronize the secret, restart, and check again
--take-over-listenerIf repair still fails, stop the unmanaged process owning the URL port
--variable <VARIABLE>Environment variable holding the bearer. With --item omitted this names the assignment auth-check reads from --env-file; with --repair it is the assignment synchronized from the item
--env-file <ENV_FILE>Runtime env file holding (or, with --repair, receiving) the bearer assignment named by --variable
--jsonCommand option; required or optional as shown in the invocation.

Output and state effect

It performs the operation described above and emits its operator result on standard output or standard error. Any state change is limited to the resources and records named by the purpose and options on this page.

Refusals

  • Required unless the bearer is read from the unit's own runtime environment with --variable and --env-file instead
  • Read-only loopback HTTP endpoint that requires authentication
  • Before dispatch, Stado refuses a missing required token shown in the invocation, an unknown option, or a value outside a listed value set; argument-usage failures exit with code 2.