Ship

Security and go-live

Treat the page as untrusted, keep secrets on your server, and walk through the checklist before every release.

Last updated: November 7, 2026 · Browser SDK 1.6.0 · Bridge protocol 1.2

The trust boundary#

  • The page is untrusted. Anything from the browser can be changed by the user. Prices, totals, availability, ownership and status changes are decided by your server from its database; the page sends ids only.
  • Secrets stay on the server. The client secret and your event-signing key never appear in the page, the bundle or the repository.
  • Identity comes from the code exchange. Never trust a user id the page sends you. Use the sub your server got from exchangeCode.
  • Calls from SALOPHA are signed. Verify every webhooks, actions and objects/* call before acting on it.

Your pages#

  • Serve only over HTTPS, from an origin listed in allowedOrigins.
  • Use a strict Content Security Policy without unsafe-eval, and allow framing by SALOPHA: frame-ancestors 'self' https://web.salopha.com https://salopha.com.
  • Keep HTML free of personal data, especially with the local runtime mode, which may serve pages from the device. Load personal data from your API under a networkOnlyPaths prefix.
  • Never cache personal data beyond the user's session, and honour platform.consent.revoked.v1 at once.
  • Store uploads in folders derived from sub, and serve private documents through short-lived signed links.
  • Answer other tenants' records with 404, not 403, so their existence isn't revealed.

What the bridge enforces#

  • The bridge answers only your allowedOrigins.
  • Every request is bound to the launch session with a fresh nonce; replays fail.
  • There is no token API, and credential-looking parameters are refused.
  • Only known methods can be sent; server-only scopes can't be requested.

See Security rules in the SDK reference.

Testing#

  • In a browser: devSimulator: true answers all 45 methods with mock data and asks consent with window.confirm(). Simulate a chat launch with devSimulator: { launch: { source: "chat", … } }.
  • Against a local hub: run the SALOPHA backend locally, register your app with the registration file, sign in with a phone code and call your /auth/salopha with a real launch code.
  • On a device: the production SALOPHA app opens only HTTPS origins from your manifest. Use a staging origin of your own until you go live.
  • Web and desktop: check the page inside web.salopha.com and at 1280 pixels wide. See Web and desktop.

Go-live checklist#

  1. Origin: HTTPS, a CSP without unsafe-eval, frame-ancestors allowing SALOPHA (see above).
  2. Manifest: a 512 × 512 icon, logo, brand colours, as few scopes as possible, the runtime mode, platforms, minHostVersion, a privacy policy URL.
  3. Server: SALOPHA_API_BASE, SALOPHA_APP_ID, SALOPHA_CLIENT_ID, SALOPHA_CLIENT_SECRET set; a sign-in route; a webhook route that checks signatures; users keyed by sub.
  4. Release: created and published in the console. Open the app from the Services tab on a phone and check: splash then ready, sign-in, a notification round trip, a shared link, the home-screen shortcut.
  5. Chat actions (if any): objects/search and objects/resolve answer signed calls fast with public data only. From a chat: search and send a card; open an action, «Send to chat», and land back in the chat with the card.
  6. Transactions (if any): events signed, retried from an outbox with the same eventId, versions increasing, nothing sensitive in details.
  7. Web and desktop (if listed in platforms): SDK 1.3, the frame allowed, not_in_host handled.

Conventions that help#

  • Arabic first: every screen works right to left and at 1.6× text size; numbers and phone numbers are isolated left to right.
  • Never write the platform's name in your copy; use getAppInfo().hostName.
  • Status changes go through an explicit transition table and write an event row in the same database transaction, then publish from an outbox.
  • Every user-visible change ships as a new release version.

Reporting a vulnerability#

Write to [email protected] with the details. Please don't test against other users' data.