Repository navigation
Conversation
- Scope the property exception to the actual gRPC allocator call. - Retain restrictions on direct Gremlin system-property access. - Cover both worker types and script denials with real gRPC tests. Refs apache#3412
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3413 +/- ##
============================================
- Coverage 57.27% 57.27% -0.01%
- Complexity 6577 6947 +370
============================================
Files 776 776
Lines 68881 68876 -5
Branches 9431 9431
============================================
- Hits 39449 39446 -3
Misses 25804 25804
+ Partials 3628 3626 -2
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bitflicker64
left a comment
There was a problem hiding this comment.
Blocking: no. Score: 9/10. Summary: the exemption matches the per-call useCustomAllocator read in shaded gRPC 1.55.3 Utils.getByteBufAllocator, and a reconnect from a Gremlin thread under HugeSecurityManager fails on master and reaches READY at this head, while direct script reads stay denied.
imbajin
left a comment
There was a problem hiding this comment.
Blocking: no. Summary: The property exception matches the shaded gRPC allocator's per-call read and retains the direct-script property restrictions. No actionable issues found. Evidence: Three independent source reviews; gRPC 1.55.3 bytecode inspection; exact-head Java 17 CI confirms all seven allocator regression tests and the existing security test pass without skips. Full distributed HStore transport acceptance was not rerun. Codecov project and patch failures remain non-blocking quality signals. Score: 8.6/10.
- Replace internal gRPC stack matching with an exact property whitelist. - Permit direct flag reads while retaining other property restrictions. - Update real gRPC regressions and the runtime policy documentation. Refs apache#3412
bitflicker64
left a comment
There was a problem hiding this comment.
Blocking: no. Score: 9/10. Summary: the exact whitelist entry matches the per-call System.getProperty in shaded gRPC Utils.getByteBufAllocator, and the shaded NettyChannelProvider wins provider selection over the unshaded jar on the server classpath. Other property reads and System.getProperties() stay denied, and the 7 new tests run and pass in exact-head CI.
imbajin
left a comment
There was a problem hiding this comment.
Blocking: no. Summary: The exact allocator-property whitelist resolves the repeated gRPC property read while preserving restrictions on unrelated properties and enumeration. No actionable issues found. Evidence: Three independent source reviews and gRPC 1.55.3 bytecode inspection; exact-head Java 17 CI confirms all seven allocator regressions and the existing security test pass without skips. Full distributed HStore integration was not rerun. Score: 8.8/10.
Automated review summary: score 10/10, no confirmed introduced defectsReviewed head: What changed: one exact key, Evidence:
Not covered by this PR, and not counted against it:
Both behave the same at base and at head, and neither was shown to be reachable on the normal HStore path, where the PD client creates its channels outside Gremlin. Limits: no reviewer ran a live HStore/PD cluster or an end-to-end Gremlin-over-HTTP reproduction. The evidence above is component-level only. |
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:HugeSecurityManagerrejects 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
GremlinGroovyScriptEngine.eval(), and JVM security manager. Cover both Gremlin/task workers, heap/direct allocators, permitted direct flag reads, denied sensitive and unrelated/prefix-matched property reads, denied enumeration, and denied sensitive reads after an allowed allocator call.docs/server-runtime.md.Verifying these changes
Validated on Temurin 17.0.20.1, macOS aarch64, against master
f04d5cc8fc2fbd849d6aeef3f111e717a1f8f90dand itsgrpc-netty-shaded1.55.3 dependency: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?
Documentation Status
Doc - TODO: required documentation is pending; complete it before merging.Doc - Done: the property-read policy is documented in this PR.Doc - No Need: no user-visible documentation is affected.Documentation files in this PR or paired hugegraph-doc PR:
docs/server-runtime.md, "HStore transport configuration".