Skip to content

Commit ab86233

Browse files
authored
docs: document API tokens (#675)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent 9168204 commit ab86233

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Controlplane API Tokens
3+
---
4+
5+
The Chainloop CLI is used to interact with the Chainloop Control Plane supports two authentication methods.
6+
7+
### User Authentication
8+
9+
- Meant for interactive use
10+
- Associated with an user account
11+
- Valid for 24 hours
12+
13+
They can be obtained by running the `chainloop auth login` command.
14+
15+
### API tokens
16+
17+
Alternatively, you can create Service Accounts (API Tokens) that
18+
19+
- Are meant for non-interactive use, i.e automation
20+
- Are associated with a organization
21+
- Have a customizable expiry time that can be manually revoked
22+
- supports ACL for fine-grained access control (SOON)
23+
24+
You can operate on your organization API tokens using the `chainloop organization api-token` command.
25+
26+
```sh
27+
$ chainloop organization api-token -h
28+
Manage API tokens to authenticate with the Chainloop API.
29+
30+
Usage:
31+
chainloop organization api-token [command]
32+
33+
Aliases:
34+
api-token, token
35+
36+
Available Commands:
37+
create Create an API token
38+
list List API tokens in this organization
39+
revoke revoke API token
40+
```
41+
42+
and then they can be used by the CLI by either setting `CHAINLOOP_API_TOKEN` environment variable or by using the `--token` flag, for example
43+
44+
```
45+
chainloop workflow list --token <your-token>
46+
```

0 commit comments

Comments
 (0)