Audit Logging

Audit log description/formatting

    Audit Logging

    Audit records and application logs stream to Amazon CloudWatch Logs or optionally be sent to ESA. Cloud Protect uses a JSON format for audit records that is described in the following sections.

    You can analyze and alert on audit records using Protegrity ESA or Amazon CloudWatch. Third-party solutions may be used if they are supported by Amazon Cloudwatch or AWS Lambda logging extensions. For more information about forwarding your audit records to ESA, contact Protegrity. For more information about Amazon CloudWatch, refer to the Amazon CloudWatch User Guide.

    For more information about audit records, refer to the Protegrity Analytics Guide.

    Audit record fields

    The audit record format has been altered in version 3.1 of the protector to provide more information.

    FieldDescription
    additional_info.deployment_idThe deployment_id contains the name of the Protect Function. It is automatically set based on the cloud-specific environment variables assigned to the Protect Function. This allows identifying the Cloud Protect deployment responsible for generating audit log.
    additional_info.cluster(Optional) Redshift cluster ARN
    additional_info.descriptionA human-readable message describing the operation
    additional_info.query_id(Optional) Identifies the query that triggered the operation
    additional_info.request_id(Optional) AWS Lambda request identifier
    cntNumber of operations, may be aggregated
    correlationid(Deprecated) Use additional_info instead
    levelLog severity, one of: SUCCESS, WARNING, ERROR, EXCEPTION
    logtypeAlways “Protection”
    origin.ipThe private IP address of the compute resource that operates the Protect Function and is responsible for generating the log entry.
    origin.hostnameHostname of the system that generated the log entry
    origin.time_utcUTC timestamp when the log entry was generated
    protection.audit_codeAudit code of the protect operation; see the log return codes table in the Protegrity Troubleshooting Guide
    protection.dataelementData element used for the policy operation
    protection.datastoreName of the data store corresponding to the deployed policy
    protection.mask_setting(Optional) Mask setting from policy management
    protection.operationOperation type, one of: Protect, Unprotect, Reprotect
    protection.policy_userUser that performed the operation
    protector.core_versionInternal core component version
    protector.familyAlways “cp” for Cloud Protect
    protector.lambda_versionProtector Lambda application version.
    protector.pcc_versionInternal pcc component version
    protector.vendorIdentifies the cloud vendor and the database vendor
    protector.versionProtector version number
    signature.checksumHash value of the signature key ID used to sign the log message when the log is generated
    signature.key_idKey used to sign the log message when the log is generated

    Example Audit Records

    The following are sample audit messages:

    Protect Success:

    {
          "additional_info": {
            "deployment_id": "Protegrity-Protect-function-deployment-id",
            "description": "Data protect operation was successful.",
            "query_id": "sf-query-id:01978dbc-0582-d7e4-0000-002a3603a20d",
            "request_id": "8476a536-e9f4-11e8-9739-2dfe598c3fcd"
          },
          "cnt": 4000,
          "correlationid": "sf-query-id:01978dbc-0582-d7e4-0000-002a3603a20d",
          "logtype": "Protection",
          "level": "SUCESS",
          "origin": {
            "hostname": "localhost",
            "ip": "127.0.0.1",
            "time_utc": 1635363966
          },
          "protection": {
            "dataelement": "deAddress",
            "operation": "Protect",
            "audit_code": 6,
            "datastore": "SAMPLE_POLICY",
            "policy_user": "test_user"
          },
          process":{
            "name":"protect",
            "id":"13",
            "module":"coreprovider",
            "thread_id":"573580544",
            "user":"sbx_user1051",
            "platform":"\"Linux_x64\"",
            "version":"UNKNOWN"
          },
          "client": {
            "ip":"169.254.62.117"
          },
          "protector": {
            "family": "cp",
            "version": "4.0.0.102",
            "vendor": "aws.snowflake",
            "datastore":"SAMPLE_POLICY",
            "pcc_version": "4.0.0.9",
            "core_version": "2.1.4+0.g93016.2.1",
            "lambda_version":"4.0.1"
          },
          "signature": {
            "key_id": "95f5a194-b0a4-4351-a",
            "checksum": "B324AF7C56944D91C47847A77C0367C594C0B948E7E75654B889571BD4F60A71"
          }
        }
    

    User permission denied:

    {
          "additional_info": {
            "deployment_id": "Protegrity-Protect-function-deployment-id",
            "description": "The user does not have the appropriate permissions to perform the requested operation.",
            "query_id": "sf-query-id:01978dbc-0582-d7e4-0000-002a3603a20d",
            "request_id": "8476a536-e9f4-11e8-9739-2dfe598c3fcd"
          },
          "cnt": 4000,
          "correlationid": "sf-query-id:01978dbc-0582-d7e4-0000-002a3603a20d",
          "logtype": "Protection",
          "level": "ERROR",
          "origin": {
            "hostname": "localhost",
            "ip": "127.0.0.1",
            "time_utc": 1635363966
          },
          "protection": {
            "dataelement": "deAddress",
            "operation": "Protect",
            "audit_code": 3,
            "datastore": "SAMPLE_POLICY",
            "policy_user": "test_user"
          },
          process":{
            "name":"protect",
            "id":"13",
            "module":"coreprovider",
            "thread_id":"573580544",
            "user":"sbx_user1051",
            "platform":"\"Linux_x64\"",
            "version":"UNKNOWN"
          },
          "client": {
            "ip":"169.254.62.117"
          },
          "protector": {
            "family": "cp",
            "version": "4.0.0.102",
            "vendor": "aws.snowflake",
            "datastore":"SAMPLE_POLICY",
            "pcc_version": "4.0.0.9",
            "core_version": "2.1.4+0.g93016.2.1",
            "lambda_version":"4.0.1"
          },
          "signature": {
            "key_id": "95f5a194-b0a4-4351-a",
            "checksum": "A216797C56944D91C47847A77C0367C594C0B948E7E75654B889571BD4F60A71"
          }
        }
    

    Data element not found:

    {
          "additional_info": {
            "deployment_id": "Protegrity-Protect-function-deployment-id",
            "description": "The data element could not be found in the policy.",
            "query_id": "sf-query-id:01978dbc-0582-d7e4-0000-002a3603a20d",
            "request_id": "8476a536-e9f4-11e8-9739-2dfe598c3fcd"
          },
          "cnt": 4000,
          "correlationid": "sf-query-id:01978dbc-0582-d7e4-0000-002a3603a20d",
          "logtype": "Protection",
          "level": "ERROR",
          "origin": {
            "hostname": "localhost",
            "ip": "127.0.0.1",
            "time_utc": 1635363966
          },
          "protection": {
            "dataelement": "deAddress",
            "operation": "Protect",
            "audit_code": 2,
            "datastore": "SAMPLE_POLICY",
            "policy_user": "test_user"
          },
          process":{
            "name":"protect",
            "id":"13",
            "module":"coreprovider",
            "thread_id":"573580544",
            "user":"sbx_user1051",
            "platform":"\"Linux_x64\"",
            "version":"UNKNOWN"
          },
          "client": {
            "ip":"169.254.62.117"
          },
          "protector": {
            "family": "cp",
            "version": "4.0.0.102",
            "vendor": "aws.snowflake",
            "datastore":"SAMPLE_POLICY",
            "pcc_version": "4.0.0.9",
            "core_version": "2.1.4+0.g93016.2.1",
            "lambda_version":"4.0.1"
          },
          "signature": {
            "key_id": "95f5a194-b0a4-4351-a",
            "checksum": "AF09217C56944D91C47847A77C0367C594C0B948E7E75654B889571BD4F60A71"
          }
        }
    

    Last modified : December 03, 2025