Login
RegScale Login CLI
The Login CLI command is used to allow a user to authenticate to RegScale. It serves two primary purposes:
- Serves as a "smoke test" to ensure connectivity to RegScale
- Allows for authentication which sets the JSON Web Token (JWT) in the
init.yaml
programmatically which is good for up to 24 hours
Supported Login Methods
- Login with a user account:
--username
Your RegScale username, if none provided it will try to get it from the environment variableREGSCALE_USER
--password
Your RegScale password, if none provided it will try to get it from the environment variableREGSCALE_PASSWORD
--domain
Your RegScale instance URL, if none is provided it will try to get it from an environment variableREGSCALE_DOMAIN
. Lastly, if there it is not provided, nor is it set up in the environment, it will use the domain saved ininit.yaml
--mfa_token
The One Time Password to log in with if your RegScale instance has Multi-Factor Authentication enabled
- Login with a Service Account
--token
The service account token from the Admin panel in RegScale
How to Use
You can set up environment variables of REGSCALE_USER, REGSCALE_PASSWORD and REGSCALE_DOMAIN to skip all prompts and prevent entering a plain text password.
- Ensure the
domain
variable is set in yourinit.yaml
file to your RegScale instance's URL (i.e.https://mycompany.regscale.com
) - Attempt to login with the command below
regscale login
- At the prompts, enter your username and password
- If authentication was successful, your
init.yaml
will be updated with a newtoken
anduserId
variable - Login with a service token by using the command below
regscale login --token "Bearer eyao13.213asdajhd"
Updated about 1 year ago