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.yamlprogrammatically which is good for up to 24 hours
Supported Login Methods
- Login with a user account:
--usernameYour RegScale username, if none provided it will try to get it from the environment variableREGSCALE_USER--passwordYour RegScale password, if none provided it will try to get it from the environment variableREGSCALE_PASSWORD--domainYour 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_tokenThe One Time Password to log in with if your RegScale instance has Multi-Factor Authentication enabled
- Login with a Service Account
--tokenThe 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
domainvariable is set in yourinit.yamlfile 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.yamlwill be updated with a newtokenanduserIdvariable - Login with a service token by using the command below
regscale login --token "Bearer eyao13.213asdajhd"
Updated almost 2 years ago
