Skip to content

Commit 4109f42

Browse files
committed
scout: support OATs
Signed-off-by: David Karlsson <[email protected]>
1 parent 27094d5 commit 4109f42

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

content/manuals/scout/explore/metrics-exporter.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ The metrics endpoint exposes the following metrics:
3737
## Creating an access token
3838

3939
To export metrics from your organization, first make sure your organization is enrolled in Docker Scout.
40-
Then, create a Personal Access Token (PAT) - a secret token that allows the exporter to authenticate with the Docker Scout API.
40+
Then, create an Organization Access Token (OAT) - a secret token that allows the exporter to authenticate the organization with the Docker Scout API.
4141

42-
The PAT does not require any specific permissions, but it must be created by a user who is an owner of the Docker organization.
43-
To create a PAT, follow the steps in [Create an access token](/security/for-developers/access-tokens/#create-an-access-token).
42+
The access token does not require any specific permissions, but it must be an organization access token created for the Docker organization in question,
43+
or a personal access token created by a user who is an owner of the Docker organization.
44+
For instructions on how to create an access token, follow the steps in [Create an access token](/security/for-developers/access-tokens/#create-an-access-token).
4445

45-
Once you have created the PAT, store it in a secure location.
46+
Once you have created the access token, store it in a secure location.
4647
You will need to provide this token to the exporter when scraping metrics.
4748

4849
## Prometheus
@@ -70,11 +71,11 @@ Make sure that there's no firewall rule in place preventing the server from comm
7071

7172
### Add bearer token authentication
7273

73-
To scrape metrics from the Docker Scout Exporter endpoint using Prometheus, you need to configure Prometheus to use the PAT as a bearer token.
74-
The exporter requires the PAT to be passed in the `Authorization` header of the request.
74+
To scrape metrics from the Docker Scout Exporter endpoint using Prometheus, you need to configure Prometheus to use the Docker access token as a bearer token.
75+
The exporter requires the access token to be passed in the `Authorization` header of the request.
7576

7677
Update the Prometheus configuration file to include the `authorization` configuration block.
77-
This block defines the PAT as a bearer token stored in a file:
78+
This block defines the access token as a bearer token stored in a file:
7879

7980
```yaml
8081
scrape_configs:
@@ -84,10 +85,10 @@ scrape_configs:
8485
credentials_file: /etc/prometheus/token
8586
```
8687

87-
The content of the file should be the PAT in plain text:
88+
The content of the file should be the access token in plain text:
8889

8990
```console
90-
dckr_pat_...
91+
dckr_oat_...
9192
```
9293

9394
If you are running Prometheus in a Docker container or Kubernetes pod, mount the file into the container using a volume or secret.
@@ -112,7 +113,7 @@ alongside Grafana with a pre-configured dashboard to visualize the vulnerability
112113
and store it in a plain text file at `/prometheus/prometheus/token` under the template directory.
113114

114115
```plaintext {title=token}
115-
$ echo $DOCKER_PAT > ./prometheus/token
116+
$ echo $DOCKER_TOKEN > ./prometheus/token
116117
```
117118

118119
3. In the Prometheus configuration file at `/prometheus/prometheus/prometheus.yml`,
@@ -245,7 +246,7 @@ and a Datadog site.
245246
and store it in a plain text file at `/datadog/token` under the template directory.
246247

247248
```plaintext {title=token}
248-
$ echo $DOCKER_PAT > ./token
249+
$ echo $DOCKER_TOKEN > ./token
249250
```
250251

251252
3. In the `/datadog/compose.yaml` file, update the `DD_API_KEY` and `DD_SITE` environment variables
@@ -346,8 +347,8 @@ To change the scrape interval:
346347

347348
## Revoke an access token
348349

349-
If you suspect that your PAT has been compromised or is no longer needed, you can revoke it at any time.
350-
To revoke a PAT, follow the steps in the [Create and manage access tokens](/security/for-developers/access-tokens/#modify-existing-tokens).
350+
If you suspect that your access token has been compromised or is no longer needed, you can revoke it at any time.
351+
To revoke an access token, follow the steps in the [Create and manage access tokens](/security/for-developers/access-tokens/#modify-existing-tokens).
351352

352-
Revoking a PAT immediately invalidates the token, and prevents Prometheus from scraping metrics using that token.
353-
You will need to create a new PAT and update the Prometheus configuration to use the new token.
353+
Revoking an access token immediately invalidates the token, and prevents Prometheus from scraping metrics using that token.
354+
You will need to create a new access token and update the Prometheus configuration to use the new token.

content/manuals/scout/how-tos/configure-cli.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ CLI commands, and the corresponding `docker/scout-cli` container image:
1818
| DOCKER_SCOUT_OFFLINE | Boolean | Use [offline mode](#offline-mode) when indexing SBOM |
1919
| DOCKER_SCOUT_REGISTRY_TOKEN | String | Token for authenticating to a registry when pulling images |
2020
| DOCKER_SCOUT_REGISTRY_USER | String | Username for authenticating to a registry when pulling images |
21-
| DOCKER_SCOUT_REGISTRY_PASSWORD | String | Password or personal access token for authenticating to a registry when pulling images |
21+
| DOCKER_SCOUT_REGISTRY_PASSWORD | String | Password or access token for authenticating to a registry when pulling images |
2222
| DOCKER_SCOUT_HUB_USER | String | Docker Hub username for authenticating to the Docker Scout backend |
23-
| DOCKER_SCOUT_HUB_PASSWORD | String | Docker Hub password or personal access token for authenticating to the Docker Scout backend |
23+
| DOCKER_SCOUT_HUB_PASSWORD | String | Docker Hub password or access token for authenticating to the Docker Scout backend |
2424
| DOCKER_SCOUT_NEW_VERSION_WARN | Boolean | Warn about new versions of the Docker Scout CLI |
2525
| DOCKER_SCOUT_EXPERIMENTAL_WARN | Boolean | Warn about experimental features |
2626
| DOCKER_SCOUT_EXPERIMENTAL_POLICY_OUTPUT | Boolean | Disable experimental output for policy evaluation |

content/manuals/scout/install.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ Use the `docker/scout-cli` to run `docker scout` commands without installing the
115115

116116
```console
117117
$ docker run -it \
118-
-e DOCKER_SCOUT_HUB_USER=<your Docker Hub user name> \
119-
-e DOCKER_SCOUT_HUB_PASSWORD=<your Docker Hub PAT> \
118+
-e DOCKER_SCOUT_HUB_USER=<your-docker-username> \
119+
-e DOCKER_SCOUT_HUB_PASSWORD=<your-docker-token> \
120120
docker/scout-cli <command>
121121
```
122122

content/manuals/scout/integrations/environment/cli.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ refer to the [CLI reference](/reference/cli/docker/scout/environment.md).
2020
Before you start, set the following environment variables in your CI system:
2121

2222
- `DOCKER_SCOUT_HUB_USER`: your Docker Hub username
23-
- `DOCKER_SCOUT_HUB_PASSWORD`: your Docker Hub personal access token
23+
- `DOCKER_SCOUT_HUB_PASSWORD`: your Docker Hub access token
2424

2525
Make sure the variables are accessible to your project.
2626

content/manuals/security/for-admins/access-tokens.md

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ The organization access tokens feature is currently in [Beta](../../release-life
1515
> Organization access tokens aren't currently compatible with the following services:
1616
>
1717
> - Docker Build Cloud
18-
> - Docker Scout
1918
> - Docker REST APIs
2019
>
2120
> If you use these services, you must use personal access tokens instead.

0 commit comments

Comments
 (0)