fix(docker): integrate Hubble with PD deployment - #3143
Open
imbajin wants to merge 10 commits into
Open
Conversation
- add Hubble to release and development Compose deployments - configure Server PD registration and shared token authentication - accept Bearer JWT for embedded Gremlin without extra auth calls - validate entrypoint and Compose contracts in CI
- merge current master without rewriting PR history - preserve Docker, JWT, and PD integration behavior - adapt entrypoint fixture to the new init marker contract
- preserve JWT secrets and reject malformed Bearer tokens - require explicit admin credentials and align PD discovery - validate entrypoint and rendered Compose contracts - document secure Hubble startup and health checks
- pass administrator passwords with option-safe printf - cover leading-dash credentials through the real init path - restrict shell-test workflow permissions to read-only - disable persisted checkout credentials for shell tests
- use registered Hubble bind options in Compose config - publish the UI to host loopback by default - verify semantic /about health responses - align CI assertions and deployment docs
- mark Dashboard as unconfigured in the Compose profile - prevent loopback probes from the mounted Hubble config - preserve the existing disabled integration UI state
- generate a protected Compose environment file once - reuse credentials across lifecycle commands - exclude local secrets from Git and Docker contexts
- reject 1.7.x for authenticated PD integration - require a matching local Hubble image for dev builds - keep release and dev lifecycle commands consistent
- reject explicit signing secrets shorter than 32 bytes - lock the 31/32-byte boundary with fail-closed fixtures - document idempotent validated secret persistence
- retrigger pull_request workflows after the Actions incident - preserve the reviewed source tree without file changes - collect complete CI evidence on the final PR head
MrJs133
approved these changes
Aug 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR integrates HugeGraph Hubble into the single-node PD Compose deployments and extends the Server-side Docker/auth stack to support a shared JWT Bearer token contract (while preserving Basic auth) for embedded Gremlin and REST.
Changes:
- Add Hubble to release + dev Docker Compose stacks and document the new single-node workflow and required
.envsecrets. - Enhance the server Docker entrypoint to configure PD registration/discovery settings, low-memory guard, and a shared/reused JWT token secret across REST + embedded Gremlin auth.
- Accept
Authorization: Bearer <token>for HTTP Gremlin requests with targeted unit-test coverage and CI validation for entrypoint + Compose contracts.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/auth/WsAndHttpBasicAuthHandlerTest.java | Adds Bearer-token HTTP Gremlin auth tests and tightens Bearer token rejection cases. |
| hugegraph-server/hugegraph-dist/docker/test/test-docker-entrypoint.sh | Updates the unit test harness to source the refactored entrypoint helpers. |
| hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh | Adds property encoding/reuse helpers and maps new PD/auth env vars into config; generates/reuses JWT token secret. |
| hugegraph-server/hugegraph-dist/docker/docker-entrypoint-test.sh | New script to validate entrypoint behavior (env mapping, secret reuse, escaping) in CI. |
| hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/WsAndHttpBasicAuthHandler.java | Adds Bearer parsing for HTTP Gremlin authorization while preserving Basic auth flow. |
| docker/README.md | Documents new single-node stacks (incl. Hubble), .env secret generation, and new env overrides. |
| docker/hugegraph-hubble.properties | New Hubble configuration for the Compose environment. |
| docker/docker-compose.yml | Adds Hubble service and makes Server/Hubble images + pull policy overridable; wires PD/auth env. |
| docker/docker-compose.dev.yml | Mirrors release Compose changes for dev builds; adds Hubble service and overrides. |
| .gitignore | Ignores docker/.env. |
| .github/workflows/server-ci.yml | Adds CI validation for entrypoint behavior and Compose rendering/contracts. |
| .dockerignore | Excludes /docker/.env from build contexts. |
Suppressed comments (1)
hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh:97
- This length check sets
LC_ALL=Cglobally, so the locale stays forced toCfor the remainder of the entrypoint. If the goal is only to ensure${#HG_SERVER_AUTH_TOKEN_SECRET}is counted in bytes, scopeLC_ALLto just the arithmetic evaluation instead of mutating global environment.
if [[ -n "${HG_SERVER_AUTH_TOKEN_SECRET:-}" ]]; then
LC_ALL=C
if (( ${#HG_SERVER_AUTH_TOKEN_SECRET} < 32 )); then
log "ERROR: HG_SERVER_AUTH_TOKEN_SECRET must be at least 32 bytes"
exit 1
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| local value="$1" encoded="" char | ||
| local i | ||
|
|
||
| LC_ALL=C |
zyxxoo
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Related PR
Verification