Repository navigation
feat(desktop): connect Square employee BB sessions to protected relays - #8528
Draft
mcdickenson wants to merge 7 commits into
Draft
mcdickenson wants to merge 7 commits into
mcdickenson wants to merge 7 commits into
Conversation
…elay transport Signed-off-by: Matt Dickenson <mdickenson@squareup.com>
🔐 Codex Security Review
|
Signed-off-by: Matt Dickenson <mdickenson@squareup.com>
Signed-off-by: Matt Dickenson <mdickenson@squareup.com>
Signed-off-by: Matt Dickenson <mdickenson@squareup.com>
Signed-off-by: Matt Dickenson <mdickenson@squareup.com>
Signed-off-by: Matt Dickenson <mdickenson@squareup.com>
Signed-off-by: Matt Dickenson <mdickenson@squareup.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a default-off Square employee sign-in path to the existing native BuilderLab session support. The employee authorizes their own Square browser session, returns only a short-lived S256 verifier-bound code to an exact loopback callback, and the native app redeems the existing CLI session. Session credentials never enter callback URLs or renderer IPC.
The native client binds the session to its current identity, workspace and exact pilot relay. It proves its own key to obtain a short-lived federated identity assertion and attaches it to protected WebSocket, relay HTTP, Blossom media and Huddle transport. Cancellation, logout, account/key/community changes and stale completions cannot commit another login. Ordinary communities retain the existing path. The shared connector preserves the generic upgrade-header API.
This draft includes an employee sign-in gate before relay-dependent onboarding, with community/identity recovery kept reachable. Settings reauthentication and retry preserve existing live subscriptions; all webviews observe native session changes. Access/binding refusals suspend automatic admission while preserving a valid CLI for explicit retry; ended sessions require login. Media retains Blossom proof kinds and streams with bounded lifetime/reflection filtering.
desktop/EMPLOYEE_SIGN_IN.mddocuments setup, trust boundaries and the acceptance sequence. The employee sign-in feature and exact relay pin remain off by default; backend provisioning, verified employee grants and serving policy are deployment prerequisites.For a staging Playpen pilot, optional
BUZZ_EMPLOYEE_NATIVE_PLAYPEN_TARGETreplaces ambient routing with a fixed Baggage selector on exactly three pinned public calls: redeem POST, auth-me GET and identity-assertion POST. Other origins/actions and URL-userinfo Basic auth are refused. Public proof URLs and signed request bodies remain unchanged; redirects stay disabled and Auth0 requests receive no selector.Related issue / PR
No existing Square employee sign-in issue or PR found. Related existing BuilderLab work: #5939 (session persistence) and #3919 (hosted connect uses the local Buzz identity). This contribution reuses the existing BB session model; it does not replace generic operator sign-in or introduce another identity store.
Testing
just desktop-cirun also passed all applicable JavaScript/jsdom/native suites.-D warnings, TypeScript, biome and size checks pass.just cipassed root/desktop formatting and normal plus mesh all-target native Clippy, then stopped at unchanged mobile Dart formatting and unresolvedflutter_lints. The remaining supportedjust test-unit desktop-test desktop-build desktop-tauri-test web-buildlanes passed: 6,835 JavaScript, 171 jsdom and 3,454 native library tests, alongside workspace tests and desktop/web builds. No mobile source, dependency pins or policy configuration changed.buzz-oss-teamcode-owner reviewer; an upstream writer must request that review. No approval or permission bypass was attempted.Real employee browser/native login, protected relay admission, message → bot receipt → reply, cross-employee isolation and revoke/re-enable acceptance remain pending compatible backends/configuration. No live employee credentials or sessions were used for these tests. This remains a draft pending upstream CI/owner review and human app acceptance; the repository completion attestation is intentionally absent.