Skip to content

RUM-5761: Add TextAndInputPrivacy#2235

Merged
jonathanmos merged 1 commit into
feature/fine-grained-maskingfrom
jmoskovich/rum-5761/text-privacy
Sep 5, 2024
Merged

RUM-5761: Add TextAndInputPrivacy#2235
jonathanmos merged 1 commit into
feature/fine-grained-maskingfrom
jmoskovich/rum-5761/text-privacy

Conversation

@jonathanmos

@jonathanmos jonathanmos commented Sep 3, 2024

Copy link
Copy Markdown
Member

What does this PR do?

(Notice that this PR is being merged into the feature branch and not yet into develop.)

Adds the new setTextAndInputPrivacy api and deprecates the setPrivacy api.

When a user calls setPrivacy it will be converted into the new fine grained masking levels.

allow -> text: mask_sensitive_inputs, images: mask_none, touch: show
mask_user_input -> text: mask_all_inputs, images: mask_large_only, touch: hide
mask -> text: mask_all, images: mask_all, touch: hide

When passing to the webviews the fine grained masking is converted back to the legacy privacy levels in such a way as to be at least as restrictive as necessary. In practice this means it is almost always converted to mask_all. The two exceptions are:

text: mask_sensitive_text, images: mask_none, touch: show --> allow
text: mask_user_input, images: mask_none, touch: show --> mask_input

In addition, we will send the new fine grained masking apis in the configuration telemetry.

Motivation

Fine grained masking global configuration.

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-5761/text-privacy branch 2 times, most recently from f946440 to 482ba4a Compare September 3, 2024 15:12
@codecov-commenter

codecov-commenter commented Sep 3, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 94.11765% with 6 lines in your changes missing coverage. Please review.

Project coverage is 70.09%. Comparing base (89c3474) to head (a8ce83a).
Report is 2 commits behind head on feature/fine-grained-masking.

Files with missing lines Patch % Lines
...ndroid/telemetry/internal/TelemetryEventHandler.kt 72.73% 0 Missing and 3 partials ⚠️
...internal/recorder/DefaultOnDrawListenerProducer.kt 0.00% 1 Missing ⚠️
...internal/recorder/mapper/SeekBarWireframeMapper.kt 0.00% 0 Missing and 1 partial ⚠️
...lin/com/datadog/android/webview/WebViewTracking.kt 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                       Coverage Diff                        @@
##           feature/fine-grained-masking    #2235      +/-   ##
================================================================
+ Coverage                         69.98%   70.09%   +0.12%     
================================================================
  Files                               728      729       +1     
  Lines                             27101    27161      +60     
  Branches                           4574     4584      +10     
================================================================
+ Hits                              18964    19038      +74     
+ Misses                             6848     6829      -19     
- Partials                           1289     1294       +5     
Files with missing lines Coverage Δ
...nreplay/material/internal/SliderWireframeMapper.kt 97.40% <100.00%> (ø)
...com/datadog/android/sessionreplay/SessionReplay.kt 52.17% <100.00%> (+2.17%) ⬆️
...ndroid/sessionreplay/SessionReplayConfiguration.kt 100.00% <100.00%> (ø)
...tadog/android/sessionreplay/TextAndInputPrivacy.kt 100.00% <100.00%> (ø)
.../sessionreplay/internal/DefaultRecorderProvider.kt 93.44% <100.00%> (ø)
...oid/sessionreplay/internal/SessionReplayFeature.kt 98.73% <100.00%> (+0.04%) ⬆️
...nreplay/internal/recorder/SessionReplayRecorder.kt 96.90% <100.00%> (ø)
...essionreplay/internal/recorder/SnapshotProducer.kt 92.11% <100.00%> (ø)
...nreplay/internal/recorder/ViewOnDrawInterceptor.kt 89.19% <100.00%> (+0.30%) ⬆️
...lay/internal/recorder/WindowCallbackInterceptor.kt 100.00% <100.00%> (ø)
... and 12 more

... and 30 files with indirect coverage changes

ambushwork
ambushwork previously approved these changes Sep 4, 2024

@ambushwork ambushwork left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice job!

@jonathanmos
jonathanmos marked this pull request as ready for review September 4, 2024 13:47
@jonathanmos
jonathanmos requested review from a team as code owners September 4, 2024 13:47
xgouchet
xgouchet previously approved these changes Sep 5, 2024
@jonathanmos
jonathanmos dismissed stale reviews from xgouchet and ambushwork via a8ce83a September 5, 2024 14:30
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-5761/text-privacy branch from 482ba4a to a8ce83a Compare September 5, 2024 14:30
@jonathanmos
jonathanmos merged commit b12bf09 into feature/fine-grained-masking Sep 5, 2024
@jonathanmos
jonathanmos deleted the jmoskovich/rum-5761/text-privacy branch September 5, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants