Aias00 opened a new issue, #10709: URL: https://github.com/apache/rocketmq/issues/10709
### Before Creating the Bug Report - [x] I found a bug, not just asking a question, which should be created in GitHub Issues. - [x] I have searched the existing issues and believe this is not a duplicate. - [x] I have confirmed that this bug belongs to the current repository. ### Describe the Bug `ProxyAuthenticationMetadataProvider` and `ProxyAuthorizationMetadataProvider` implement async metadata provider interfaces, but several unsupported methods currently return `null` instead of a `CompletableFuture`. Examples: - `ProxyAuthenticationMetadataProvider#createUser` - `ProxyAuthenticationMetadataProvider#deleteUser` - `ProxyAuthenticationMetadataProvider#updateUser` - `ProxyAuthenticationMetadataProvider#listUser` - `ProxyAuthorizationMetadataProvider#createAcl` - `ProxyAuthorizationMetadataProvider#deleteAcl` - `ProxyAuthorizationMetadataProvider#updateAcl` - `ProxyAuthorizationMetadataProvider#listAcl` Returning `null` from an async provider is unsafe because callers naturally treat these methods as returning a `CompletableFuture`. That can turn an unsupported operation into a `NullPointerException`, hiding the real capability gap and making Proxy ACL diagnostics harder. ### Expected Behavior Unsupported mutation/list operations should never return `null`. They should either: 1. delegate to the underlying metadata service if the operation is supported; or 2. return a failed `CompletableFuture` with a clear `UnsupportedOperationException` / diagnostic message. The existing read paths (`getUser`, `getAcl`) should keep their current behavior. ### Scope RocketMQ Studio Track 2 / Proxy Admin authentication and authorization foundation. This also improves the AUTH-01 call-chain behavior expected by Control Plane integrations. ### Proposed Fix Return failed futures for currently unsupported operations, with method-specific messages. Add unit tests to assert every unsupported method returns a non-null future that completes exceptionally instead of returning `null`. -- 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]
