Agent Command Line Reference
Introduction
Getvisibility agent has a command line interface that allows interaction between 3rd parties and our agent. In this document below we describe supported commands and use cases.
Getting the tagset configuration
For the tasks that require manual tagging it is important to know the tagset combination of ID and value for a successful file tagging, as the agent won’t tag a file with not a valid combination of id and a value. Each agent receives its configuration from the Focus platform and stores it locally. In order to deal with the Getvisibility tags, we need to obtain the latest configuration that contains the issued classification taxonomy.
First, we need to obtain the auth token. For this command, we need to know how the GV server is deployed. Does it have SSL enabled, does it have a self-signed certificate or not, and the credentials to access the system’s back-end (usually similar credentials to login to our UI with the admin rights).
Below is the sample request to the system with a self-signed certificate. For more information, please refer to the Getvisibility Focus API documentation.
Sample Auth Request
curl --insecure --location --request POST "https://52.184.166.119:9999/auth/token"
\ --header 'Content-Type: application/json' \
--header 'cache-control: no-cache' \
--header 'Accept: text/plain' \
--data-raw '{
"username": "admin", "password": "YOURSECUREPASSWORD"
}'
A resulting token, needs then to be used in out calls to retrieve an agent configuration parameters. A token must be used as a part of the parameter passed to the API command
`--header 'Authorization: Bearer <token>`.
Below is the sample request to the system with a self-signed certificate. For more information, please refer to the Getvisibility Focus API documentation.
Sample Request to get configuration information
curl --insecure --location --request GET 'https://52.184.166.119:9999/configuration' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MjgwMjU5NDQsInJvbGVzIjpbMCwxLDIsMy w0XSwic3ViIjoiYWRtaW4iLCJhdWQiOiJXZWJBcHBsaWNhdGlvbiIsImlzcyI6Imh0dHA6Ly9nZXR2aXNpY mlsaXR5LmNvbSJ9.Ctvm4DPDw2at8ddKS8T8av2HH--Km7Ftr0LH5GjW_UE' \
--header 'Content-Type: application/json' \
--header 'cache-control: no-cache'
Sample Result
[
{
"id": "267f272c-545c-4bb7-a8a5-8626848cff4b",
"timeStamp": "2021-07-01T14:42:53.108+01:00[Europe/London]",
"classificationConfiguration": {
"id": "e16409a7-1700-4153-9090-3955bc2f0ae8",
"tags": [
"Public",
"Internal",
"Confidential",
"Highly Confidential"
]
},
"complianceConfiguration": {
"id": "f14fc1f1-8950-40d5-8a29-45909da947d6",
"tags": [
{
"standard": "GDPR/PII",
"subTags": []
},
{
"standard": "PCI",
"subTags": []
}
]
},
"officeConfiguration": {
"officePluginActive": true,
"displayHeader": true,
"header": "Classified as {classification} by Getvisibility-WT®",
"displayFooter": false,
"footer": "",
"displayWatermark": false,
"watermark": "",
"tagDirtyBuffersOnSave": "Warn",
"tagBeforePrint": "Warn",
"modifyMetadata": true,
"enableSuggestions": true
},
"outlookConfiguration": {
"outlookPluginActive": true,
"displayHeader": true,
"header": "Classified as {classification} by Getvisibility-WT®",
"displayFooter": true,
"footer": "Classified as {classification} by Getvisibility-WT®",
"tagOnSend": "Warn",
"tagOnPrint": "Warn",
"minAttachmentsTag": true,
"rules": [
{
"classificationTag": "Public",
"defaultPolicy": "Allow",
"blockList": [],
"warnList": [],
"allowList": []
},
{
"classificationTag": "Internal",
"defaultPolicy": "Warn",
"blockList": [],
"warnList": [],
"allowList": [
"zumoba.com",
"waterfordtechnologies.com"
]
},
{
"classificationTag": "Confidential",
"defaultPolicy": "Warn",
"blockList": [],
"warnList": [],
"allowList": [
"zumoba.com",
"waterfordtechnologies.com"
]
},
{
"classificationTag": "Highly Confidential",
"defaultPolicy": "Warn",
"blockList": [],
"warnList": [],
"allowList": [
"zumoba.com",
"waterfordtechnologies.com"
]
}
]
}
},
{
"id": "d6e1fe96-650a-4de8-b5a9-4cb58ca1b885",
"timeStamp": "2021-06-17T13:07:34.477+01:00[Europe/London]",
"classificationConfiguration": {
"id": "e16409a7-1700-4153-9090-3955bc2f0ae8",
"tags": [
"Public",
"Internal",
"Confidential",
"Highly Confidential"
]
},
"complianceConfiguration": {
"id": "f14fc1f1-8950-40d5-8a29-45909da947d6",
"tags": [
{
"standard": "GDPR/PII",
"subTags": []
},
{
"standard": "PCI",
"subTags": []
}
]
},
"officeConfiguration": {
"officePluginActive": true,
"displayHeader": true,
"header": "Classified as {classification} by Getvisibility-WT®",
"displayFooter": false,
"footer": "",
"displayWatermark": false,
"watermark": "",
"tagDirtyBuffersOnSave": "Warn",
"tagBeforePrint": "Warn",
"modifyMetadata": true,
"enableSuggestions": true
},
"outlookConfiguration": {
"outlookPluginActive": true,
"displayHeader": true,
"header": "Classified as {classification} by Getvisibility-WT®",
"displayFooter": true,
"footer": "Classified as {classification} by Getvisibility-WT®",
"tagOnSend": "Warn",
"tagOnPrint": "Warn",
"minAttachmentsTag": true,
"rules": [
{
"classificationTag": "Public",
"defaultPolicy": "Allow",
"blockList": [],
"warnList": [],
"allowList": []
},
{
"classificationTag": "Internal",
"defaultPolicy": "Warn",
"blockList": [],
"warnList": [],
"allowList": [
"zumoba.com",
"waterfordtechnologies.com"
]
},
{
"classificationTag": "Confidential",
"defaultPolicy": "Warn",
"blockList": [],
"warnList": [],
"allowList": [
"zumoba.com",
"waterfordtechnologies.com"
]
},
{
"classificationTag": "Highly Confidential",
"defaultPolicy": "Warn",
"blockList": [],
"warnList": [],
"allowList": [
"zumoba.com",
"waterfordtechnologies.com"
]
}
]
}
}
]
Items like "classificationConfiguration", “complianceConfiguration”, “distributionConfiguration” are often used in the manual tagging requests via the command line.
Manually Tag a Document
Getvisibility agent allows to manually tag a document with a set of classification tags. This command will trigger the agent to write a metadata tag to a file, with a standard getvisibility metadata format.
Default Tag Types
Default Tag Types for tagsets is as below:
Classification = categorical
Distribution = categorical
Compliance = binary
When tagType=binary; true/false should be used in command.
Command format
$ GVClient.CLI.Windows.exe "<file name>" --silent --save --tag
<classificationConfigurationId>/Classification/<tag> Optional
--tag <distributionConfigurationId>/Distribution/<tag>
--tag <complianceConfigurationId>/Compliance/<tag>
Sample command
Executable parameters:
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. For example “--tag e16409a7-1700-4153-9090-3955bc2f0ae8/Classification/Confidential” will write a Confidential tag from the “e16409a7-1700-4153-9090-3955bc2f0ae8” Classification TagSet.
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.
Related content
Classified as Getvisibility - Partner/Customer Confidential