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

   ## Purpose
   
   Provide the minimal Server/PD compatibility and security boundaries required 
by Hubble native
   monitoring and GraphSpace-scoped administration. The matching Hubble product 
work is tracked in
   
[hugegraph/hugegraph-toolchain#19](https://github.com/hugegraph/hugegraph-toolchain/pull/19).
   
   This upstream PR reuses the same branch and exact head as
   [hugegraph/hugegraph#161](https://github.com/hugegraph/hugegraph/pull/161); 
no duplicate implementation
   branch is introduced.
   
   ## Changes
   
   ### PD and Store monitoring compatibility
   
   - Exclude `PDConfig.secretKey` from generated config/log output without 
changing internal
     authentication access.
   - Add `StoreStatistics.restAddress`, derived from the registered Store host 
and validated
     `rest.port`, with IPv4, hostname, bracketed IPv6, and compatible fallback 
handling.
   - Share REST-address construction through `hg-pd-common` so discovery and 
API output use one
     bounded implementation.
   - Propagate only explicitly configured graph cache/buffer limits into PD 
graph configs, preserving
     caller/PD values and avoiding an implicit production sizing policy.
   
   ### Server authentication compatibility
   
   - Allow Gremlin HTTP to authenticate with an existing Server Bearer token so 
Hubble can execute
     queries without retaining the user's password.
   - Preserve the authenticated identity in channel state for downstream 
authorization.
   - Parse HTTP Basic credentials with standard Base64 and split decoded 
credentials at the first
     colon, supporting standards-compliant values and passwords containing `:`.
   - Reject empty or unsupported authorization schemes and remove Bearer token 
values from auth error
     logs.
   
   ### GraphSpace-scoped authorization metadata
   
   - Add GraphSpace ownership/context to groups, targets, belongs, and accesses 
while preserving
     legacy metadata compatibility and schema upgrade behavior.
   - Add scoped group APIs and `AuthManager` overloads used by Hubble's 
`SPACEADMIN` management flow.
   - Validate source groups and targets before creating scoped access, 
preventing cross-GraphSpace
     references and IDOR with zero mutation on rejection.
   - Keep generated/default auth metadata outside Hubble's editable business 
surface and isolate the
     legacy target-schema upgrade fixture from shared test order.
   
   ## Scope
   
   This PR is limited to compatibility, secret redaction, standards-correct 
HTTP authentication, and
   GraphSpace-scoped metadata enforcement. It does not add alerting, 
notifications, a new token
   issuer, a PD/Store authentication redesign, or a production capacity policy.
   
   ## Verification — head `5b082f8da`
   
   - Focused authentication, identity propagation, scoped authorization, and 
credential-log tests:
     **22/22 passed**.
   - The affected 26-module Server reactor, Checkstyle, license, package, and 
distribution gates passed.
   - Fresh, proxy-free RocksDB and HStore stacks both verified REST Bearer, 
Gremlin Bearer, and
     Gremlin Basic authentication with successful responses.
   - The matching Hubble flow verified successful/repeated queries, sanitized 
failure handling,
     recovery, and session persistence in a real Chrome session.
   - Independent read-only review and re-review found no unresolved Critical or 
Important issue.
   - The fork PR currently has 17 successful checks. Its remaining 
`cluster-test` failure matches an
     existing MiniCluster false-readiness/connection-refused signature and is 
tracked independently;
     no unrelated CI harness change is bundled here.
   


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