contrueCT opened a new pull request, #3413:
URL: https://github.com/apache/hugegraph/pull/3413

   ## Purpose of the PR
   
   Fixes #3412.
   
   A Gremlin read against HStore can fail while a new gRPC transport reads 
`io.grpc.netty.shaded.io.grpc.netty.useCustomAllocator`: `HugeSecurityManager` 
rejects the internal read, causing a channel panic and HTTP 500. The read 
happens on every allocator invocation, so startup warm-up does not prevent 
later failures.
   
   ## Main Changes
   
   - Permit this exact property only when the actual shaded gRPC 
`Utils.getByteBufAllocator` method is on the stack. Retain the existing 
security manager and direct-script property restrictions.
   - Add regression tests using the real gRPC dependency, 
`GremlinGroovyScriptEngine.eval()`, and JVM security manager. Cover both 
Gremlin/task workers, heap/direct allocators, denied direct and unrelated 
property reads, denied enumeration, and denied script reads after an allowed 
allocator call.
   
   ## Verifying these changes
   
   - [ ] Trivial rework / code cleanup without any test coverage. (No Need)
   - [ ] Already covered by existing tests.
   - [x] Need tests and can be verified as follows:
   
   Validated on Temurin 17.0.20.1, macOS aarch64, against master 
`f04d5cc8fc2fbd849d6aeef3f111e717a1f8f90d` and its `grpc-netty-shaded` 1.55.3 
dependency:
   
   ```bash
   mvn editorconfig:format
   mvn clean compile -Dmaven.javadoc.skip=true
   mvn test -pl hugegraph-server/hugegraph-core -am \
     '-Dtest=HugeSecurityManager*Test' \
     -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false \
     -DskipCommonsTests=true -Dmaven.javadoc.skip=true
   ```
   
   Formatting and all-module clean compilation passed. Before the fix, both 
allocator worker tests reproduce the exact property rejection on unmodified 
master. After the fix, all 8 tests pass with no skips (7 new regressions and 
the existing whitelist test).
   
   The focused tests create no network connections and start no database 
services. Full distributed HStore integration remains to be validated; these 
results are component regression evidence.
   
   ## Does this PR potentially affect the following parts?
   
   - [ ] Dependencies
   - [ ] Modify configurations
   - [ ] The public API
   - [x] Other affects: internal sandbox compatibility for HStore gRPC 
transport setup.
   - [ ] Nope
   
   ## Documentation Status
   
   - [ ] `Doc - TODO`: required documentation is pending; complete it before 
merging.
   - [ ] `Doc - Done`: documentation is included here or linked below.
   - [x] `Doc - No Need`: internal compatibility fix with no new API or 
configuration.
   
   Documentation files in this PR or paired hugegraph-doc PR:
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to