feat: phase 1b - tables, token cipher, owner/tenant authorization, outbox, dispatcher, core provider #2

Merged
KofTwentyTwo merged 8 commits from feature/outbox-core into develop 2026-10-14 16:54:05 +00:00
8 Commits
Author SHA1 Message Date
james.maes 06eba71448 Merge remote-tracking branch 'origin/develop' into feature/outbox-core 2026-10-14 11:51:22 -05:00
james.maesandClaude Opus 5.5 2bb5fa7bc2 feat(bridge): QBIT_SLACK core messaging provider
Registered under bridgeProviderName (default slack) so callers use core
SendMessageAction only. STAND-IN(core=QRun-IO/qqq#1194, removeBy=4.1.0-RC.8)
for output status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 11:51:03 -05:00
james.maesandClaude Opus 5.5 8d966e9bbe feat(outbox): durable outbox and dispatcher with exactly-once posting
Claim and lease with attempt rows; re-authorization as the owner at send time;
message-metadata reconcile of expired leases; 429 Retry-After without consuming
attempts; retries, dead letters, FAILED_AUTH with owner notification and alert;
threads, updates, rate limiter, workspace health. Two-tenant and token-leak tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 11:51:03 -05:00
james.maesandClaude Opus 5.5 efc7a7c82b feat(security): owner-session authorizer with membership check
Workspace and connection lookups run as the owner (createAutomatedSessionForUser)
so tenant and owner locks apply; conversations.members must include the owner;
bounded membership cache; only the chosen row's token is ever decrypted;
ownerless sends limited to registered channels with a matching tenant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 11:51:02 -05:00
james.maesandClaude Opus 5.5 a45bb8a75e feat(transport): Slack Web API client, error classifier and fake test server
Bearer token per call (never stored), JSON writes, paged reads, Retry-After and
x-oauth-scopes, scrubbed errors, configurable timeouts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 11:51:01 -05:00
james.maesandClaude Opus 5.5 ac2427220e feat(metadata): slack_ tables with owner and tenant locks and hidden tokens
Seven tables (workspace, connection, channel, user group, template, message,
attempt), enums, joins, child lists and Postgres DDL. Owner locks on
connection and message; the host tenant lock on workspace and inherited by
join; token fields PASSWORD, hidden, and DENY-locked for every user session.
Tests: validator, owner isolation, two-tenant isolation, token invisibility.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 11:18:52 -05:00
james.maesandClaude Opus 5.5 82c13f2ff5 feat(security): AES-GCM token cipher bound to its row, and error scrubbing
Keys from named environment variables (current and previous), generic errors
with no cause, a canary test that a fake token never escapes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 11:18:51 -05:00
james.maesandClaude Opus 5.5 ab38448c51 feat(config): phase 1 settings, secret env-name allow list and validation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 11:18:50 -05:00