Manage Chronicle users with Cratis CLI
Users are human principals who can log in to Chronicle using a username and password. They are distinct from applications, which authenticate with client credentials. Manage users when you need to grant or revoke interactive access to the Chronicle server.
Administrator login
Section titled “Administrator login”Listing, adding and removing users needs a Chronicle administrator. Sign in as one first, then run the command:
cratis chronicle login admincratis chronicle users listAn application’s client credentials, including the development client, are refused. Chronicle then answers with this hint:
This command needs a Chronicle administrator. Run 'cratis chronicle login <administrator-username>' to sign in as one.Lists all users registered on the Chronicle server.
cratis chronicle users listExamples
Section titled “Examples”List all users:
cratis chronicle users listList in plain format:
cratis chronicle users list --output plainCreates a new user account with the specified username, email address, and password.
cratis chronicle users add <USERNAME> <EMAIL> <PASSWORD>Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
USERNAME |
The login name for the new user. |
EMAIL |
The email address for the new user. |
PASSWORD |
The initial password for the new user. |
Examples
Section titled “Examples”Add a new user:
cratis chronicle users add alice alice@example.com initialpasswordSecurity note
Section titled “Security note”A variable can keep the literal password out of the command recorded in shell history, but shell expansion still places the password in the process arguments, where process inspection or argument logging may expose it:
cratis chronicle users add alice alice@example.com "$INITIAL_PASSWORD"remove
Section titled “remove”Removes the user account registration from Chronicle. This operation is irreversible. Do not treat removal as a guarantee that all previously issued tokens are immediately revoked.
cratis chronicle users remove <USER_ID>The command prompts for confirmation before proceeding. Pass --yes to skip the prompt in automated workflows.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
USER_ID |
The GUID of the user to remove. Use users list to retrieve user IDs. |
Options
Section titled “Options”| Flag | Description |
|---|---|
-y, --yes |
Skip confirmation prompt. |
Examples
Section titled “Examples”Remove a user interactively:
cratis chronicle users remove a1b2c3d4-e5f6-7890-abcd-ef1234567890Remove without confirmation:
cratis chronicle users remove a1b2c3d4-e5f6-7890-abcd-ef1234567890 --yes