Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

Using Agent via command line interface (CLI) executable


Previously (versions prior to 3.0) it was possible to call the Agent executable with parameters to change classification/distribution/compliance of a file from command line.

Starting with version 3.0 we do ship a separate CLI executable with each Agent installation (GVClient.CLI.Windows.exe) that can be used to:

  • manually apply a given classification to a file

  • manually apply a given distribution to a file

  • manually apply a given compliance to a file

  • apply classification/distribution/compliance as described in Expert Configuration, section “externalLabelMappings”

What does it do?

By calling the CLI with parameters we run actions listed in previous paragraph and as a result ADD or OVERWRITE metadata of requested file.

What it does not do?

It is not possible to REMOVE any metadata from the file, you can only ADD or OVERWRITE.

It is not possible to add visual markings to the file (December 2023).

No machine learning capabilities - we need user to provide required classification/compliance/distribution as parameter.

Supported files

This tool DO NOT currently support all Synergy-supported files as per the document located here: Synergy Pro Supported File Types

It only supports files that have metadata. So for example DOC/XLS/PPT files are NOT SUPPORTED.

Setup and functionality

Basic functionality and parameters

To classify a file using CLI and add PCI compliance you can run it as:

GVClient.CLI.Windows.exe filename.docx --silent --overwrite --save --tag e16409a7-1700-4153-9090-3955bc2f0ae8/Classification/Confidential --tag f14fc1f1-8950-40d5-8a29-45909da947d6/PCI/true

--silent - Optional. Silent executes the command in the background.

--save - Optional. A “Save” parameter is required to write changes to the files. W/o “save” the commands are executed in a “dry-run” mode

--tag - Optional. Tag parameter specifies what labels to write to a file.

--map-external - Optional. Map-external will use the mapping specified in the configuration under the “externalLabelMappings” stanza, as shown in the screenshot below. This parameter checks file’s metadata with the regex specified in the configuration and applies a GV label specified in tagset and tag sections of the externalLabelMapping stanza of the configuration.

--overwrite - Optional. Overwrite means to disregard all existing GV tags inside of a file. For example if we want to tag a file, and a file is already tagged by GV, then we won’t overwrite GV tag if the overwrite option is specified.

Running CLI will result in logs being shown in the console. You can redirect the logs to a file or null device if you are running the CLI for multiple files.

Sample result:

Applying classification based on existing metadata content

Please refer to: Boldon James migration

Other limitations

User under which the CLI is executed needs access/write rights to a file you are trying to modify. This may cause issues if CLI is executed under different user context.

This is specifically true for any DLP since it is not executing script in user context, rather SYSTEM.

Troubleshooting

Log files for CLI can be located at:

%AppData%\Roaming\GVClient.CLI.Windows\Logs

Example of log after running CLI with --map-external:

  • No labels