API · v1 · stabiel
CODEMETA OSDeveloper Center
NL
Console openen
Entity · secrets

Secret Schema

Schema-ID
secret
Collection
secrets
Permissions
  • Lezensecret_view
  • Aanmakensecret_create
  • Wijzigensecret_edit
  • Verwijderensecret_delete
Relaties

Velden

Secret Schema

secrets4 permissions

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.

encryptedTitlestringvereist

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

min. 1 tekens
titleIvstringvereist

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

min. 1 tekens
lifecycleStatestringoptioneel

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

ACTIVEDESTROYEDnull
read-onlynullable
destroyedAtdatetimeoptioneel
read-onlynullable
destroyedByUserIduuidoptioneel
read-onlynullable
encryptedTagsobjectoptioneel

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

nullable
ciphertextstringvereist

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

min. 1 tekens
ivstringvereist

12-byte IV, base64url.

min. 1 tekens
encryptedNotesobjectoptioneel

Optional encrypted free-text notes blob.

nullable
ciphertextstringvereist
min. 1 tekens
ivstringvereist
min. 1 tekens
titleIndexstring[]vereist

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

titleIndexVersionintegervereist

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

≥ 1
secretTypestringvereist

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

1–100 tekensPattern
assetIduuidoptioneel→ asset

Linked asset UUID

nullable
linkedAssetIdsuuid[]optioneel

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 itemsnullable
partyIduuidoptioneel

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
assetPartyIduuidoptioneel

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
contractIduuidoptioneel

Linked contract UUID

nullable
encryptedPayloadstringvereist

AES-256-GCM encrypted payload, base64url-encoded

min. 1 tekens
payloadIvstringvereist

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

min. 1 tekens
dekUnchangedbooleanoptioneel

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

nullable
skipPayloadHistorybooleanoptioneel

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[]optioneel

Wrapped DEK entries for individually authorized users

nullable
userIduuidvereist

User who can decrypt this secret

wrappedDekstringvereist

ECDH-wrapped DEK, base64url-encoded

min. 1 tekens
ephemeralPublicKeystringvereist

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

min. 1 tekens
wrappedTeamKeysobject[]optioneel

Wrapped DEK entries for team-level access

Default: []nullable
teamIduuidvereist

Org unit (team) ID

wrappedDekstringvereist

Team-key-wrapped DEK, base64url-encoded

min. 1 tekens
teamKeyVersionintegervereist

Version of the team key used for wrapping

≥ 1
tenantWideAccessbooleanoptioneel

Whether this secret is accessible to all tenant members

Default: false
confidentialbooleanoptioneel

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
wrappedTenantKeystringoptioneel

Tenant-key-wrapped DEK, base64url-encoded

nullable
tenantKeyVersionintegeroptioneel

Version of the tenant key used for wrapping

≥ 1nullable
folderIduuidoptioneel

Vault folder this secret belongs to

nullable
secretTypeIduuidoptioneel

Reference to VaultSecretType for custom type definitions

nullable
wrappedFolderKeystringoptioneel

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

nullable
folderKeyVersionintegeroptioneel

Version of the folder key used for wrapping

≥ 1nullable
wrappedCustomerKeystringoptioneel

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

nullable
customerKeyVersionintegeroptioneel

Version of the customer key used for wrapping

≥ 1nullable
importSourcestringoptioneel

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

max. 100 tekensnullable
importedAtdatetimeoptioneel

When this secret was written by the import pipeline.

nullable
importConfirmedAtdatetimeoptioneel

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

read-onlynullable
importConfirmedByuuidoptioneel

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

read-onlynullable
needsRewrapbooleanoptioneel

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

Default: falsenullable
lastRewrapAtdatetimeoptioneel

Timestamp of last successful re-wrap

nullable
previousVersionsobject[]optioneel

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

max. 10 itemsread-onlynullable
encryptedPayloadstringvereist
min. 1 tekens
payloadIvstringvereist
min. 1 tekens
replacedAtdatetimevereist
replacedByUserIdstringoptioneel
nullable
attachmentsobject[]optioneel

Zero-knowledge encrypted file attachments stored in S3

Default: []nullable
fileIduuidvereist

Unique file identifier

encryptedNamestringvereist

AES-256-GCM encrypted filename, base64url-encoded

min. 1 tekens
nameIvstringvereist

12-byte IV for filename encryption, base64url-encoded

min. 1 tekens
sizeBytesintegervereist

Encrypted file size in bytes

≥ 0
fileIvstringvereist

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

min. 1 tekens
uploadedAtdatetimevereist

When the file was uploaded

uploadedByuuidvereist

User who uploaded the file

Standaard-endpoints

Deze resource volgt het generieke CRUD-contract van het platform. Lees de conventies voor paginering, idempotentie, optimistic locking en audit. De belangrijkste endpoints:

  • GET /api/v1/secrets — Lijst, gepagineerd + filterbaar
  • GET /api/v1/secrets/<id> — Enkele entity
  • POST /api/v1/secrets — Aanmaken
  • PATCH /api/v1/secrets/<id> — Gedeeltelijke update
  • DELETE /api/v1/secrets/<id> — Soft-delete
  • GET /api/v1/secrets/<id>/timeline — Audit + activiteiten

Zoeken