NavigationContentFooter

Secret Manager API

Download (.yml, 61KB)

Introduction

Scaleway’s Secret Manager allows you to conveniently store, access and share sensitive data such as passwords, API keys and certificates. With Secret Manager you can manage secrets which are logical containers made up of zero or more immutable versions, that hold sensitive data. Your data is encrypted both in transit and at rest and it is automatically replicated to multiple zones within your region of choice.

Concepts

Refer to our to find definitions of the different terms referring to Secret Manager.

Quickstart

  1. Configure your environment variables.

    Note

    This is an optional step that seeks to simplify your usage of the API.

    export SCW_ACCESS_KEY="<API access key>"
    export SCW_SECRET_KEY="<API secret key>"
    export SCW_PROJECT_ID="<Scaleway Project ID>
  2. Create a secret. Run the following command to create a secret in the root (/) folder:

    curl "https://api.scaleway.com/secret-manager/v1beta1/regions/$REGION/secrets" \
    -H "Content-Type: application/json" \
    -H "X-Auth-Token: $SCW_SECRET_KEY" \
    -d '{
    "name": "my-secret",
    "project_id": "'"$PROJECT_ID"'"
    }'
  3. Create a secret version. Run the following command to create a version of your secret:

    curl "https://api.scaleway.com/secret-manager/v1beta1/regions/$REGION/secrets/<SECRET_ID>/versions" \
    -H "X-Auth-Token: $SCW_SECRET_KEY" \
    -d "{\"data\":\"$(echo -n "p@sSw0Rd_" | base64)\"}"
  4. Access data from your latest secret version. Run the following command to access the data of your most recent secret version:

    curl "https://api.scaleway.com/secret-manager/v1beta1/regions/$REGION/secrets/<SECRET_ID>/versions/latest/access" \
    -H "Content-Type: application/json" \
    -H "X-Auth-Token: $SCW_SECRET_KEY"
    Note

    Requests can either target a specific version or the latest.

Requirements
  • You have your
  • You have
  • You have
  • You have created an and that the API key has sufficient to perform the actions described on this page

Technical information

Regions

Scaleway's infrastructure spans different .

Secret Manager is available in the Paris, Amsterdam and Warsaw regions, which are represented by the following path parameters:

  • fr-par
  • nl-ams
  • pl-waw

Technical limitations

  • Operations on secrets and versions are limited to CRUDL
  • A secret's payload size is limited to 64KiB

Going further

For more information about Secret Manager, you can check out the following pages:

  • join the #secret-manager channel
  • .

Secrets

Secrets are logical containers made up of zero or more immutable versions, that contain sensitive data

GET
/secret-manager/v1beta1/regions/{region}/secrets
POST
/secret-manager/v1beta1/regions/{region}/secrets
GET
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}
PATCH
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}
DELETE
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}
POST
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/add-owner
POST
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/protect
POST
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/unprotect

Secret Versions

Versions store the sensitive data contained in your secrets (API keys, passwords, or certificates)

GET
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions
POST
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions
GET
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}
PATCH
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}
DELETE
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}
GET
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}/access
POST
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}/disable
POST
/secret-manager/v1beta1/regions/{region}/secrets/{secret_id}/versions/{revision}/enable
Cloud Products & Resources
Dedicated Products & Resources
Scaleway
Follow us
© 1999-2024 – Scaleway SAS