How to set and manage credential maximum duration
For increased security in your Organization, you can define a maximum duration for credentials (console sessions and API keys) created within it. Limiting credential lifetime reduces the risk of leaked or compromised credentials remaining valid at the time of exposure.
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
How to set a maximum duration for API keys
You can define a maximum duration for all API keys created inside your Organization. By default, API keys do not expire unless the creator specifies an expiration date when creating them.
-
Go to your security settings.
-
Scroll to the Credential limitations section.
-
Click *Set up API keys duration. A pop-up appears.
-
Choose the maximum duration allowed for API keys in the Organization.
-
Click Confirm.
The maximum duration now applies to all newly created API keys. Users must specify an expiration date that complies with this limit. Any API key created with no expiration date or a duration exceeding the limit will result in an error.
How to edit or remove a maximum duration for API keys
- Go to your security settings.
- Scroll to the Credential limitations section.
- Click *Set up API keys duration. A pop-up appears.
- In the pop-up, you can:
- Select a new maximum duration
- Remove the limitation entirely
- Click Confirm.
How to define a maxium duration for console sessions
A console session corresponds to the period during which a user is logged in to the Scaleway console and able to perform actions (view, create, manage resources). Sessions end when the user logs out, or automatically when the maximum duration is reached. All console sessions have a maximum duration. By default, if not manually configured, the maximum duration is 30 days.
- Go to your security settings.
- Scroll to the Credential limitations section.
- Click Edit in the Console session maximum duration section. A pop-up appears.
- Choose the maximum allowed duration for console sessions in your Organization.
- Click Confirm.