amplitude / Amplitude-TypeScript

TypeScript Amplitude Analytics SDK
https://amplitude.github.io/Amplitude-TypeScript/
MIT License
135 stars 39 forks source link

Request: Set light, medium, conservative masking with selectors #865

Open GxDesign opened 2 months ago

GxDesign commented 2 months ago

Summary

We'd like the ability to apply a selector like amp-medium to a parent component and have it unmask non-sensitive elements (keeping emails, phone numbers and inputs masked).

From what I understand of the docs, we can have default masking levels globally that apply smart masking mechanics, but the selectors available are pretty black and white. If I want to apply a global level as conservative, but apply a medium level of masking to a single page, thats not possible. I'd have to add masking/unmasking to every element, including applying masking to inputs (parents with amp-unmask unmask every child).

Motivations

We require a high level of security on our app and have applied the conservative level, and we have implemented additional guardrails like excluding all routes except those specifically allowed to be recorded, and limiting the recordability to a time window. While a route is included, a team owns it to ensure that sessions are recorded securely, so we'd like to apply a less strict masking level to it, and not require cleaning up a bunch of classes at the end of the recording period.