Replies: 5 comments
-
Hi David, chromium does work with the demo agent. There are currently no instructions but let me write some up and share here shortly. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Content analysis is a Google Chrome enterprise feature which is available on browsers enrolled with Chrome Browser Cloud Management (CBCM). However it is possible to build the Chromium browser on Microsoft Windows with a specific patch to enable the feature without CBCM. Step 1 - Build the Demo AgentFollow the instructions of the Google Chrome Content Analysis Connector Agent SDK to get and build the SDK and demo agent on Microsoft Windows. Step 2 - Run the Demo AgentThe demo agent is a simple command line program that receives content analysis requests from the browser and responds with “allow” or “ deny”. It differs from a real agent in the following ways:
Open a Command Prompt and run the agent as follows:
The most important part to verify in the output above is the string Step 3 - Build ChromiumFollow the Chromium developer instructions for getting and building Chromium on Microsoft Windows and make sure it runs correctly. Apply the following patch to the source code and rebuild: diff --git a/chrome/browser/enterprise/connectors/connectors_manager.cc b/chrome/browser/enterprise/connectors/connectors_manager.cc
index 667056860943b..ec23d3627297a 100644
--- a/chrome/browser/enterprise/connectors/connectors_manager.cc
+++ b/chrome/browser/enterprise/connectors/connectors_manager.cc
@@ -8,6 +8,7 @@
#include "base/check.h"
#include "base/feature_list.h"
+#include "base/json/json_reader.h"
#include "base/values.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/enterprise/connectors/analysis/content_analysis_features.h"
@@ -38,21 +39,7 @@ ConnectorsManager::ConnectorsManager(
ConnectorsManager::~ConnectorsManager() = default;
bool ConnectorsManager::IsConnectorEnabled(AnalysisConnector connector) const {
- if (analysis_connector_settings_.count(connector) == 0 &&
- prefs()->HasPrefPath(ConnectorPref(connector))) {
- CacheAnalysisConnectorPolicy(connector);
- }
-
- if (analysis_connector_settings_.count(connector) != 1) {
- return false;
- }
-
- // If the connector is for local content analysis, make sure it is also
- // enabled by flags. For now, only one connector is supported at a time.
- const auto& settings = analysis_connector_settings_.at(connector)[0];
-
- return settings.is_cloud_analysis() ||
- base::FeatureList::IsEnabled(kLocalContentAnalysisEnabled);
+ return true;
}
bool ConnectorsManager::IsConnectorEnabled(ReportingConnector connector) const {
@@ -145,14 +132,14 @@ void ConnectorsManager::CacheAnalysisConnectorPolicy(
AnalysisConnector connector) const {
analysis_connector_settings_.erase(connector);
- // Connectors with non-existing policies should not reach this code.
- const char* pref = ConnectorPref(connector);
- DCHECK(pref);
-
- const base::Value::List& policy_value = prefs()->GetList(pref);
- for (const base::Value& service_settings : policy_value)
- analysis_connector_settings_[connector].emplace_back(
- service_settings, *service_provider_config_);
+ absl::optional<base::Value> service_settings = base::JSONReader::Read(R"({
+ "service_provider": "local_system_agent",
+ "block_until_verdict": 1,
+ "minimum_data_size": 1,
+ "enable": [{"url_list": ["*"], "tags": ["dlp"]}]
+ })");
+ analysis_connector_settings_[connector].emplace_back(
+ service_settings.value(), *service_provider_config_);
}
void ConnectorsManager::CacheReportingConnectorPolicy( Step 4 - Run ChromiumBy default CBCM and content analysis are not enabled in Chromium. Run Chromium as follows:
Chromium should connect to the agent on startup. Verify that the agent has detected the browser by looking for a message similar to the following in its Command Prompt window:
Step 5 - Perform User ActionsUser actions that will trigger content analysis are:
Verify that the demo agent is correctly receiving content analysis requests from Chromium by looking for output similar to the following in its Command Prompt window:
|
Beta Was this translation helpful? Give feedback.
-
Thanks, Roger, that is exactly what I was looking for. |
Beta Was this translation helpful? Give feedback.
-
diff --git a/chrome/browser/enterprise/connectors/connectors_manager.cc b/chrome/browser/enterprise/connectors/connectors_manager.cc #include "base/check.h" bool ConnectorsManager::IsConnectorEnabled(AnalysisConnector connector) const {
bool ConnectorsManager::IsConnectorEnabled(ReportingConnector connector) const {
} void ConnectorsManager::CacheReportingConnectorPolicy( |
Beta Was this translation helpful? Give feedback.
-
C:\src\chromium> .\out\Default\chrome.exe --enable-chrome-browser-cloud-management --enable-features=EnablePrintContentAnalysis |
Beta Was this translation helpful? Give feedback.
-
Hi, we're looking into integrating this SDK into Firefox. I understand that the SDK is currently available in Chromium -- are there written instructions for configuring Chromium to consult an agent? Does it work with the demo agent? It will be very helpful to see this running.
Beta Was this translation helpful? Give feedback.
All reactions