You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/07/31 06:43:05 UTC

[I] [Bug] Proxy ACL metadata providers return null futures for unsupported mutations [rocketmq]

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: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Proxy ACL metadata providers return null futures for unsupported mutations [rocketmq]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #10709:
URL: https://github.com/apache/rocketmq/issues/10709#issuecomment-5140737209

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase.
   
   **Root Cause:** Both `ProxyAuthenticationMetadataProvider` and `ProxyAuthorizationMetadataProvider` return `null` from async interface methods:
   - `createUser`, `deleteUser`, `updateUser`, `listUser` → `return null;`
   - `createAcl`, `deleteAcl`, `updateAcl`, `listAcl` → `return null;`
   
   Callers treating these as `CompletableFuture` returns will hit `NullPointerException` instead of a clear `UnsupportedOperationException`.
   
   **Impact:** Proxy ACL diagnostics — unsupported operations produce misleading NPEs instead of clear diagnostic failures.
   **Severity:** Medium (can cause NPE in ACL control plane paths)
   
   An automated fix proposal can be generated. Reply `/approve` to proceed with PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org