The token key will only be available for copy once. Make sure to store it securely before leaving the page.
How to create and manage an authentication token from the console
This page shows you how to create and manage an authentication token from the Scaleway console.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Created a containers namespace
- Deployed a container
Creating authentication tokens from the Scaleway console
-
Click Containers in the Serverless section of the side menu. The Serverless Containers page displays.
-
Click the relevant containers namespace to see a list of containers in this namespace.
-
Click the name of the relevant container in the Containers tab. The container’s details display.
-
Click the Security tab. A list of settings displays.
-
Click Generate token in the Tokens panel. A pop-up displays.
-
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.
-
Copy the token from the pop-up and store it in a safe environment.
Important
Using tokens
To use your token, you have to add the generated token to a X-Auth-Token
header.
A private container observes this behavior:
- If a call is made without the
X-Auth-Token
header, the call is rejected (status code403
) - If the
X-Auth-Token
header is provided, the token is validated using a public key attached to the namespace.
For example, to execute a private container by providing a token using curl
, run the following command:
curl -H "X-Auth-Token: <YOUR_CONTAINER_TOKEN>" <YOUR_CONTAINER_ENDPOINT>
Deleting tokens
Tokens will expire by default on their given expiry date. You can delete them manually if they are no longer needed.
-
Click Containers in the Serverless section of the side menu. The Serverless Containers page displays.
-
Click the relevant containers namespace to see a list of containers in this namespace.
-
Click the name of the relevant container in the Containers tab. The container’s details display.
-
Click the Security tab. A list of settings displays.
-
Click «Delete Icon» next to the token you want to delete in the Tokens panel. A pop-up displays.
-
Confirm by clicking Delete token to delete the token and to revoke access to the container.
ImportantThis action is irreversible, and this token will not be able to access your container anymore.