Replay privacy

Inputs are always masked in replays. Everything below adds to that default, is configured per project in Project settings (admins), and is served to the...

Embed
Preview of the card
<a href="https://lucidace.com/help/replay-privacy"><img src="https://lucidace.com/help/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/2f4b888b-c4e6-488b-81bd-6e838fb12d2e/pages/5b937394-07db-4b08-9e07-e82790316120/social-card.svg?v=3e7ae33eec8b" alt="Replay privacy" width="600" height="315"></a>

Inputs are always masked in replays. Everything below adds to that default, is configured per project in Project settings (admins), and is served to the SDKs through GET /v1/config (keys of settings.sdk).

Masked inputs show a fixed placeholder (********) whatever was typed, so a replay does not reveal how long a password or e-mail address was. A custom replay.maskInputFn replaces the placeholder.

URLs (urlPrivacy)

Values of well-known sensitive query parameters (password, passwd, pwd, pass, token, access_token, refresh_token, id_token, secret, client_secret, state, session, api_key, apikey, key, auth, authorization, code, otp, email, ssn) are replaced with <masked> in every URL the browser SDK sends: $current_url, $referrer, $pageleave, $initial_* and the page address inside the recording. The client option adds to that list:

init("lc_pk_...", { apiHost, urlPrivacy: { maskParams: ["invite"], maskCampaignParams: true, stripHash: true } });

maskCampaignParams also masks UTM and ad click-id parameters; stripHash drops the #fragment (not for hash routers).

Policy keys (PUT /v1/projects/{pid}/settings/sdk)

Key

Applies to

Effect

replay_mask_selectors, replay_block_selectors

browser, worker

mask text / replace the subtree

replay_url_privacy_rules

browser

[{url, mask_all_text?, mask_selectors?, block_selectors?}], at most 50; on matching pages these add to the global masks and recording restarts with a fresh snapshot

replay_mask_screens

iOS, Android, Flutter, React Native

screen / view-controller names (* wildcard): every text on those screens is masked on the device

replay_mask_text_patterns

mobile SDKs, worker

at most 20 regexes (200 chars each, must not match the empty string): matching text is masked on the device and again by lc-worker's scrubber

replay_exposure_fields

iOS, Android (auto), Flutter, RN (captureSensitive)

field ids captured encrypted (controlled exposure, below)

snapshot_properties

browser

managed through /snapshot-properties; never reads form fields or masked elements. Rejected (409) while the project is under HIPAA mode

URL rules are enforced by the browser SDK only: the worker cannot tell which page a DOM mutation belongs to. Use replay_mask_selectors for anything that must also be masked server side.

PII audit

POST /v1/projects/{pid}/replay-privacy/scan {sessions?} (admin) reads the stored chunks of the most recent replays (default 50, max 200) and records a finding per element selector whose visible text or attributes still show emails, card or phone numbers, or hinted names. Values are never stored. The AI pass (POST /v1/ai/replays/pii-audit {project_id, sessions?}, lc-ai, the project's own model through the AI providers settings) sends masked text samples (emails and digit runs replaced) to the model, which picks names, addresses and ID numbers by sample id. It can never invent a selector. GET /replay-privacy/text-samples requires admin and PII access.

Accepting a finding (PATCH /replay-privacy/findings/{id} {status: "accepted"}) appends its selector to replay_mask_selectors; dismissed findings stay dismissed when later scans see them again.

Controlled exposure (mobile)

Some fields must be recoverable (support, chargebacks) but never visible in a replay. For those:

  1. An admin creates a key: POST /v1/projects/{pid}/sensitive-keys. lc-api generates an RSA-2048 key pair. The private key is sealed with the server keyring (LC_MASTER_KEY, envelope encryption, AAD bound to project and key id) and never leaves lc-api. The public key is published as replay_exposure_key {kid, n, e, pkcs1} in the SDK config. Creating another key rotates: new captures use it, and old values stay revealable until their key is destroyed.

  2. List the field ids in replay_exposure_fields. The SDK masks those fields in the replay as usual. It also encrypts the value (RSA-OAEP-SHA-256, UTF-8 truncated to 190 bytes) and sends $sensitive_capture {$exposure_field, $exposure_kid, $exposure_ciphertext, $screen_name, $exposure_truncated} once per distinct value.

  3. In the replay, Sensitive fields lists the captures (never the ciphertext). An admin with PII access reveals one value at a time with a reason of 10 to 500 characters: POST /replays/{sid}/sensitive/reveal {uuid, reason}. Each reveal writes replay.sensitive_reveal to the audit log with the reason, and the response is Cache-Control: no-store.

  4. DELETE /sensitive-keys/{kid} destroys the private key. Values encrypted to it can never be revealed again (410).

The API never returns the ciphertext (player markers drop it), and shared replay links never show event properties, so a value is readable only through the audited reveal.

  • Comment search: GET /v1/projects/{pid}/replays/comments/search?q= (Postgres full-text, newest first).

  • Experiment markers: GET /replays/{sid}/experiment-markers (exposure and metric events of experiments whose flag the session evaluated).

  • Agent-driven sessions: the WebMCP module (@lucida-analytics/browser/webmcp) emits $agent_action. Filter replays on that event ("Agent-driven sessions" in the filter builder); the timeline marks those events.

Updated