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:
Steps
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. Select the 'My Profile' option from the displayed menu;
Step 3. In the Account Portal main menu, 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 Tokens' button, and you're done! A screen will display the following information:
Client ID
;Client Key
;- Realm; and
- An example of how to use them.
The generated data will be displayed temporarily. Copy and save them.
You can now use the information to authenticate via the terminal.
-
The keys are per user in the organization. If a user generates a new key, the previous one becomes invalid;
-
When you generate a new key, it does not invalidate the other users' keys in the same organization;
-
The end session time is currently 20 minutes.
Authenticate via Command Line
In your terminal or pipeline, replace the values between braces with the values you received in the previous step:
stk login --client-id <ID> --client-key <KEY> --realm <REALM>
Execute the command above without the < > keys.
You need to do this every time you want to automate a process in StackSpot.