Authentication Using Environment Variables
Using Environment Variables for Authentication
To simplify the authentication process, the KaaS CLI tool allows using environment variables to store authentication credentials. Alternatively, you can use Device login. Below are the steps to configure and use environment variables for authentication:
Setting Up Environment Variables:
You need to set up the following environment variables in your operating system:
KAAS_SERVER_URL
: The URL of the KaaS server (for development and testing).KAAS_DIRECTORY
: The directory path for KaaS configurations. Default is/out
.KAAS_KEY
: The key for accessing KaaS services. Can be obtained here.KAAS_ORG_VAULT
: The organization vault identifier for KaaS in the formatorgname/vaultname
.
Example:
On Windows:
On Linux/macOS:
Using Environment Variables in the CLI Tool:
The CLI tool will automatically read the values of
KAAS_SERVER_URL
,KAAS_DIRECTORY
,KAAS_KEY
, andKAAS_ORG_VAULT
from the environment variables. You do not need to pass these values explicitly each time you run a command.Example Command:
In this example, the CLI tool will authenticate using the credentials stored in the environment variables.
Verifying Environment Variable Setup:
You can verify that the environment variables are set correctly by running the following commands:
On Windows:
On Linux/macOS:
Last updated