Access Token
In this section, you will find information about Profile Personal Token and Access Token (PAT).
At this stage of Account customization, you need to make the following settings:
Generate the Personal Access Token (PAT) keys
StackSpot generates for you, as a user, an Access Token or PAT (Personal Access Token). This allows you to run StackSpot's services using a client id and a client key.
This type of authentication makes it possible to keep a session active with a configurable expiration time. You need to use STK CLI via the command line, for example, in CI/CD pipelines. You need these credentials to run some commands, for example, in a Pipeline via the command line in the STK CLI.
To configure, follow the instructions below:
For security purposes, credentials such as the Personal Access Token (PAT) are stored in an encrypted format on StackSpot. Once saved, this information cannot be viewed or retrieved through the platform.
To authenticate, get the keys from the StackSpot Platform and use them on the command line with the stk login command in your pipeline. Follow the steps below:
Step 1. Access the Account Portal directly; or after logging into the StackSpot Portal, click on your profile avatar.
Step 2. Click the 'My Profile' option;
Step 3. In the Account Portal, click 'Access Token';
Step 4. Now you need to generate the Personal Access Token (PAT) keys to be provided in the command line along with the stk login command in your pipeline.
Click the 'Generate Client Key' button, and you're done! A screen will display the following information:
Client ID;Client Key;- Realm; and
- An example of how to use these values
These details are shown only once. Copy and save them in a secure place.
You can now use the information to authenticate via the terminal.
- PATs are generated per user. If you generate a new PAT, your previous one becomes invalid.
- Generating a new PAT does not affect other users’ tokens in your organization.
- The session expires after 20 minutes.
Authenticate via Command Line
To authenticate, run the following command in your terminal or pipeline, replacing the placeholders with your actual values:
stk login --client-id <ID> --client-key <KEY> --realm <REALM>
Execute the command above without the < > keys.
You need to authenticate each time you want to automate a process using StackSpot.