Skip to content

Commit 68d4245

Browse files
committed
docs(srv): update
1 parent 7ac466b commit 68d4245

File tree

1 file changed

+36
-22
lines changed

1 file changed

+36
-22
lines changed

pages/serverless-containers/how-to/create-auth-token-from-console.mdx

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: How to create and manage an an authentication token from the console
3-
description: How to create an auth token from the Scaleway console.
4-
tags: authentication authentication-token containers auth
2+
title: How to manage authentication for private containers
3+
description: This page explains how to manage authentication to call private containers
4+
tags: authentication authentication-token containers auth iam access api secret key
55
dates:
6-
validation: 2025-11-18
6+
validation: 2025-11-19
77
posted: 2022-10-14
88
---
99
import Requirements from '@macros/iam/requirements.mdx'
@@ -17,7 +17,9 @@ This page shows you how to create and manage an authentication token from the Sc
1717
- [Created a containers namespace](/serverless-containers/how-to/create-manage-delete-containers-namespace/)
1818
- [Deployed a container](/serverless-containers/how-to/deploy-container/)
1919

20-
## Creating authentication tokens from the Scaleway console
20+
## Managing authentication from the Scaleway console
21+
22+
Serverless containers used to rely on a legacy token-based authentication to call private containers. [Scaleway IAM](/iam/) offers a modern way to access private resources using API keys.
2123

2224
<Tabs id="token-serverless">
2325
<TabsTab label="Scaleway IAM">
@@ -55,40 +57,52 @@ This page shows you how to create and manage an authentication token from the Sc
5557
</TabsTab>
5658
</Tabs>
5759

60+
## Calling private containers
5861

59-
## Using tokens
60-
61-
To use your token, you have to add the generated token to a `X-Auth-Token` header.
62+
To call a private container, you have to add the **secret key** of the [previously created API key](#managing-authentication-from-the-scaleway-console) to a `X-Auth-Token` header.
6263

6364
A **private** container observes this behavior:
6465

6566
* If a call is made without the `X-Auth-Token` header, the call is rejected (status code `403`)
66-
* If the `X-Auth-Token` header is provided, the token is validated using a public key attached to the namespace.
67+
* If the `X-Auth-Token` header is provided, the token is validated using the IAM API public key corresponding to the private key provided.
6768

68-
For example, to execute a private container by providing a token using `curl`, run the following command:
69+
For example, to execute a private container by providing a secret key using `curl`, run the following command:
6970

7071
```bash
71-
curl -H "X-Auth-Token: <YOUR_CONTAINER_TOKEN>" <YOUR_CONTAINER_ENDPOINT>
72+
curl -H "X-Auth-Token: <API_SECRET_KEY>" <YOUR_CONTAINER_ENDPOINT>
7273
```
7374

74-
## Deleting tokens
75+
## Revoking authentication
7576

76-
Tokens will expire by default on their given expiry date. You can delete them manually if they are no longer needed.
77+
<Tabs id="revoke-authentication">
78+
<TabsTab label="Scaleway IAM">
79+
To revoke authentication for your container, you can either:
80+
- remove the `ContainersPrivateAccess` permission set from the IAM policy
81+
- delete the IAM policy targeting the IAM application bearing the API key
82+
- delete the API key of your IAM application
83+
- delete the IAM application holding the API key
7784

78-
1. Click **Containers** in the **Serverless** section of the side menu. The Serverless Containers page displays.
85+
</TabsTab>
86+
<TabsTab label="JWT (legacy)">
87+
Tokens will expire by default on their given expiry date. You can delete them manually if they are no longer needed.
7988

80-
2. Click the relevant containers namespace to see a list of containers in this namespace.
89+
1. Click **Containers** in the **Serverless** section of the side menu. The Serverless Containers page displays.
8190

82-
3. Click the name of the relevant container in the **Containers** tab. The container's details display.
91+
2. Click the relevant containers namespace to see a list of containers in this namespace.
8392

84-
4. Click the **Security** tab. A list of settings displays.
93+
3. Click the name of the relevant container in the **Containers** tab. The container's details display.
8594

86-
5. Click <Icon name="delete" /> next to the token you want to delete in the **Tokens** panel. A pop-up displays.
95+
4. Click the **Security** tab. A list of settings displays.
96+
97+
5. Click <Icon name="delete" /> next to the token you want to delete in the **Tokens** panel. A pop-up displays.
8798

88-
6. Confirm by clicking **Delete token** to delete the token and to revoke access to the container.
99+
6. Confirm by clicking **Delete token** to delete the token and to revoke access to the container.
100+
101+
<Message type="important">
89102

90-
<Message type="important">
103+
This action is irreversible, and this token will not be able to access your container anymore.
91104

92-
This action is irreversible, and this token will not be able to access your container anymore.
105+
</Message>
106+
</TabsTab>
107+
</Tabs>
93108

94-
</Message>

0 commit comments

Comments
 (0)