API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen
Entity · secrets

Secret Schema

Schema-ID
secret
Collection
secrets
Permissions
  • Lesensecret_view
  • Anlegensecret_create
  • Ändernsecret_edit
  • Löschensecret_delete
Beziehungen

Felder

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.

encryptedTitlestringerforderlich

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

min 1 Zeichen
titleIvstringerforderlich

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

min 1 Zeichen
encryptedTagsobjectoptional

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

nullable
ciphertextstringerforderlich

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

min 1 Zeichen
ivstringerforderlich

12-byte IV, base64url.

min 1 Zeichen
encryptedNotesobjectoptional

Optional encrypted free-text notes blob.

nullable
ciphertextstringerforderlich
min 1 Zeichen
ivstringerforderlich
min 1 Zeichen
titleIndexstring[]erforderlich

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

titleIndexVersionintegererforderlich

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

≥ 1
secretTypestringerforderlich

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

1–100 ZeichenPattern
assetIduuidoptional→ asset

Linked asset UUID

nullable
partyIduuidoptional

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
assetPartyIduuidoptional

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
contractIduuidoptional

Linked contract UUID

nullable
encryptedPayloadstringerforderlich

AES-256-GCM encrypted payload, base64url-encoded

min 1 Zeichen
payloadIvstringerforderlich

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

min 1 Zeichen
wrappedKeysobject[]optional

Wrapped DEK entries for individually authorized users

nullable
userIduuiderforderlich

User who can decrypt this secret

wrappedDekstringerforderlich

ECDH-wrapped DEK, base64url-encoded

min 1 Zeichen
ephemeralPublicKeystringerforderlich

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

min 1 Zeichen
wrappedTeamKeysobject[]optional

Wrapped DEK entries for team-level access

Default: []nullable
teamIduuiderforderlich

Org unit (team) ID

wrappedDekstringerforderlich

Team-key-wrapped DEK, base64url-encoded

min 1 Zeichen
teamKeyVersionintegererforderlich

Version of the team key used for wrapping

≥ 1
tenantWideAccessbooleanoptional

Whether this secret is accessible to all tenant members

Default: false
wrappedTenantKeystringoptional

Tenant-key-wrapped DEK, base64url-encoded

nullable
tenantKeyVersionintegeroptional

Version of the tenant key used for wrapping

≥ 1nullable
folderIduuidoptional

Vault folder this secret belongs to

nullable
secretTypeIduuidoptional

Reference to VaultSecretType for custom type definitions

nullable
wrappedFolderKeystringoptional

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

nullable
folderKeyVersionintegeroptional

Version of the folder key used for wrapping

≥ 1nullable
wrappedCustomerKeystringoptional

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

nullable
customerKeyVersionintegeroptional

Version of the customer key used for wrapping

≥ 1nullable
importSourcestringoptional

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

max 100 Zeichennullable
importedAtdatetimeoptional

When this secret was written by the import pipeline.

nullable
importConfirmedAtdatetimeoptional

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

read-onlynullable
importConfirmedByuuidoptional

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

read-onlynullable
needsRewrapbooleanoptional

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

Default: falsenullable
lastRewrapAtdatetimeoptional

Timestamp of last successful re-wrap

nullable
attachmentsobject[]optional

Zero-knowledge encrypted file attachments stored in S3

Default: []nullable
fileIduuiderforderlich

Unique file identifier

encryptedNamestringerforderlich

AES-256-GCM encrypted filename, base64url-encoded

min 1 Zeichen
nameIvstringerforderlich

12-byte IV for filename encryption, base64url-encoded

min 1 Zeichen
sizeBytesintegererforderlich

Encrypted file size in bytes

≥ 0
fileIvstringerforderlich

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

min 1 Zeichen
uploadedAtdatetimeerforderlich

When the file was uploaded

uploadedByuuiderforderlich

User who uploaded the file

Standard-Endpoints

Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:

  • GET /api/v1/secrets — Liste, paginiert + filterbar
  • GET /api/v1/secrets/<id> — Einzelne Entity
  • POST /api/v1/secrets — Anlegen
  • PATCH /api/v1/secrets/<id> — Teil-Update
  • DELETE /api/v1/secrets/<id> — Soft-Delete
  • GET /api/v1/secrets/<id>/timeline — Audit + Aktivitäten

Suche