arnabnandy7 opened a new pull request, #1160:
URL: https://github.com/apache/ranger/pull/1160

   ## What changes were proposed in this pull request?
   
   This pull request fixes RANGER-5595 by generating audit results for role 
grant and revoke operations when a non-null `RangerAccessResultProcessor` is 
provided.
   
   The changes:
   
   - Add audit processing to `RangerBasePlugin#grantRole()` and 
`RangerBasePlugin#revokeRole()`.
   - Generate audit results for both successful and failed operations.
   - Preserve the existing role audit semantics and request metadata.
   - Remove the Hive authorizer’s manual role audit generation to prevent 
duplicate audit events.
   - Add focused unit tests covering successful role grants and failed role 
revocations.
   
   ## How was this patch tested?
   
   The focused unit tests for role grant and revoke auditing were run with:
   
   ```bash
   mvn -pl agents-common -DskipTests=false -Dtest=TestRangerBasePluginRoleAudit 
test
   ```
   
   Results:
   
   ```text
   Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
   BUILD SUCCESS
   ```
   
   The tests verify:
   
   - Audit result generation for a successful role grant.
   - Denied audit result generation for a failed role revocation.
   - Audit action, access type, global resource, and failure policy ID values.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to