Connection to agent is not re-established if agent is restarted or started after Nightly
Categories
(Firefox :: Data Loss Prevention, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox137 | --- | verified |
People
(Reporter: haik, Assigned: gstoll)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
If the DLP agent is started after Nightly starts, the connection is not established. This includes if the agent was running when Nightly launched and is then restarted.
Comment 1•1 year ago
|
||
The severity field is not set for this bug.
:handyman, could you have a look please?
For more information, please visit BugBot documentation.
Assignee | ||
Updated•1 year ago
|
Comment 2•1 year ago
|
||
This seems fine but I thought the plan for this was to do nothing? The user would get DLP blocks for everything, along with a message about the agent connection having failed, until the browser was restarted.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 4•6 months ago
|
||
This method is used in part 2 to avoid recreating a MozPromise that
hasn't been resolved or rejected.
This change also includes some linting.
Updated•6 months ago
|
Assignee | ||
Comment 5•6 months ago
|
||
The CallClientWithRetry() method encapsulates the logic for attempting
to reconnect to the client if either:
- the mCaClientPromise was rejected, so last time we failed to connect
to the client - the mCaClientPromise was resolved, but calling the client returns an
error, indicating that in the meantime the DLP agent has been terminated
(and possibly started again)
Assignee | ||
Comment 6•6 months ago
|
||
After this change the only uses of mCaClientPromise should be in creating
the client or in CallClientWithRetry(), so everything that uses the client
will go through the retry logic if the client is not connected.
Assignee | ||
Comment 7•6 months ago
|
||
I also added a few tests for GetDiagnosticInfo().
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Comment 9•6 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1e50a6eb0b4b
https://hg.mozilla.org/mozilla-central/rev/7f757483382e
https://hg.mozilla.org/mozilla-central/rev/9550881f6afa
Comment 10•6 months ago
|
||
Hello! We have verified that the DLP Agent connection can be established with Firefox 137.0a1 (2025-02-20) on Windows 10x64 in the following scenarios:
- start Firefox, then start the DLP agent - test case C2749248
- stop the DLP Agent while Firefox is running then restart the DLP agent - test case C2929598
Note that theBrowser connected
log output is displayed in CMD only after performing clipboard paste/ drag and drop action or printing if the agent is started/ restarted while Firefox is running.
Please let us know if the verification and test cases are correct or if anything else should be added here. Thank you!
Assignee | ||
Comment 11•6 months ago
|
||
Great, thanks!
Those tests look good. I would recommend adding a step in both test cases to go to about:support and verify that the "Content Analysis (DLP)" section is correct, specifically:
- "Active" should be true as long as the policy is set up correctly, even if the agent isn't running
- "Connected to Agent" is true if the last time a DLP request was made it was successfully sent to the agent. (so if the agent is terminated, then a request is made from Firefox that fails, then the agent is restarted, it is OK if this value is false before another request is done)
- "Agent Path" should be the path on disk of the agent, if it is connected
It would be nice to do this:
Assignee | ||
Comment 12•6 months ago
|
||
(oh, and the "Browser connected" message not showing up until a request is sent to the agent is expected - we only try to reestablish the connection when we need to send a request, thanks!)
Comment 13•6 months ago
|
||
Thank you, Greg! I have updated the test cases and verified that everything works as expected on Windows10 x64 with 137.0a1 (2025-02-23).
Description
•