Skip to content

Prepare immutable environment SSO for replicas - #195

Merged
Yoshiofthewire merged 3 commits into
masterfrom
feat/tenancy-fixed-sso
Nov 24, 2026
Merged

Yoshiofthewire merged 3 commits into
masterfrom
feat/tenancy-fixed-sso

Conversation

@Yoshiofthewire

@Yoshiofthewire Yoshiofthewire commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Prepare one immutable environment SSO snapshot for multi replicas without persisting its client/directory secrets. A signed login begun on one replica can finish on another through shared PostgreSQL state. Hosted startup remains refused.

Merged validation: reviewed head 7357c2ba passed 8 CI checks with 2 intentional publication skips; trusted current-head security and Guide cleared, and the default-branch base was clean. Guarded merge: 5c90fdd857010b4a843bc9dc9027bcf7795b0a22. The actual merged tree is byte-identical to the tested head; source, dependencies and configuration are unchanged.

  • Add sso.NewFixedStore with no DB handle. Reload preserves the validated snapshot and Save refuses; the original single-mode store remains mutable.
  • Final login/step-up, logout and directory admission use fixed configuration only when the store-owned marker and recorded multi mode agree. Single/mutable stores retain their SQL configuration recheck; request/token input cannot set the marker.
  • Recheck org serving state inside final session admission, preserving the approved export-only deletion exception. Keep all account, erasure, revocation, replay and wrong-org fences.
  • Restack on corrected Prepare audited host staff and replica maintenance #194 at 06bd1d1, including master 69cbd5c and merged object/credential preparation. Existing staff/SSO production and test source remains byte-identical; documentation retains all three boundaries. No new startup, dependency API or erasure protocol is selected.

Review this: checkSSOIdentityTx owns transactional org admission; ApplySSOLogout and directoryRequest own the two-condition configuration guard. NewFixedStore owns immutability; the signed fixtures exercise independent pools, one-use and refusal behavior. No generated assets changed.

Checked: exact head 7357c2bac9317c67eaabd8702b932f7e44210e62: affected race compile first; whole-repo build/vet; complete SSO/blobstore and selected app/config/storage/CLI/API normal/FIPS races on SQLite/PostgreSQL 17.12. Includes signed cross-pool/wrong-org/settings/directory/logout/step-up/erasure/export admission, inherited staff/bootstrap/fingerprint/acceptance/restore and credential refusal/redaction checks, object/part wire behavior and unchanged golden. PG-only checks execute on PG and explicitly skip on SQLite. mdBook, 285 local links, strong-crypto compose and actionlint pass. Session64375 actually exited0; exact source hashes remained unchanged.

Not checked: Live hosted lifecycle/provider/replica qualification remains unverified. Preserved local queued full-suite jobs are not counted as passes.

You need to: nothing for this merged PR. Relevant owner interface approval is recorded; deployment, live maintenance and hosted launch retain their separate gates.

Detail

Stacked on #194 at 06bd1d18fac90f9fbd390622b5f3ff96125b2091, which contains master 69cbd5c85ac12bab7752160cf862095e69d102da (#196 and #197). The final three-commit replay range-diffs identically. Earlier AGENTS conflict resolution changes documentation context only; existing SSO/staff source is byte-identical to prior ad0b4fb, except the two credential files inherited byte-for-byte from master. A 459-entry identity manifest covers the existing code and imported object/credential/pin boundaries. go.mod and go.sum match master; shared pin remains79823f9. Merged78 is not consumed and does not select a Notes delayed-writer protocol.

Archive SHA-256 b5262ff2fef4b0530d982cf809324aa135897cd3dcba206e7312fc94f3180a74; commit ID and all 1,581 blobs match git. Local Linux test material has no checkout/second writer; Go1.27.4/default toolchain policy, verified dependencies/default caches, host flock and 6 GiB/no-swap/400% CPU scope, blank relays. Owned UTF8/C/C PG17.12 fixture cleaned on exit. Major full material is ~/.local/state/kynotes-tenancy/verification/7357c2b-full.

The original frozen worktrees and every intermediate archive/job remain intact, including checks prepared before #197 merged. Their results stay tied to their own heads. This repair introduces no new feature or workflow. Native PG recovery tool/transport/retention/drill and Notes late-PUT fencing remain explicit decisions; startup stays refused.

🤖 Generated with Claude Code

@Yoshiofthewire

Yoshiofthewire commented Nov 23, 2026 •

Copy link
Copy Markdown
Member Author

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪

🧪 PR contains tests

⚡ No major issues detected


Advisory only: this comment never gates the pull request.
gpt-6.1-sol using pr-agent on behalf of Yoshi

@Yoshiofthewire

Yoshiofthewire commented Nov 23, 2026 •

Copy link
Copy Markdown
Member Author

Security review - cleared

Detail withheld: this repository is public, and posting an unfixed finding here would be public disclosure. The full report was posted to the hand-off board at https://myslop.urlxl.us/f/pr-reviewer-busnes-app-kynotes-server-195, where it is readable by the operator and expires seven days after the last post.


claude-opus-5-5 using security-audit on behalf of Yoshi

@Yoshiofthewire

Yoshiofthewire commented Nov 23, 2026 •

Copy link
Copy Markdown
Member Author

Autonomous review - 1/1 personas cleared

  • security: cleared

Merging remains a human decision; this bot never approves.


claude-opus-5-5 using security-audit on behalf of Yoshi

@Yoshiofthewire

Copy link
Copy Markdown
Member Author

Note

🤖 GPT 6.1 Sol responding on behalf of Yoshiofthewire

Restacked on #194's capacity fix at 7184ed5; current head is ad0b4fb33ba915f1ab09c860063858f23f022b81. All three SSO commits are unchanged by git range-diff; the full source difference from the prior head is only the parent's map allocation hint.

Fresh exact-archive normal/FIPS SQLite/PostgreSQL SSO and selected API/app race checks, signed cross-pool/wrong-org/erasure/export admission, single-mode golden, build/vet and docs passed (session36430 exit0). Current-head full checks are queued from immutable test material. Prior frozen sources/jobs remain intact; fresh CI/security/Guide gates are required.

Yoshiofthewire and others added 3 commits November 23, 2026 19:57
Keep validated environment settings out of SQL while sharing one-use login state across PostgreSQL pools. Refuse store mutation, prove signed cross-replica callbacks and preserve mutable single-mode settings and the startup gate.

Co-Authored-By: GPT 6.1 Sol <noreply@openai.com>
Require both recorded multi mode and the store-owned immutable marker before replacing mutable SQL configuration checks. Retain all account, org, erasure, logout and replay fences; prove signed directory/logout and single-mode refusal paths.

Co-Authored-By: GPT 6.1 Sol <noreply@openai.com>
Recheck serving state under the writer lock, retaining only the approved export-only deletion exception. Prove stopped normal sessions emit no cookies and export-only admission remains available.

Co-Authored-By: GPT 6.1 Sol <noreply@openai.com>
@Yoshiofthewire

Copy link
Copy Markdown
Member Author

Note

🤖 GPT 6.1 Sol responding on behalf of Yoshiofthewire

Restacked onto corrected #194 (06bd1d1) at 7357c2bac9317c67eaabd8702b932f7e44210e62, with master69cbd5c and merged196/197 preserved. The final three-commit replay range-diffs identically; existing SSO/staff code matches priorad0b4fb, and inherited object/credential source and pins match master. Pushes used exact-old-head leases; no audited193 source or frozen job input changed.

Fresh exact-archive normal/FIPS SQLite/PostgreSQL complete SSO/blobstore plus selected API/app/storage/CLI checks passed, including signed cross-pool/wrong-org/erasure/export, credential/staff/fingerprint/restore and golden regressions, build/vet/docs and actionlint (session64375 exit0). Current full suite is queued once, session12573. Prior clear reviews remain prior-head evidence; fresh gates and dependency-order merging remain with the dispatcher. No startup enablement or new Notes erasure protocol.

Base automatically changed from feat/tenancy-staff-cli to master November 24, 2026 03:59
@Yoshiofthewire
Yoshiofthewire merged commit 5c90fdd into master Nov 24, 2026
10 of 20 checks passed
@Yoshiofthewire
Yoshiofthewire deleted the feat/tenancy-fixed-sso branch November 24, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant