To completely wield the capabilities of the Cerby Command Line Interface (CLI) and securely manage your sensitive data, you must complete the authentication process.
This article describes how to log in to the Cerby platform with the Cerby CLI via the login command. The login command is the first step in interacting with Cerby via its commands. This command secures your access to the platform's resources and initiates a session for executing further commands.
Cerby has the following authentication processes to enable you to log in even in unusual situations where you can't access a web browser:
The following sections describe each process.
Log in via a web browser
To log in via a web browser and start using the CLI commands, you must complete the following steps:
Access the location where the Cerby CLI is installed using your command line interface, depending on your OS.
Execute the following command in your OS command line interface:
Windows:
.\cerby-win.exe login
Linux:
./cerby-linux login
MacOS:
./cerby-macos login
You are redirected to your identity provider's login page on a browser page.
Enter your credentials to authenticate via single sign-on (SSO). The All set! page is displayed, meaning that the authentication has been successful.
Start using the Cerby commands in your command line.
To learn more about the available commands in the Cerby CLI, refer to the Use the Cerby CLI article.
Log in via a bearer token
In cases where opening a browser window is not an option, for example, using a remote server, you can use the --bearer-token
flag in the login command as an alternate way of authentication.
IMPORTANT: You must never share your bearer token with other users or store it in a visible place. Your bearer token is your unique identifier for performing different activities on Cerby, depending on your role. Be aware that bearer tokens expire after 10 minutes before renewal.
To obtain your Cerby bearer token and use it to log in to the Cerby platform, you must complete the following steps:
Log in to your corresponding Cerby workspace using the Cerby web app.
Click your user profile at the top-right side of the page. A drop-down list is displayed.
Click the My Profile option. The My Profile page is displayed with the General tab activated.
Activate the Dev Tools tab. The Developer tools section is displayed. You can see the Copy Bearer Token information in this section with the Copy token button at the right.
Click the Copy token button. Your bearer token is copied to the clipboard.
Reaccess your command line.
Execute the following command, making sure to paste your bearer token to replace the
{your-bearer-token}
value:login --bearer-token={your-bearer-token}
Start using the Cerby commands, explained in the Use the Cerby CLI article, as needed.
NOTE: Due to the short lifespan (10 minutes) of the --bearer-token
option, Cerby CLI supports direct bearer token insertion into commands. For example:
secrets list –bearer-token= {your-bearer-token}