Skip to main content

AddClientCredentialsClient

Adds a new client using grant type 'ClientCredentials'.

Examples​

Interactive: asks for the client secret twice, without echoing it:

octo-cli -c AddClientCredentialsClient -id "my-service" -n "My Background Service"

Automation: pipe the secret in (e.g. from a secret store):

octo-cli -c AddClientCredentialsClient `
-id "my-service" `
-n "My Background Service" `
-ss

Options​

ShortLongRequiredDescription
-id--clientIdyesServiceClient ID, must be unique
-n--nameyesDisplay name of client used for grants
-s--secretnoDeprecated: client secret used for client credential authentication. A value on the command line ends up in the shell history and the process list.
Omit it to be prompted (hidden input), or use --secret-stdin or the environment variable OCTO_CLI_NEW_CLIENT_SECRET.
-ss--secret-stdinnoRead the client secret from standard input (one value; a trailing line break is removed)
-apic--autoProvisionnoIf set, this client is auto-provisioned (mirrored) into every new sub-tenant of the calling tenant.
Use for service-to-service / CI-CD identities that must reach many tenants with a single ClientId/secret pair.

Notes​

Creating a client with a secret needs the tenant role SecretManagement. TenantManagement or UserManagement still pass while the identity cluster runs with SecretManagementRoleEnforcement=Warn or RoleEnforcement=Warn; they are refused only when SecretManagementRoleEnforcement=Enforce and RoleEnforcement is not Warn. A refused call (HTTP 403) prints the message of the identity service, which names the missing role; without a message the generic access-denied text is shown.

The client secret is read from a hidden prompt, from standard input (--secret-stdin) or from the environment variable OCTO_CLI_NEW_CLIENT_SECRET, so it does not end up in the shell history or the process list. -s still works in this release but logs a deprecation warning and will be removed. OCTO_CLI_CLIENT_SECRET is not read here: it is the secret octo-cli itself logs in with.