gecko-dev/third_party/content_analysis_sdk
2024-03-27 20:42:20 +00:00
..
agent Bug 1886255 part 2 - Update Content Analysis SDK to new version 9a408736204513e0e95dd2ab3c08de0d95963efc from 2023-09-20 15:27:43 r=dlp-reviewers,handyman 2024-03-27 20:42:20 +00:00
browser Bug 1886255 part 2 - Update Content Analysis SDK to new version 9a408736204513e0e95dd2ab3c08de0d95963efc from 2023-09-20 15:27:43 r=dlp-reviewers,handyman 2024-03-27 20:42:20 +00:00
common Bug 1811076: Part 1 - Initial commit of content analysis SDK r=cmartin 2023-10-26 01:17:09 +00:00
demo Bug 1886255 part 2 - Update Content Analysis SDK to new version 9a408736204513e0e95dd2ab3c08de0d95963efc from 2023-09-20 15:27:43 r=dlp-reviewers,handyman 2024-03-27 20:42:20 +00:00
docs Bug 1811076: Part 1 - Initial commit of content analysis SDK r=cmartin 2023-10-26 01:17:09 +00:00
proto/content_analysis/sdk Bug 1886255 part 2 - Update Content Analysis SDK to new version 9a408736204513e0e95dd2ab3c08de0d95963efc from 2023-09-20 15:27:43 r=dlp-reviewers,handyman 2024-03-27 20:42:20 +00:00
agent_improvements.patch Bug 1886255 part 1 - add patch for our changes to content_analysis_sdk r=dlp-reviewers,handyman 2024-03-27 20:42:19 +00:00
CMakeLists.txt Bug 1811076: Part 3 - Beef up content analysis demo agent for testing r=cmartin 2023-10-31 11:33:46 +00:00
LICENSE Bug 1811076: Part 1 - Initial commit of content analysis SDK r=cmartin 2023-10-26 01:17:09 +00:00
moz.yaml Bug 1886255 part 2 - Update Content Analysis SDK to new version 9a408736204513e0e95dd2ab3c08de0d95963efc from 2023-09-20 15:27:43 r=dlp-reviewers,handyman 2024-03-27 20:42:20 +00:00
prepare_build Bug 1886255 part 2 - Update Content Analysis SDK to new version 9a408736204513e0e95dd2ab3c08de0d95963efc from 2023-09-20 15:27:43 r=dlp-reviewers,handyman 2024-03-27 20:42:20 +00:00
prepare_build.bat Bug 1811076: Part 1 - Initial commit of content analysis SDK r=cmartin 2023-10-26 01:17:09 +00:00
README.md Bug 1811076: Part 1 - Initial commit of content analysis SDK r=cmartin 2023-10-26 01:17:09 +00:00

Google Chrome Content Analysis Connector Agent SDK

The Google Chrome Content Analysis Connector provides an official mechanism allowing Data Loss Prevention (DLP) agents to more deeply integrate their services with Google Chrome.

DLP agents are background processes on managed computers that allow enterprises to monitor locally running applications for data exfiltration events. They can allow/block these activities based on customer defined DLP policies.

This repository contains the SDK that DLP agents may use to become service providers for the Google Chrome Content Analysis Connector. The code that must be compiled and linked into the content analysis agent is located in the agent subdirectory.

A demo implementation of a service provider is located in the demo subdirectory.

The code that must be compiled and linked into Google Chrome is located in the browser subdirectory.

The Protocol Buffer serialization format is used to serialize messages between the browser and the agent. The protobuf definitions used can be found in the proto subdirectory.

Google Protocol Buffers

This SDK depends on Google Protocol Buffers version 3.18 or later. It may be installed from Google's download page for your developement platform. It may also be installed using a package manager.

The included prepare_build scripts use the Microsoft vcpkg package manager to install protobuf. vcpkg is available on all supported platforms.

Build

Pre-requisites

The following must be installed on the computer before building the demo:

  • git version 2.33 or later.
  • cmake version 3.23 or later.
  • A C++ compiler toolchain for your platform.
  • On linux, the realpath shell tool, available in the coreutils package. In Debian-based distributions use sudo apt intall coreutils. In Red Hat distributions use sudo yum install coreutils.
  • On Mac, use brew install cmake coreutils pkg-config googletest or an equivalent setup

Running prepare_build

First get things ready by installing required dependencies:

$SDK_DIR/prepare_build <build-dir>

where <build-dir> is the path to a directory where the demo will be built. By default, if no argument is provided, a directory named build will be created in the project root. Any output within the build/ directory will be ignored by version control.

prepare_build performs the following steps:

  1. Downloads the vcpkg package manager.
  2. Downloads and builds the Google Protocol Buffers library.
  3. Creates build files for your specific platform.

Cmake Targets

To build the demo run the command cmake --build <build-dir>.

To build the protocol buffer targets run the command cmake --build <build-dir> --target proto