WebX Docs
← Catalog Raw Markdown Open console

Session Identity Platform

Audience: API integrators and automation builders
Status: Available on WebX (policy env-gated; default is backward-compatible)
Portal: /docs/session-identity
Related: Managed proxies · Browserbase sessions · Full system record


What this is

WebX can bind a browser fingerprint, proxy egress, geography, DNS mode, and sticky context into one authoritative session identity so a run looks and routes like a single consistent browser — not a random mix of signals.

That matters when you:

WebX is not an “undetectable browser” product. Identity is about coherence, stickiness, and honest evidence.


Quick start

1. Create a geo-pinned browser session

curl -s -X POST "$WEBX_BASE/v1/sessions" \
  -H "X-BB-API-Key: $WEBX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "timeout": 300,
    "proxies": [{
      "type": "webx",
      "geolocation": { "country": "US" },
      "rotation": "per_session",
      "stickyKey": "login-flow-7"
    }]
  }' | jq

When a managed lease is active, the session response includes a proxy receipt (provider, requested geo, optional observed exit country, lease hash, bytes). Credentials never appear in the receipt.

2. Reuse a sticky login context

Create or supply a contextId so Chromium cookies and a secret-free network snapshot (webx-network-identity.json) stay together. On the next session, WebX prefers the prior lease family instead of inventing a contradictory egress.

Persistent contexts are supported only by an engine that can enforce an exclusive writable profile lease (the process tier). The profile carries an immutable project/profile identity, browser-format version, storage generation, and monotonically increasing owner epoch in webx-profile.json. WebX acquires that fence before removing Chrome singleton files or launching a browser, advances the generation only after a clean browser exit, and rejects concurrent, cross-project, stale-generation, and incompatible-format opens. Shared-browser or lightweight engines return an explicit capability error; a contextId is never accepted while persistence is silently ignored.

Set WEBX_BROWSER_PROFILE_FORMAT_VERSION to a deployment-specific value (for example chromium-151-profile-v1) and change it when rolling to an unqualified Chrome/profile format. Existing profiles then fail with persistent_profile_format_incompatible until a controlled migration is completed; WebX never silently upgrades the writable directory.

If a node dies while owning a profile, its durable lease remains. WebX does not guess that the browser is gone and does not steal the directory after a timer. An operator must first prove the old workload and browser process are absent, then perform the deployment's audited recovery procedure. This temporarily reduces availability but avoids concurrent mutation of authenticated cookies and local storage.

Under coherent / strict identity policy, reusing a context that previously had a concrete managed network requires a compatible managed proxy — silent “cookies only, direct egress” is rejected.

3. Connect with Playwright

Use the session connectUrl from the create response (Browserbase-compatible data plane). See Browserbase migration.


Identity policy

PolicyBehavior
permissive (default)Composition succeeds; contradictions do not block admission (backward compatible).
coherentFail closed on high-value contradictions (timezone vs country, locale vs country, mobile proxy + desktop UA, requested vs observed country, sticky continuity).
strictCoherent plus stronger rules (e.g. verified exit country when a geo-check has run; DNS leak signals).

Deployment knob:

WEBX_IDENTITY_POLICY=permissive   # default
# WEBX_IDENTITY_POLICY=coherent
# WEBX_IDENTITY_POLICY=strict

Unknown non-empty values fail closed on the admission path (no silent downgrade to permissive).


Fingerprint profile

Operators can pin an immutable fingerprint with schema webx.fingerprint.v1:

WEBX_FINGERPRINT_PROFILE_JSON='{"schema_version":"webx.fingerprint.v1", ...}'

Invalid or internally contradictory profiles prevent browser session creation. When the live Chrome product string is known, major version must match the profile under fail-closed policy.


Managed proxies

Managed proxies are opt-in via operator inventory. Requesting a managed geo with no healthy matching entry returns 400 managed_proxy_unavailable — WebX does not silently pick another country.

EnvPurpose
WEBX_PROXY_POOL / WEBX_PROXY_POOL_FILEStatic pool JSON
WEBX_PROXY_INVENTORY_FILE / WEBX_PROXY_INVENTORY_URLSRefreshable inventory
WEBX_PROXY_GEO_CHECK_URLOut-of-band exit country verification

If geo-check is unset or fails, observedCountry stays null (never fabricated).

Full detail: Managed proxies.


Failover and continuity


What you get as evidence

Secret-free identity digests and proxy receipts can appear on run manifests / session metadata:

Never logged or returned: proxy passwords, credential-bearing proxy URLs.


Error guide

SituationTypical outcomeWhat to do
No inventory match for geomanaged_proxy_unavailableFix pool / country request
Timezone/locale vs country clashCoherence error under coherent/strictAlign fingerprint with geo
Sticky context, no managed leaseidentity_continuityRequest compatible managed proxy or new context
Only far failover candidatesno_safe_failoverExpand same-country inventory
Unverified exit under strictproxy_geo_unverifiedConfigure geo-check or relax policy
Bad fingerprint JSONSession create failsFix WEBX_FINGERPRINT_PROFILE_JSON

Non-goals (read carefully)


Acceptance coverage

Platform behavior for identity/network is gated by UAT-047 … UAT-054 (composition, geo fail-closed, sticky context, failover distance, DNS, drift, quarantine, cross-context isolation).


Deeper reading

DocWhen to open it
System recordArchitecture, invariants, ops runbook, ADRs
Managed proxiesLease API, inventory, receipts
User guideFull WebX API surface
Browserbase migrationconnectOverCDP / session lifecycle