-
Notifications
You must be signed in to change notification settings - Fork 1k
RANGER-5376:Add DataSetIds in the Ranger audit events for enabling searching with DataSet Ids #713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…arching with DataSet Ids Signed-off-by: Ramesh Mani <rmani@apache.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for datasetIds in Ranger audit events to enable searching audit logs by dataset ID. This is important because when a DataSet name changes, audits can still be retrieved using the immutable dataset ID rather than relying solely on the dataset name.
Key changes:
- Added
datasetIdsfield to audit events and data structures - Updated test cases to include expected
datasetIdsin result assertions - Modified search functionality to support filtering by dataset ID
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
VXAccessAudit.java |
Added datasetIds field with getter/setter to audit view model |
GdsAccessResult.java |
Added datasetIds field and supporting methods to access result object |
GdsDatasetEvaluator.java |
Modified to populate datasetIds during evaluation |
RangerDefaultAuditHandler.java |
Added logic to extract and set datasetIds in audit events |
AuthzAuditEvent.java |
Added datasetIds field to core audit event model |
SolrAuditProvider.java |
Updated to include datasetIds when creating Solr documents |
SolrAuditDestination.java |
Updated to include datasetIds when creating Solr documents |
AssetREST.java |
Added extraction of datasetId search parameter |
SolrAccessAuditsService.java |
Added logic to populate datasetIds from Solr documents |
ElasticSearchAccessAuditsService.java |
Added logic to populate datasetIds from Elasticsearch documents |
CloudWatchAccessAuditsService.java |
Contains duplicated code setting projects field |
TestAssetREST.java |
Updated test verification to expect 2 calls to extractLong |
| Schema files | Added datasetIds field definitions to Solr and Elasticsearch schemas |
| Test JSON files | Updated expected results to include datasetIds arrays |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...y-admin/src/main/java/org/apache/ranger/amazon/cloudwatch/CloudWatchAccessAuditsService.java
Outdated
Show resolved
Hide resolved
agents-common/src/test/resources/policyengine/gds/test_gds_policy_hive_row_filter.json
Outdated
Show resolved
Hide resolved
agents-common/src/test/resources/policyengine/gds/test_gds_policy_hive_data_mask.json
Outdated
Show resolved
Hide resolved
…earching with DataSet Ids - Addressed review comment by copilot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 7 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
agents-common/src/test/resources/policyengine/gds/test_gds_policy_hive_access.json
Outdated
Show resolved
Hide resolved
agents-common/src/test/resources/policyengine/gds/test_gds_policy_hive_row_filter.json
Outdated
Show resolved
Hide resolved
agents-common/src/test/resources/policyengine/gds/test_gds_policy_hive_row_filter.json
Outdated
Show resolved
Hide resolved
agents-common/src/test/resources/policyengine/gds/test_gds_policy_hive_data_mask.json
Outdated
Show resolved
Hide resolved
agents-common/src/test/resources/policyengine/gds/test_gds_policy_hive_data_mask.json
Outdated
Show resolved
Hide resolved
agents-common/src/test/resources/policyengine/gds/test_gds_policy_hive_data_mask.json
Outdated
Show resolved
Hide resolved
agents-common/src/test/resources/policyengine/gds/test_gds_policy_hive_access.json
Outdated
Show resolved
Hide resolved
…arching with DataSet Ids - Addressed review comment by copilot change set #2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
agents-common/src/test/resources/policyengine/gds/test_gds_policy_hive_access.json
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
What changes were proposed in this pull request?
Change is to add datasetIds in Audit Events so if DataShare name is changed, the audits for the DataShare access can be searched with DataSetId to have all the audits. Searching with DataShare name will result in having not all the audits if thte name is changed
How was this patch tested?
Tested in Local Vm. Test scripts enhanced to check on the response values.
