Skip to content

Commit 426daab

Browse files
committed
docs(srv): add doc on new auth method MTA-6708
1 parent 589429b commit 426daab

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

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

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,42 @@ This page shows you how to create and manage an authentication token from the Sc
2020

2121
## Creating authentication tokens from the Scaleway console
2222

23-
1. Click **Containers** in the **Serverless** section of the side menu. The Serverless Containers page displays.
23+
<Tabs id="token-serverless">
24+
<TabsTab label="Scaleway IAM">
25+
1. [Create an IAM application](/iam/how-to/create-application/) that will be used as a principal for the policy granting access to your private container.
2426

25-
2. Click the relevant containers namespace to see a list of containers in this namespace.
27+
2. [Create an API key](/iam/how-to/create-api-keys/) for your application. Store the secret key securely, as it is only shown once.
2628

27-
3. Click the name of the relevant container in the **Containers** tab. The container's details display.
29+
3. [Create an IAM policy](/iam/how-to/create-policy/) with the following elements:
30+
- **Scope**: the desired Project(s)
31+
- **Principal**: the application you just created
32+
- **Permission set**: `ContainersPrivateAccess`
33+
34+
You can now [use your private key as a token](#using-tokens) to call private containers.
35+
</TabsTab>
36+
<TabsTab label="JWT (legacy)">
37+
1. Click **Containers** in the **Serverless** section of the side menu. The Serverless Containers page displays.
2838

29-
4. Click the **Security** tab. A list of settings displays.
39+
2. Click the relevant containers namespace to see a list of containers in this namespace.
3040

31-
5. Click **Generate token** in the **Tokens** panel. A pop-up displays.
41+
3. Click the name of the relevant container in the **Containers** tab. The container's details display.
3242

33-
6. Enter the token description and set an expiration date for the token. Optionally, tick the box **No expiration date**, to have a token with unlimited validity. Then, click **Generate token**.
43+
4. Click the **Security** tab. A list of settings displays.
3444

35-
7. Copy the token from the pop-up and store it in a safe environment.
45+
5. Click **Generate token** in the **Tokens** panel. A pop-up displays.
3646

37-
<Message type="important">
47+
6. Enter the token description and set an expiration date for the token. Optionally, tick the box **No expiration date**, to have a token with unlimited validity. Then, click **Generate token**.
3848

39-
The token key will only be available for copy once. Make sure to store it securely before leaving the page.
49+
7. Copy the token from the pop-up and store it in a safe environment.
50+
51+
<Message type="important">
52+
53+
The token key will only be available for copy once. Make sure to store it securely before leaving the page.
54+
55+
</Message>
56+
</TabsTab>
57+
</Tabs>
4058

41-
</Message>
4259

4360
## Using tokens
4461

0 commit comments

Comments
 (0)