You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(auth): Introduce possibility to use an environment variable to authenticate
If STACKIT_ACCESS_TOKEN is set this environment variable is used instead of stored tokens.
Additionally the activate-service-account command is extended in order to only print the token but not store them in the
keyring or in a file on the disk.
Signed-off-by: Alexander Dahmen <[email protected]>
You can also configure the service account credentials directly in the CLI. To get help and to get a list of the available options run the command with the `-h` flag.
15
15
16
+
**_Note:_** There is an optional flag `--only-print-access-token` which can be used to only obtain the access token which prevents writing the credentials to the keyring or into `~/.config/stackit/cli-auth-storage.txt`. This access token can be stored as environment variable (STACKIT_ACCESS_TOKEN) in order to be used for all subsequent commands by default.
17
+
16
18
### Overview
17
19
18
20
If you don't have a service account, create one in the [STACKIT Portal](https://portal.stackit.cloud/) and assign the necessary permissions to it, e.g. `owner`. There are two ways to authenticate:
Only print the corresponding access token by using the service account token. This access token can be stored as environment variable (STACKIT_ACCESS_TOKEN) in order to be used for all subsequent commands.
`Only print the corresponding access token by using the service account token. This access token can be stored as environment variable (STACKIT_ACCESS_TOKEN) in order to be used for all subsequent commands.`,
cmd.Flags().String(privateKeyPathFlag, "", "RSA private key path. It takes precedence over the private key included in the service account key, if present")
112
+
cmd.Flags().Bool(onlyPrintAccessTokenFlag, false, "If this is set to true the credentials are not stored in either the keyring or a file")
0 commit comments