Manage Access Audits¶
The AWS Lake Formation connector provides access auditing capabilities to help organizations track user activity, ensure compliance, and enhance security monitoring. This feature enables you to collect and analyze audit logs from AWS CloudTrail to monitor access to Lake Formation resources.
Prerequisites¶
Important
Before performing the following steps; you must have an Amazon S3 bucket for storing the audit logs.
Steps to Enable Audit Logs¶
Step 1: Create Trail in AWS CloudTrail¶
-
Go to AWS CloudTrail service → Dashboard.
-
Click Create Trail.
-
On the General Details page, provide the Trail name (such as
LF_Cloud_Trail) of your choice. -
Provide the S3 storage location of your S3 bucket.
Make note of the S3 bucket location
Make note of the S3 bucket location for CloudTrail logs. For example,
lf-dev-bucket/AWSLogs/123456789012. -
Uncheck the Log file SSE-KMS encryption and Log file validation checkboxes.
-
Click Next.
-
On the page that appears, under Choose Log Events enable the checkbox for Management Events. Keep the checkboxes for Read and Write as checked.
-
Enable the checkbox for Data Events. Then scroll down to Data Events section, select the Data Event type as AWS Lake Formation and Log Selector template as Log All Events.
-
Click Next.
-
Confirm the values and click Create Trail.
Step 2: Create Database and Table for Storing Audit Logs Query Results¶
Use AWS Athena to create a database and table for storing audit logs query results.
2.1 Create Database¶
| SQL | |
|---|---|
2.2 Create Table¶
Replace the LOCATION path
In the following query, replace the LOCATION with your actual Amazon S3 bucket location of the CloudTrail logs.
Step 3: Configure IAM Policy for Reading Access Audits¶
IAM Policy Required
Before enabling access audits, ensure that the IAM policy for reading access audits (privacera-lf-audit-read-access-policy) is created and attached to your connector's IAM role.
For detailed instructions on creating and configuring this IAM policy, refer to the IAM Policy for Reading Access Audits section in the Prerequisites documentation:
- Push Mode: IAM Policy for Reading Access Audits
- Pull Mode: IAM Policy for Reading Access Audits
After creating the policy, attach it to the IAM role that was created during the configuration of the connector.
Configuration Properties¶
The following table describes all configuration properties for managing access audits in the Lake Formation connector:
| Property Name | Mandatory | Description | Default Value | Example Value |
|---|---|---|---|---|
CONNECTOR_LAKEFORMATION_AUDIT_ENABLE | Yes | Enables audit logs for the Lake Formation connector. Set to "true" to enable audit logs. | "false" | "true" |
CONNECTOR_LAKEFORMATION_AUDIT_DB_NAME | Yes | Specifies AWS audit database name that stores AWS audit logs. | - | "lf_audit_db" |
CONNECTOR_LAKEFORMATION_AUDIT_TABLE_NAME | Yes | Specifies AWS audit table name that stores AWS audit logs. This table should reference CloudTrail logs. | - | "cloudtrail_logs" |
CONNECTOR_LAKEFORMATION_AUDIT_ATHENA_S3_OUTPUT_LOCATION | Yes | Specifies S3 location to store the access audit logs query results. Format: s3://<bucket-name>/path/. | - | "s3://athena-results-bucket/query-results/" |
CONNECTOR_LAKEFORMATION_AWS_ATHENA_REGION | No | The AWS region where Athena is located. | - | "us-east-1" |
CONNECTOR_LAKEFORMATION_AWS_ATHENA_ENDPOINT | No | Custom Athena endpoint URL. | "" | "athena.us-east-1.amazonaws.com:443" |
CONNECTOR_LAKEFORMATION_AWS_ATHENA_WORKGROUP | No | The Athena workgroup to use for queries. | "" | "primary" |
CONNECTOR_LAKEFORMATION_AUDIT_SYNC_INTERVAL | No | Specifies the interval in seconds between audit sync operations. | "120" | "300" |
CONNECTOR_LAKEFORMATION_AUDIT_DELAY_SEC | No | Delay in seconds before processing audit logs. AWS takes time to write CloudTrail logs to S3, so this delay ensures audits are fully written before processing to avoid audit loss. Default is 600 seconds (10 minutes). If audits are missing, increase to 900 or 1200 seconds. Example: With delay of 600 seconds and sync interval of 120 seconds, audits appear in the connector after 12 minutes. | "600" | "600" |
CONNECTOR_LAKEFORMATION_AUDIT_EXCLUDED_USERS | No | Comma-separated list of users to exclude from the audits. Leave empty to include all users. | "" | "user1@example.com, user2@example.com" |
CONNECTOR_LAKEFORMATION_AUDIT_EXCLUDED_ACCESS_TYPES | No | Comma-separated list of access types to exclude from the audits. Leave empty to include all access types. | "" | "GetQueryExecution, GetDatabases" |
CONNECTOR_LAKEFORMATION_AUDIT_INCLUDED_SERVICES | No | Comma-separated list of AWS services to include in the audits. Only audit logs from these services will be displayed. | "athena.amazonaws.com, lakeformation.amazonaws.com" | "athena.amazonaws.com, glue.amazonaws.com, lakeformation.amazonaws.com" |
CONNECTOR_LAKEFORMATION_AUDIT_PROGRESS_REPORT_TRACKER_ENABLE | No | Enable progress tracking for audit operations. | "false" | "false" |
CONNECTOR_LAKEFORMATION_AUDIT_PROGRESS_COMPLETE_REPORT_ENABLE | No | Enable completion reports for audit operations. | "false" | "false" |
CONNECTOR_LAKEFORMATION_AUDIT_PROGRESS_COMPLETE_REPORT_INTERVAL_SEC | No | Interval in seconds for generating completion reports. Only applicable if progress reporting is enabled. | "1800" | "1800" |
Setup¶
-
SSH to the instance where Privacera Manager is installed.
-
Run the following command to open the
.ymlfile to be edited.File name depends on connector mode
If you have multiple connectors, replace
instance1with the appropriate connector instance name.-
For push mode
Bash -
For pull mode
Bash
-
-
Update or add the following properties:
Example configuration (adjust the values for your environment):
-
Once the properties are configured, run the following commands to update your Privacera Manager platform instance:
Step 2 - Apply the Privacera Manager helm charts. Step 3 - (Optional) Post-installation step which generates Plugin tar ball, updates Route 53 DNS and so on. This step is not required if you are updating only connector properties.
Step 1 - Setup which generates the helm charts. This step usually takes few minutes.
-
In PrivaceraCloud portal, navigate to Settings → Applications.
-
On the Connected Applications screen, select AWS Lake Formation.
-
Click the pen icon or the Account Name to modify the settings.
-
On the Edit Application screen, go to Access Management.
-
Under BASIC tab:
- Enable Enable access audits with the toggle button.
- Enter the following required values:
- Lake formation audit logs database: Enter the AWS audit database name (e.g.,
lf_audit_db). - Lake Formation audit logs table name: Enter the AWS audit table name (e.g.,
cloudtrail_logs). - S3 output location for access audit logs query results: Enter the S3 location for Athena query results (e.g.,
s3://athena-results-bucket/query-results/).
- Lake formation audit logs database: Enter the AWS audit database name (e.g.,
-
Under ADVANCED tab:
- Users to exclude when fetching access audits: Enter comma-separated list of users to exclude (optional). Leave empty to include all users.
-
Under Add New Custom Properties, you can add the following optional properties:
Example configuration (adjust the values for your environment):
-
Click SAVE to apply the changes.
Limitations¶
Omitted Query Strings in Lake Formation Access Audits¶
Access audit logs generated by Lake Formation cannot retrieve SQL queries executed by users. AWS has replaced actual query strings with ***OMITTED*** in these log files. Thus, Privacera displays ***OMITTED*** query strings in its UI as part of access audits.
For more information, see Understanding Athena log file entries in the AWS documentation.
- Prev topic: Advanced Configuration