Widget security
How the widget isolates its runtime and restricts what it can do on your page by default.
- Last reviewed
Airlock
Airlock is the part of the getuserfeedback.com widget runtime that runs in your page. It runs with the same browser permissions as your app's JavaScript and is designed to be easy to audit.
The rest of the widget runtime runs in sandboxed, cross-origin iframes. The
browser blocks those frames from accessing your page's DOM and storage. To
act on your page, they send requests to Airlock over a defined protocol
using MessagePort.
Default protections
- Navigation. Airlock allows same-origin flow links in the current tab and in new tabs.
- Browser data. Airlock shares the origin and pathname for targeting,
page()events, and paired previews. Query strings and fragments stay on the host page. Automatic browser context omits the referrer, and apage()call includes at most an HTTP(S) referrer's origin. - Storage. Airlock limits widget storage requests to widget-owned keys.
- Exit intent. Airlock sends an exit signal only with measurement consent.
- Incoming window connections. Airlock currently accepts these only to connect the getuserfeedback.com dashboard to the widget for previewing flows authored in the dashboard. It checks the request's origin and binds the connection to the window that requested it.
- Telemetry. Built-in telemetry uses a fixed set of operational fields, keeping user identifiers, URLs, and referrers out of those events.
Cross-origin navigation and access to query parameters or fragments require explicit allowlists in browser permissions.
Pin Airlock
By default, Airlock loads from getuserfeedback.com and can update between your releases. You get new widget functionality and security updates as soon as we release them.
Pin Airlock in your lockfile and bundle it with the SDK to choose exactly what widget code runs on your page. With code splitting, Airlock loads asynchronously when the widget starts and stays out of your initial bundle. The sandboxed iframes still load their resources from getuserfeedback.com.
Content Security Policy (CSP)
Airlock makes no network requests of its own. It opens sandboxed iframes,
which handle the widget's API and realtime connections. This lets the widget
work with connect-src 'none' on the host page.
- In
frame-src, allowhttps://cdn.getuserfeedback.comandhttps://view.getuserfeedback.com. - In
script-src, allowhttps://cdn.getuserfeedback.comfor hosted Airlock. Pinned Airlock loads from your app's script source.
Restrict browser permissions
If your team needs even more control, you can disable any or all of the remaining narrow browser capabilities Airlock uses on your page.
Set navigate, readCurrentUrl, readReferrerUrl, readWriteLocalStorage, or detectExitIntent
to false to disable the corresponding access. You can also limit URL sharing
to exact pathnames.
Set acceptIncomingWindowConnections
to false to turn off dashboard previews on that installation.
What the API key does
The widget API key is a public app identifier. It scopes widget requests to your app. A caller can request flows published for the app and submit responses to them, subject to the app's identity verification settings.
Dashboard and authenticated API access require separate credentials.