Auth
Chronicle supports two authentication modes:
- User login — a human operator authenticates with a username and password. The CLI caches the resulting token for subsequent requests.
- Client credentials — an application identity authenticates using a client ID and client secret. Configure these values on the active context using
cratis context set-value client-idandcratis context set-value client-secret.
When no authentication is configured or required, commands connect anonymously.
auth status
Section titled “auth status”Shows the current authentication state for the active context: the logged-in user, whether client credentials are configured, or that no authentication is active.
cratis chronicle auth statusExamples
Section titled “Examples”Check authentication status:
cratis chronicle auth statusGet machine-readable status:
cratis chronicle auth status -o jsonAuthenticates as a user using the resource owner password credentials flow. The CLI stores the resulting token in the active context for use by subsequent commands.
cratis chronicle login <USERNAME>If you omit --secret, the CLI prompts for the password interactively so it does not appear in your shell history.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
USERNAME | The username to authenticate as. |
Options
Section titled “Options”| Flag | Description |
|---|---|
--secret <PASSWORD> | The password. Omit to be prompted interactively. |
Examples
Section titled “Examples”Log in interactively (password prompt):
cratis chronicle login aliceLog in with password inline (use only in controlled automation):
cratis chronicle login alice --secret mysecretlogin is a top-level chronicle command, not a sub-command of auth. The full command is cratis chronicle login, not cratis chronicle auth login.
logout
Section titled “logout”Clears the cached credentials and token for the active context. Subsequent commands will connect anonymously unless client credentials are configured on the context.
cratis chronicle logoutExamples
Section titled “Examples”Log out of the current context:
cratis chronicle logoutlogout is a top-level chronicle command, not a sub-command of auth. The full command is cratis chronicle logout, not cratis chronicle auth logout.