Service Accounts


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 modified: November 18, 2024