API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · secrets

Secret Schema

ID du schéma
secret
Collection
secrets
Autorisations
  • Liresecret_view
  • Créersecret_create
  • Modifiersecret_edit
  • Supprimersecret_delete
Relations

Champs

Secret Schema

secrets4 autorisations

Zero-knowledge encrypted secret entity (v2 — ADR 0084 + ADR 0089). The server never sees plaintext title, tags, notes, or payload — only IDs, ciphertext, and HMAC-trigram blind index entries.

encryptedTitlestringobligatoire

AES-256-GCM encrypted title, base64url-encoded.

min. 1 caractères
titleIvstringobligatoire

12-byte IV for title encryption, base64url-encoded.

min. 1 caractères
lifecycleStatestringfacultatif

DESTROYED: Der Schlüssel wurde vernichtet, die damit verschlüsselten Daten sind weg.

ACTIVEDESTROYEDnull
lecture seulenullable
destroyedAtdatetimefacultatif
lecture seulenullable
destroyedByUserIduuidfacultatif
lecture seulenullable
encryptedTagsobjectfacultatif

Encrypted blob of tags (JSON-serialized array). Plaintext tags MUST NOT be sent.

nullable
ciphertextstringobligatoire

AES-256-GCM ciphertext of JSON.stringify(tags), base64url.

min. 1 caractères
ivstringobligatoire

12-byte IV, base64url.

min. 1 caractères
encryptedNotesobjectfacultatif

Optional encrypted free-text notes blob.

nullable
ciphertextstringobligatoire
min. 1 caractères
ivstringobligatoire
min. 1 caractères
titleIndexstring[]obligatoire

Per-scope HMAC-trigram blind index for searchable encryption (ADR 0089). Empty array allowed only when no searchable text was provided at write time.

titleIndexVersionintegerobligatoire

SEARCH_INDEX_VERSION at write time. Bumped when normalisation rules change; client lazy-reindexes on save.

≥ 1
secretTypestringobligatoire

Type-key (plaintext OK — needed for UI grouping / icons; on its own it does not reveal secret content).

1–100 caractèresMotif
assetIduuidfacultatif→ asset

Linked asset UUID

nullable
linkedAssetIdsuuid[]facultatif

Additional linked asset UUIDs besides the primary `assetId` (e.g. one backup encryption key used by several backup servers). Assignment only; `?assetId=` on the list matches both. Does not influence `assetPartyId`.

max. 50 élémentsnullable
partyIduuidfacultatif

Linked party/customer UUID. NOT a plain link — this field selects the CRYPTO SCOPE: it switches the client to customer-key encryption (`wrappedCustomerKey`), puts the blind index under the customer-SSK, and opens the row to every holder of that customer key in `buildVaultSecretVisibilityFilter`. Only ever set it together with a matching re-encryption. To express "belongs to customer X" for filtering, use `assetPartyId`.

nullable
assetPartyIduuidfacultatif

Denormalized `asset.partyId` of the linked asset — assignment/filtering only. Carries NO cryptographic meaning and is deliberately absent from the vault visibility filter. Server-derived; never trusted from the client.

nullable
contractIduuidfacultatif

Linked contract UUID

nullable
encryptedPayloadstringobligatoire

AES-256-GCM encrypted payload, base64url-encoded

min. 1 caractères
payloadIvstringobligatoire

12-byte IV for AES-256-GCM, base64url-encoded

min. 1 caractères
dekUnchangedbooleanfacultatif

Transport-only client assertion that the DEK was reused for this update. Stripped by secret.hooks.ts beforeUpdate — never stored.

nullable
skipPayloadHistorybooleanfacultatif

Transport-only client assertion that no password-type field changed in this payload update; the version ring is left untouched. Stripped by secret.hooks.ts beforeUpdate — never stored.

nullable
wrappedKeysobject[]facultatif

Wrapped DEK entries for individually authorized users

nullable
userIduuidobligatoire

User who can decrypt this secret

wrappedDekstringobligatoire

ECDH-wrapped DEK, base64url-encoded

min. 1 caractères
ephemeralPublicKeystringobligatoire

Ephemeral ECDH public key used for wrapping, JWK base64url-encoded

min. 1 caractères
wrappedTeamKeysobject[]facultatif

Wrapped DEK entries for team-level access

Par défaut : []nullable
teamIduuidobligatoire

Org unit (team) ID

wrappedDekstringobligatoire

Team-key-wrapped DEK, base64url-encoded

min. 1 caractères
teamKeyVersionintegerobligatoire

Version of the team key used for wrapping

≥ 1
tenantWideAccessbooleanfacultatif

Whether this secret is accessible to all tenant members

Par défaut : false
confidentialbooleanfacultatif

Confidential entry (ADR 1195): only delivered to callers with secret_view_confidential (or the creator). null/absent follows the secret type; false overrides a confidential type.

nullable
wrappedTenantKeystringfacultatif

Tenant-key-wrapped DEK, base64url-encoded

nullable
tenantKeyVersionintegerfacultatif

Version of the tenant key used for wrapping

≥ 1nullable
folderIduuidfacultatif

Vault folder this secret belongs to

nullable
secretTypeIduuidfacultatif

Reference to VaultSecretType for custom type definitions

nullable
wrappedFolderKeystringfacultatif

DEK wrapped with Folder Key (AES-KW), base64url

nullable
folderKeyVersionintegerfacultatif

Version of the folder key used for wrapping

≥ 1nullable
wrappedCustomerKeystringfacultatif

DEK wrapped with Customer Key (AES-KW), base64url

nullable
customerKeyVersionintegerfacultatif

Version of the customer key used for wrapping

≥ 1nullable
importSourcestringfacultatif

Key of the import source this secret was created by (e.g. 'tanss', 'lastpass'). Absent for hand-created secrets.

max. 100 caractèresnullable
importedAtdatetimefacultatif

When this secret was written by the import pipeline.

nullable
importConfirmedAtdatetimefacultatif

When a user confirmed the imported values are correct. Null/absent on an imported secret means the confirmation panel is still pending.

lecture seulenullable
importConfirmedByuuidfacultatif

Internal user UUID who confirmed the import (users._id, not the auth id).

lecture seulenullable
needsRewrapbooleanfacultatif

Flagged after key rotation; triggers lazy re-wrap on next access

Par défaut : falsenullable
lastRewrapAtdatetimefacultatif

Timestamp of last successful re-wrap

nullable
previousVersionsobject[]facultatif

Server-managed ring of previous encrypted payloads (newest first), all under the current DEK. ADR 0847.

max. 10 élémentslecture seulenullable
encryptedPayloadstringobligatoire
min. 1 caractères
payloadIvstringobligatoire
min. 1 caractères
replacedAtdatetimeobligatoire
replacedByUserIdstringfacultatif
nullable
attachmentsobject[]facultatif

Zero-knowledge encrypted file attachments stored in S3

Par défaut : []nullable
fileIduuidobligatoire

Unique file identifier

encryptedNamestringobligatoire

AES-256-GCM encrypted filename, base64url-encoded

min. 1 caractères
nameIvstringobligatoire

12-byte IV for filename encryption, base64url-encoded

min. 1 caractères
sizeBytesintegerobligatoire

Encrypted file size in bytes

≥ 0
fileIvstringobligatoire

12-byte IV for file content encryption, base64url-encoded

min. 1 caractères
uploadedAtdatetimeobligatoire

When the file was uploaded

uploadedByuuidobligatoire

User who uploaded the file

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/secrets — Liste, paginée et filtrable
  • GET /api/v1/secrets/<id> — Une entité
  • POST /api/v1/secrets — Créer
  • PATCH /api/v1/secrets/<id> — Mise à jour partielle
  • DELETE /api/v1/secrets/<id> — Suppression logique
  • GET /api/v1/secrets/<id>/timeline — Audit et activités

Recherche