feat(tenancy): sealed secrets of a tenant #64

Merged
crapougnax merged 3 commits from feat/63-tenant-secrets into develop 2026-11-17 20:10:24 +00:00
Member

Closes #63 — stacked on #66 (reversible HashProperty): merge #66 first; until then this diff also shows its commits.

  • Values are sealed by the reversible HashProperty of @quatrain/core (AES-256-GCM), bound to their tenant and name. The package carries no cipher of its own.
  • TenantSecret model (collection tenant_secrets) and TenantSecretRepository: stored through any backend adapter; the record only holds the sealed text.
  • TenantSecretStoreInterface and InMemoryTenantSecretStore.
  • TenantSecrets: set, get, has, names, delete; key given to the service or set with HashProperty.setDefaultKey().
  • SecretUnreadableError: never carries the value.
  • README and HOWTO (English; the package has no French companion yet).

Tests: 10 passing, on the in-memory store and on the repository over SQLite.

🤖 Generated with Claude Code

Closes #63 — **stacked on #66** (reversible `HashProperty`): merge #66 first; until then this diff also shows its commits. - Values are sealed by the reversible `HashProperty` of `@quatrain/core` (AES-256-GCM), bound to their tenant and name. The package carries no cipher of its own. - `TenantSecret` model (collection `tenant_secrets`) and `TenantSecretRepository`: stored through any backend adapter; the record only holds the sealed text. - `TenantSecretStoreInterface` and `InMemoryTenantSecretStore`. - `TenantSecrets`: set, get, has, names, delete; key given to the service or set with `HashProperty.setDefaultKey()`. - `SecretUnreadableError`: never carries the value. - README and HOWTO (English; the package has no French companion yet). Tests: 10 passing, on the in-memory store and on the repository over SQLite. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(tenancy): sealed secrets of a tenant (#63)
Some checks failed
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (pull_request) Has started running
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (push) Has started running
Quatrain Core CI / Publish Changed Packages to npm (push) Has been cancelled
Quatrain Core CI / Publish Changed Packages to npm (pull_request) Has been cancelled
d75c7606be
TenantSecrets keeps the credentials a tenant brings sealed with AES-256-GCM
under a key held by the host application. A sealed value is authenticated
with the tenant and the name it was sealed for, so it does not open once
copied elsewhere or altered. The store only receives sealed values, and
listing gives names, never values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
feat(core): HashProperty keeps values that must be read back (#65)
Some checks failed
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (push) Has been cancelled
Quatrain Core CI / Publish Changed Packages to npm (push) Has been cancelled
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (pull_request) Has been cancelled
Quatrain Core CI / Publish Changed Packages to npm (pull_request) Has been cancelled
1e53798cd1
New reversible algorithm ALGORITHM_AES256GCM, for credentials an application
must use again. The value is sealed on set under a 256-bit key given by the
property or set once for the process; val(), toJSON() and backends only see
the sealed text; reveal() reads it back and compare() works as for digests.
An optional context binds a sealed value to what it belongs to. A value
already sealed is stored as it is, so loading an object does not seal twice.

One-way algorithms are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
docs(core): keep the property table whole (#65)
All checks were successful
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (push) Successful in 7m1s
Quatrain Core CI / Publish Changed Packages to npm (push) Has been skipped
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (pull_request) Successful in 7m58s
Quatrain Core CI / Publish Changed Packages to npm (pull_request) Has been skipped
9ce72db4ae
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
refactor(tenancy): seal tenant secrets with the reversible HashProperty (#63)
All checks were successful
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (push) Successful in 7m41s
Quatrain Core CI / Monorepo Build, Tests & Quality Audit (pull_request) Successful in 7m13s
Quatrain Core CI / Publish Changed Packages to npm (pull_request) Has been skipped
Quatrain Core CI / Publish Changed Packages to npm (push) Has been skipped
fbd180f9c0
The package no longer carries a cipher of its own: values are sealed by the
HashProperty of @quatrain/core, bound to their tenant and name. Secrets are
TenantSecret records stored through a backend adapter by
TenantSecretRepository; the in-memory store remains for tests.

Depends on #65.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
crapougnax merged commit 61c80e9179 into develop 2026-11-17 20:10:24 +00:00
crapougnax deleted branch feat/63-tenant-secrets 2026-11-17 20:10:24 +00:00
Sign in to join this conversation.
No description provided.