roryqi opened a new pull request, #12886:
URL: https://github.com/apache/gravitino/pull/12886
### What changes were proposed in this pull request?
Add the affected role names to the audit `customInfo` for:
- `GRANT_USER_ROLES`
- `REVOKE_USER_ROLES`
- `GRANT_GROUP_ROLES`
- `REVOKE_GROUP_ROLES`
Both successful and failed operations now record `roleNames`. A shared
helper keeps the audit field formatting consistent.
### Why are the changes needed?
Role assignment audit entries currently identify the user or group but omit
the roles that were granted or revoked. This prevents access reviews from
reconstructing which permissions were changed.
Fix: #12885
### Does this PR introduce _any_ user-facing change?
Yes. Role assignment audit entries now include the affected roles in
`customInfo`, for example:
`{roleNames=reader,admin}`
### How was this patch tested?
- `./gradlew :core:spotlessApply`
- `./gradlew :core:test --tests
org.apache.gravitino.listener.api.event.TestUserEvent --tests
org.apache.gravitino.listener.api.event.TestGroupEvent --tests
org.apache.gravitino.audit.v2.TestSimpleAuditLogV2`
--
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]