lasdf1234 opened a new pull request, #14735:
URL: https://github.com/apache/gravitino/pull/14735
### What changes were proposed in this pull request?
Clean cherry-pick of #14693 (`a9b281254`) onto `branch-1.3`, replacing the
conflicted auto cherry-pick #14733.
- Add `IdpUserGroupEventDispatcher` and typed IdP user/group listener events
(`basic.user.<name>` / `basic.group.<name>`).
- Inject the dispatcher from `IdpBasicBinder` into IdP user/group REST
resources so mutations suppress the `HttpRequestEvent` /
`HttpRequestFailureEvent` fallback.
- Align null JSON body handling with metalake REST style.
- Add `OperationType.ALTER_USER` / `ALTER_GROUP` on `branch-1.3` for
password-change and membership audit events.
**branch-1.3 adaptations** (API surface differs from main):
- Keep `addUser(username, password)` / `addGroup(groupName)` (no enabled
flag / group comment).
- Do not backport `PUT /api/idp/users/{user}/enabled` or `ENABLE_USER` /
`DISABLE_USER`.
### Why are the changes needed?
Successful built-in IdP mutations fell back to `HttpRequestEvent` with
`UNKNOWN` and a null object identifier. Metalake user/group APIs already emit
typed events; IdP should do the same.
Fixes #14692
### Does this PR introduce _any_ user-facing change?
Yes. Audit log entries for built-in IdP mutations now use typed
`OperationType` values (`ADD_USER`, `REMOVE_USER`, `ALTER_USER`, `ADD_GROUP`,
`REMOVE_GROUP`, `ALTER_GROUP`) and name the object as `basic.user.<name>` /
`basic.group.<name>`.
### How was this patch tested?
- `./gradlew :plugins:idp-basic:test -PskipITs --tests
org.apache.gravitino.idp.listener.TestIdpUserGroupEventDispatcher --tests
org.apache.gravitino.idp.web.rest.TestIdpOperations`
Made with [Cursor](https://cursor.com)
--
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]