Skip to content

Bind cross-app handoffs to the browser that started them - #98

Merged
jfrench9 merged 6 commits into
mainfrom
bugfix/input-validation-hardening
Oct 25, 2026
Merged

jfrench9 merged 6 commits into
mainfrom
bugfix/input-validation-hardening

Conversation

@jfrench9

Copy link
Copy Markdown
Member

Summary

Hardening from a platform security review; companion to the robosystems bugfix/input-validation-hardening PR. Public text is deliberately brief.

  • SSO bridge. The product app mints a nonce when it starts a bridge (mintBrowserNonce, kept in its own sessionStorage) and sends the hash to the login home as ?nonce_hash=; the login home passes it into the exchange, and completion presents the nonce. handleSSOLogin completes only a bridge this browser started; a session_id arriving without one is stripped, not redeemed. getSSORedirectUrl / navigateToApp take { nonceHash }; without one they send the browser to the target's /login?return_to= so the target starts a bound bridge of its own (one extra hop for useCrossAppLink and the app switcher).
  • ssoExchange(token, app, browserNonceHash?), ssoComplete(sessionId, browserNonce?), buildLoginHomeUrl({ nonceHash }) — all optional.
  • The console's CSV download neutralises formula-shaped text.
  • Release job installs from the committed lockfile with npm ci --ignore-scripts.

Contract

Additive API; a core minor. Behaviour change: a cross-app link now lands on the target's login page, which bridges itself. Works against the current API (the new fields are optional and ignored by an API that predates them); the binding is enforced once the robosystems PR deploys and the apps send hashes.

Deploy order: API → this publish → robosystems-app (its PR on the same branch name) → the product apps bump.

Test plan

  • npm run test — 625 passed, 16 skipped (new cases in sso.test.ts, sso.sdk.test.ts, login-home.test.ts, LoginRedirector.test.tsx, rowsToCsv.test.ts)
  • typecheck, lint (pre-commit)

🤖 Generated with Claude Code

@jfrench9

Copy link
Copy Markdown
Member Author

Companion PRs for the one release: robosystems RoboFinSystems/robosystems#1945 · robosystems-core #98 · robosystems-typescript-client RoboFinSystems/robosystems-typescript-client#302 · robosystems-python-client RoboFinSystems/robosystems-python-client#286 · robosystems-app RoboFinSystems/robosystems-app#518 · roboledger-app RoboFinSystems/roboledger-app#527

The committed lockfile predated package.json (it pinned @robosystems/client 2.1.0 and jsdom 29), so the release job's npm ci refused it. CI installs with npm ci too, so drift fails on the pull request rather than at publish.
Apps still on an older core send no nonce_hash and complete only an unbound handoff; sending them to start a bridge of their own looped them through the login home. An app on this core still ignores a session_id it did not start. A browser that cannot hold a nonce now stops at the retry page instead of going round again.
@jfrench9
jfrench9 merged commit eed67fe into main Oct 25, 2026
5 checks passed
@jfrench9
jfrench9 deleted the bugfix/input-validation-hardening branch October 25, 2026 02:12
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