Service Accounts

This page describes the commands to manage Service Accounts in Lenses via the CLI.

The CLI can create, update, delete and revoke Lenses service accounts.

Create a service account

# with flags (autogenerated password (token))
lenses-cli serviceaccounts create \
    --name MySvcAcc \
    --owner admin \
    --groups MyGroup
# with user-specified password (token) 
lenses-cli serviceaccounts create \
    --name MySvcAcc \
    --owner admin \
    --groups MyGroup \
    --token 1234-foo-bar

From a file:

lenses-cli serviceaccounts create ./serviceaccount.yaml

Example file:

name: MySvcAcc
owner: admin
groups:
- MyGroup

Update a service account

Update a service account via the command line flags or file:

# with flags
lenses-cli serviceaccounts update \
    --name MySvcAcc \
    --owner admin \
    --groups MyGroup

Delete a service account

lenses-cli serviceaccounts delete --name MySvcAcc

Revoke

lenses-cli serviceaccounts revoke --name MySvcAcc

Revoke a service account token and use your own custom token

lenses-cli serviceaccounts revoke \
    --name MySvcAcc \
    --token my-custom-token

Last updated

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.