Restore inbox OAuth and discover delegated mail sign-in #217

Merged
founder merged 3 commits from codex/inbox-authentik-permissions into main 2026-09-06 00:10:27 +00:00
Owner

inbox.key.store completes Authentik login but then sends its token directly to Stalwart, bypassing the authentication bridge. Route OAuth discovery and API requests through inbox and verify an authenticated Mailbox/get against the advertised URL.

Lately now asks for an email first and discovers the provider's registered OIDC sign-in through a domain-owned descriptor. Other providers retain password login. Authorization-code PKCE, callback state checks, refresh rotation, and the encrypted vault feed bearer credentials to the shared Swift core. The public app contains no key.store provider special case.

A systemd reconciler translates effective Authentik impersonation permissions into Stalwart mailbox read/flag shares, including manager's contact/privacy mail and billing mail for founder. It preserves manual ACLs, journals owned grants for recovery/revocation, and grants no send-as, deletion, or sharing administration. Stalwart couples seen and keyword flags.

Validation: both Bazel mail test targets pass; modified Swift WebAssembly core and production website build with Nix; Nix unit/routing evaluation passes. A live empty-folder probe passed grant, repeat-run, and revocation and was removed. An unprivileged agent receives forbidden when reading manager mail. The existing founder Chrome session reproduced the original OAuth failure.

KSE-0195 records the decision, rights, safeguards, and rollback. Senior contributor review and acceptance are required before live rollout. Existing mail ACLs and the production app have not been changed. Final gates are founder browser sign-in on inbox and lately.org, shared-account listing, and denial/revocation checks after deployment.

inbox.key.store completes Authentik login but then sends its token directly to Stalwart, bypassing the authentication bridge. Route OAuth discovery and API requests through inbox and verify an authenticated Mailbox/get against the advertised URL. Lately now asks for an email first and discovers the provider's registered OIDC sign-in through a domain-owned descriptor. Other providers retain password login. Authorization-code PKCE, callback state checks, refresh rotation, and the encrypted vault feed bearer credentials to the shared Swift core. The public app contains no key.store provider special case. A systemd reconciler translates effective Authentik impersonation permissions into Stalwart mailbox read/flag shares, including manager's contact/privacy mail and billing mail for founder. It preserves manual ACLs, journals owned grants for recovery/revocation, and grants no send-as, deletion, or sharing administration. Stalwart couples seen and keyword flags. Validation: both Bazel mail test targets pass; modified Swift WebAssembly core and production website build with Nix; Nix unit/routing evaluation passes. A live empty-folder probe passed grant, repeat-run, and revocation and was removed. An unprivileged agent receives forbidden when reading manager mail. The existing founder Chrome session reproduced the original OAuth failure. KSE-0195 records the decision, rights, safeguards, and rollback. Senior contributor review and acceptance are required before live rollout. Existing mail ACLs and the production app have not been changed. Final gates are founder browser sign-in on inbox and lately.org, shared-account listing, and denial/revocation checks after deployment.
fix(mail): discover provider sign-in and reconcile Authentik mailbox access
Some checks failed
Build: Windows / Build (Windows) (push) Successful in 1m13s
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Failing after 46s
Build: Web / Build (Web) (pull_request) Successful in 1m38s
Build: Apple / Build (macOS) (pull_request) Has been cancelled
Build: Apple / Build (iOS) (pull_request) Has been cancelled
Build: Apple / Build (visionOS) (pull_request) Has been cancelled
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been cancelled
Build: KaiOS / Build (KaiOS) (pull_request) Has been cancelled
Build: Linux / Build (Linux x86_64) (pull_request) Has been cancelled
Build: Apple / Check (SwiftLint) (pull_request) Has been cancelled
757887ad86
fix(mail): validate Caddy origin matching and record runtime checks
Some checks failed
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Successful in 38s
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 2m20s
Build: Apple / Build (macOS) (pull_request) Has been cancelled
Build: Apple / Build (iOS) (pull_request) Has been cancelled
Build: Apple / Build (visionOS) (pull_request) Has been cancelled
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been cancelled
Build: Apple / Check (SwiftLint) (pull_request) Has been cancelled
Build: Web / Build (Web) (pull_request) Has been cancelled
Build: Linux / Build (Linux x86_64) (pull_request) Has been cancelled
024a67f4ff
docs(mail): record founder approval of KSE-0195
Some checks failed
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 20s
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Successful in 37s
Deploy: API / Deploy (API) (push) Failing after 3s
Namespace: Build Images / Refresh macOS runner lane (push) Successful in 4s
Release: If Needed / Check (Release Needed) (push) Successful in 9s
Build: KaiOS / Build (KaiOS) (push) Successful in 23s
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (push) Successful in 40s
Build: sqlite3mc / sqlite3mc smoke (macOS) (push) Successful in 47s
Namespace: Build Images / Refresh Linux runner image (push) Successful in 1m52s
Release: Signing Preflight / Release (Signing Preflight) (push) Successful in 2m2s
Build: Apple / Check (SwiftLint) (pull_request) Failing after 4m17s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 3m48s
Build: Apple / Build (macOS) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Has been skipped
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
Build: Apple / Check (SwiftLint) (push) Failing after 2m51s
Build: Apple / Build (macOS) (push) Has been skipped
Build: Apple / Build (iOS) (push) Has been skipped
Build: Apple / Build (visionOS) (push) Has been skipped
Build: Linux / Build (Linux x86_64) (push) Successful in 3m39s
Build: Linux / Build (keystore-forge x86_64) (push) Has been skipped
Build: Web / Build (Web) (pull_request) Successful in 6m20s
Namespace: Build Images / Refresh macOS Nix snapshot application (push) Successful in 3m47s
Build: Web / Build (Web) (push) Successful in 7m50s
Deploy: Web / Deploy (Web) (push) Successful in 11m37s
54b156eadd
founder changed title from WIP: Restore inbox OAuth and discover delegated mail sign-in to Restore inbox OAuth and discover delegated mail sign-in 2026-09-06 00:09:08 +00:00
Sign in to join this conversation.
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
key-store/key.store!217
No description provided.