You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Felix-Gong (via GitHub)" <gi...@apache.org> on 2026/10/20 14:08:48 UTC

[I] [Bug] Proxy Admin authorization is skipped for methods missing from the permission map [rocketmq]

Felix-Gong opened a new issue, #11470:
URL: https://github.com/apache/rocketmq/issues/11470

   ### Search before asking
   
   I checked open and closed issues and PRs for `ProxyAdminAuthInterceptor`, `METHOD_PERMISSIONS`, `proxy.admin` authorization and unmapped admin methods. The nearby open work is different: #11362 / PR #11363 changes which address the ACL is evaluated against, and #11178 / PR #11179 refuses to start when authorization is enabled without authentication. Neither covers what happens to a method that has no entry in the permission map.
   
   ### What happened?
   
   `ProxyAdminAuthInterceptor` binds every admin RPC to a `proxy.admin.*` resource through the static `METHOD_PERMISSIONS` map. The authorization branch is guarded by `resourceAction != null`:
   
   ```java
   ResourceAction resourceAction = METHOD_PERMISSIONS.get(method);
   if (resourceAction != null && authzEnabled) {
       ... authorize against proxy.admin.<module> ...
   }
   return next.startCall(call, headers);   // unmapped methods land here
   ```
   
   A method with no entry skips authorization completely and is served. With cluster authorization on, every *mapped* method gets a real ACL decision, but an unmapped one runs with authentication only — and the same is true in `grpcAdminServerAuthEnable` fail-closed mode, which only checks that authentication and authorization are *enabled*, not that this method is covered by them.
   
   The admin server currently hosts only the `Admin` service and all 16 of its RPCs are mapped, so nothing is exploitable on develop today. But the surface grows from the rocketmq-apis side — the Admin service gained RPCs in three recent commits (#113, #115, #116) — and nothing cross-checks the proto against the map. The first future RPC merged without a hand-written entry becomes an authorization bypass by construction, including whatever mutation it introduces.
   
   ### Expected behavior
   
   When the cluster authorization switch is on, a served method that has no `proxy.admin.*` mapping should be refused (the class already documents fail-closed as its behavior mode) rather than served without a permission check. The map and the served surface should also be pinned against each other in tests, so adding an RPC without deciding its resource and action fails CI instead of shipping a silent hole.
   
   ### Runtime
   
   develop at 57c2dc0, JDK 11. Reproduced with the existing interceptor test harness — no broker or proxy required. On the current code, a call to an unmapped method name with `authorizationEnabled=true` reaches `next.startCall(...)`; the new test fails exactly there.
   


-- 
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 Admin authorization is skipped for methods missing from the permission map [rocketmq]

Posted by "Felix-Gong (via GitHub)" <gi...@apache.org>.
Felix-Gong commented on issue #11470:
URL: https://github.com/apache/rocketmq/issues/11470#issuecomment-6292838620

   PR: #11471


-- 
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


Re: [I] [Bug] Proxy Admin authorization is skipped for methods missing from the permission map [rocketmq]

Posted by "Felix-Gong (via GitHub)" <gi...@apache.org>.
Felix-Gong commented on issue #11470:
URL: https://github.com/apache/rocketmq/issues/11470#issuecomment-6292832269

   PR: #PLACEHOLDER


-- 
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


Re: [I] [Bug] Proxy Admin authorization is skipped for methods missing from the permission map [rocketmq]

Posted by "orangehedgehog3 (via GitHub) via commits" <co...@rocketmq.apache.org>.
orangehedgehog3 commented on issue #11470:
URL: https://github.com/apache/rocketmq/issues/11470#issuecomment-7136339725

   想问下 #11471 的方案是让未映射方法统一 fail-closed 返回 PERMISSION_DENIED,还是保留某种白名单配置?另外 rocketmq-apis 后续新增 Admin RPC 时,除了 descriptor 测试还有别的手段防止漏配吗?


-- 
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


Re: [I] [Bug] Proxy Admin authorization is skipped for methods missing from the permission map [rocketmq]

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

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported authorization bypass has been verified. When a method is missing from the `METHOD_PERMISSIONS` map in `ProxyAdminAuthInterceptor`, it bypasses authorization checks entirely and is served with only authentication. This is a security concern as the Admin service surface grows from rocketmq-apis.
   
   **Root Cause:** The authorization guard `if (resourceAction != null && authzEnabled)` allows unmapped methods to skip authorization.
   **Impact:** Proxy Admin authorization bypass for unmapped RPC methods
   **Severity:** High (security issue)
   
   Note: PR #11471 has been submitted by the issue author to address this.
   
   ---
   *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


Re: [I] [Bug] Proxy Admin authorization is skipped for methods missing from the permission map [rocketmq]

Posted by "rundood5 (via GitHub) via commits" <co...@rocketmq.apache.org>.
rundood5 commented on issue #11470:
URL: https://github.com/apache/rocketmq/issues/11470#issuecomment-7123937801

   I read through the interceptor while tracing the admin auth path, and the report matches the current
   code. On develop the relevant lines are:
   
   - `proxy/src/main/java/org/apache/rocketmq/proxy/grpc/admin/ProxyAdminAuthInterceptor.java:192` —
     `ResourceAction resourceAction = METHOD_PERMISSIONS.get(method);`
   - `:196` — `if (resourceAction != null && authzEnabled) { ... }`
   - `:265` — the same lookup, exposed for tests
   
   So an RPC whose method name is absent from `METHOD_PERMISSIONS` skips the authorization branch and
   reaches `next.startCall(...)` with authentication only, which contradicts the fail-closed mode the
   class documents.
   
   Two questions before settling on a fix:
   
   1. Is the map meant to be exhaustive by construction, or does "no entry" mean "no authorization
      required"? The answer decides whether unmapped methods should be rejected, or whether the map
      should be extended with an explicit entry.
   2. If fail-closed is the intent, a test that cross-checks the served `Admin` method descriptors
      against `METHOD_PERMISSIONS` would catch a future RPC being added without a mapping. That looks
      cheap to add next to the existing interceptor tests and protects against exactly the drift
      described here.
   
   Happy to help with that test if the direction is acceptable.


-- 
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