Add support for analyzing clipboard copy operations in DLP
Categories
(Firefox :: Data Loss Prevention, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: gstoll, Assigned: gstoll)
References
(Blocks 2 open bugs)
Details
Attachments
(7 external files)
| Assignee | ||
Comment 1•2 months ago
|
||
Adds the configuration surface for analyzing clipboard copy operations:
browser.contentanalysis.interception_point.clipboard_copy.enabled
browser.contentanalysis.interception_point.clipboard_copy.plain_text_only
and the corresponding ContentAnalysis.InterceptionPoints.ClipboardCopy
enterprise policy. Later patches in this series read these prefs when
doing the copy analysis.
enabled defaults to false so that existing content analysis deployments
are unaffected.
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
No real behavior changes here, just setting up for later patches.
| Assignee | ||
Comment 3•2 months ago
|
||
Nothing creates copy requests yet, so this has no effect until later patches.
Tests are in part 5.
| Assignee | ||
Comment 4•2 months ago
|
||
Preparation for the next patch, which needs to defer a clipboard write
until an asynchronous content analysis check has answered.
Moves the body of SetData into SetDataImpl, which takes an optional
completion that is handed the final result. AsyncSetClipboardData::SetData
now notifies its nsIAsyncClipboardRequestCallback from that completion
instead of from the return value.
| Assignee | ||
Comment 5•2 months ago
|
||
The content analysis check is added to nsBaseClipboard::SetData since
every content-initiated clipboard write passes through there. When a copy
needs analyzing the write is held back as a PendingCopy, the check runs
asynchronously, and the data reaches the clipboard only once the agent
allows it.
The check is deliberately asynchronous (unlike paste), since nothing
waits on a copy verdict.
Some notes:
- A newer write replaces the PendingCopy, which makes the older verdict a
no-op, so the write issued last always wins no matter which verdict
arrives first. EmptyClipboard and the destructor cancel pending copies. - A blocked copy replaces the clipboard contents with a localized notice
rather than leaving them alone, so that the user cannot silently paste
whatever was there beforehand. - The content process never learns the verdict, so a blocked cut still
deletes the selection. The deletion is a single undo transaction, so
Ctrl+Z restores it. - As with paste, we don't analyze copies coming from chrome or
parent-rendered windows.
| Assignee | ||
Comment 6•2 months ago
|
||
Like paste, we need to treat alert()/confirm()/prompt() specially, since
they are from chrome which are normally exempt, but their content comes
from a page.
Unlike the usual path, this one knows the verdict before deciding whether
to delete, so a blocked cut here leaves the text in place.
Comment 8•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/2a6535a01e2d
https://hg.mozilla.org/mozilla-central/rev/cb37a08fb1af
https://hg.mozilla.org/mozilla-central/rev/7a72ac62fafd
https://hg.mozilla.org/mozilla-central/rev/0c1ec7518cd6
https://hg.mozilla.org/mozilla-central/rev/291e2d0ab86c
https://hg.mozilla.org/mozilla-central/rev/098bd7a12e05
Comment 9•1 month ago
|
||
Updated•1 month ago
|
Description
•