Principles
An integration needs a clear boundary between what the browser can request and what a server is authorised to do. A proxy is useful when an operation needs server-held credentials or server-side access checks. A browser can use a public interface intended for browser clients. Protect service credentials and privileged operations according to the selected integration’s requirements.- Keep service secrets in server-only configuration.
- Check the participant’s session and permission for the requested action.
- Limit a proxy to the destinations, operations, and data the application needs.
- Treat browser input and upstream responses as data to validate, not authority to act.
Server-Side Request Flow
Consider an application that needs to show an account-scoped record. The browser requests that record through the application; the server checks access and obtains the permitted data from the relevant service.- Receive a defined request. Accept the intended method and validate its parameters and body. The browser selects an application action, not an arbitrary upstream destination.
- Check identity and authority. Establish the account context and whether it may read the requested record. State-changing operations also need the relevant action permission and protections against unintended cross-site requests.
- Prepare the upstream call. Choose the configured destination and required operation. Use credentials intended for that service; forward a client credential only when the integration explicitly requires it.
- Bound the work. Apply suitable request limits and timeouts. Handle cancellation and failures so a disconnected client or unavailable service does not leave the request hanging.
- Shape the response. Return the fields the client needs and an appropriate status. Handle errors deliberately, keeping credentials and internal diagnostics out of the public response.
- Record the outcome. Retain enough server-side context to diagnose the request without logging secrets. For a state change, distinguish a rejected request, an uncertain result, and a confirmed update before retrying.
WebSocket Proxy Notes
Use a direct browser connection when the selected service supports browser authentication and appropriately scoped events. Use a server relay when a connection needs server-held credentials or access to privileged upstream events. For a relay, define the following responsibilities:- Authenticate the connection and authorise each requested subscription.
- Associate events with the correct account, stream, or session before forwarding them.
- Relay only the event types and fields that the client is permitted to receive.
- Recheck access when a subscription or permission changes, and end access when it expires or is revoked.
- Define connection cleanup, reconnect behaviour, and how the client recovers current state after missed events.
Cross-Links
- API Reference — Documented interface families and their responsibilities.
- OBS Integration Guide — Media-source and stream integration.
- For Developers — Application, identity, participation, and settlement context.