Skip to content

Secrets Manager concepts

This page explains the core concepts behind Secrets Manager: how secrets are identified, scoped, versioned, and encrypted.

Secret (container)

A secret is a container identified by its path. Each secret is scoped to:

ScopeRequiredDescription
OrganisationYesYour Thalassa Cloud organisation
Cloud regionYesExactly one region per secret
ProjectNoSet via X-Project-Identity or OIDC project claim

At creation, you bind exactly one KMS key (kmsKeyIdentity). This binding is immutable — you cannot change the encryption key after create.

Metadata

Secret metadata includes:

FieldDescription
descriptionHuman-readable description
labelsKey-value labels for organisation and filtering
annotationsAdditional metadata
currentVersionThe latest active version number
lastAccessedAtUpdated when a value is successfully decrypted
accessPolicyOptional IP and time restrictions

Secret values are never returned on list or metadata APIs.

Version (revision)

Each stored value is a numbered version:

EventVersion behaviour
Create secretVersion 1 is created
putSecretValueIncrements version (2, 3, …)
Latest active versionMarked with stage current
destroySecretVersionVersion status becomes destroyed; value cannot be read

Destroyed versions remain in version history for audit purposes but are not decryptable.

Retrieve version history (without values) with GET /v1/secrets/{region}/secret{path}?includeVersions=true.

Value formats

Each version stores exactly one payload format:

FormatWrite withRead returnsUse case
stringsecretString (base64) or generateSecretsecretString (base64)Single blob: API token, PEM, connection string
keyValuesecretKeyValues (map of base64 values)secretKeyValues (map of base64 values)Structured credentials: username + password

Use key/value for credentials with multiple fields. Use string for a single value.

Envelope encryption

Secret material is encrypted with KMS before storage:

  1. You provide plaintext (or request platform generation)
  2. Secrets Manager encrypts the value with the bound KMS key
  3. The encrypted envelope (ciphertext + KMS key identity + KMS key version) is stored internally
  4. On getSecretValue, the value is decrypted and returned

The encrypted envelope is never exposed on metadata APIs. On successful getSecretValue, the response includes kmsKeyIdentity and kmsKeyVersion for transparency, but not the raw ciphertext.

Each getSecretValue and putSecretValue triggers underlying KMS decrypt and encrypt operations, visible in the audit log.

Last accessed

lastAccessedAt on the secret and per version is updated when a value is successfully decrypted via getSecretValue. Use this field for access reviews and identifying unused secrets.

Scoping model

Regional

Secrets exist in exactly one cloud region. All API calls use /v1/secrets/{region}/…. Cross-region secret access is not supported.

Project context

ContextScope
With X-Project-IdentitySecrets are project-scoped
Without project contextSecrets are organisation-scoped

This follows the same pattern as KMS keys, VPCs, and NAT gateways. List, get, and mutations only apply within the active scope.

Path namespace

Paths form a hierarchical namespace, similar to a filesystem:

/
├── app/
│   ├── production/
│   │   └── db/
│   │       ├── password
│   │       └── credentials
│   └── staging/
│       └── db/
│           └── password
└── infra/
    └── vpn/
        └── cert

Paths are the IAM resource identity. Two secrets cannot share the same path within the same organisation + region + project scope.

Related documentation