Browserless CLI Login
Overview
You can use the CLI without an interactive login by using a service account.
Prerequisites
- The user executing the steps below must be a member of the superusers group or have a policy, targeting service accounts, with the following permissions:
- create
- edit
- addKey
- CLI installed
Required Steps
To set up a service account used by the CLI to perform a browserless login:
-
Using the console:
-
Create a Service Account whose key will be used in step #2.
-
Create one or more policies granting the service account permissions to resources (GVCs, workloads, etc.) as required.
-
If you wish, the CLI can be used instead of using the console.
See service account create, service account add-key, policy create, policy add-binding
- To configure the CLI to use the service account, run the following command (choose your own PROFILE_NAME):
- To set the profile as the default, run the following command:
Once the profile is set as the default, subsequent CLI commands will run as the service account with its permissions.
Troubleshooting
If logging in with a service account using the steps above is not executing the CLI commands as expected, add the service account to the superusers
group.
This group will give full access to the service account. If the CLI commands are now returning as expected, additional permissions will need to be added to the service account using policies.
If it is still not working, ensure that the default profile is set to PROFILE_NAME.