Skip to content

refactor(hubble): unify auth and permission modes - #758

Merged
imbajin merged 24 commits into
apache:masterfrom
hugegraph:cx/hubble-auth-redesign
Aug 30, 2026
Merged

imbajin merged 24 commits into
apache:masterfrom
hugegraph:cx/hubble-auth-redesign

Conversation

@imbajin

@imbajin imbajin commented Aug 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Hubble now uses one capability-driven connection and authorization model across standalone and PD deployments, while keeping older HugeGraph versions on explicit minimum-compatibility paths.

Before After
Authentication and connection behavior was inferred in multiple controllers and pages. The backend resolves Server/PD connectivity and publishes one verified capability contract to the UI.
GraphSpace permissions exposed low-level authorization objects and inconsistent account flows. Users work with four readable presets: super administrator, GraphSpace read-only, GraphSpace read-write, and GraphSpace administrator.
Distributed status mixed PD, Store, stale metrics, and node health, which could produce contradictory cards. Server, PD, and Store health are independent; ambiguous cluster-level signals appear only under Items needing attention.
CI depended on temporary Server PR overrides and did not run the complete React test suite. CI follows Server master dynamically and runs lint, i18n validation, all frontend Jest tests, backend tests, and the browser workflow.

Main changes

  • Unifies authenticated and anonymous client resolution without manufacturing empty-token administrator sessions.
  • Adds GraphSpace-scoped account and membership UX, multi-space assignment, permission enforcement, and guided recovery.
  • Adds the HugeGraph cluster topology, node health, source freshness, capacity facts, and 2 Server + 3 PD + 3 Store discovery.
  • Improves async result viewing, algorithm capability guidance, keyboard execution, navigation behavior, account feedback, and password re-login handling.
  • Centralizes compatibility checks, removes temporary CI/Server commit overrides, and adds current English product screenshots.

Compatibility

Server / PD generation Support level
Server 1.5.x standalone Minimum usability for core graph, schema, data, and Gremlin workflows only
Server 1.7.x with matching PD/Store Minimum usability through legacy REST/Gremlin and capability adapters
Server, PD, and Store 1.8.x or later Full and recommended Hubble experience

Use matching component minor versions. Server/PD >= 1.8 is strongly recommended; 1.5 and 1.7 compatibility does not imply current feature parity.

Runtime evidence

Hubble 2+3+3 cluster overview

  • Final head: 146f41151fefba7a120357aedba04ebabe033a43
  • Commit history reduced from 32 to 22 commits without changing the final Git tree
  • Local Hubble backend: 595 tests passed; Checkstyle passed
  • Local Hubble frontend: 161 suites / 1019 tests passed; lint, i18n, and production build passed
  • Distributed Chrome verification: 2 Server + 3 PD + 3 Store, all nodes UP; topology and Server/PD/Store summaries are consistent and independently attributed
  • Standalone Chrome verification: Server 1.7.0 + RocksDB; login, graph overview, g.V().count(), account management, node list, and node detail passed
  • Final latest image workflow: https://github.com/hugegraph/actions/actions/runs/33293143917
  • Open review threads at final audit: 0

Scope boundaries

  • Authentication remains cluster-wide; Hubble does not expose a per-GraphSpace authentication switch.
  • Kubernetes-dependent OLAP flows stay capability-gated when the required environment is unavailable.
  • Legacy 1.7 Basic Gremlin credential handling is session-scoped and cleared on logout, password change, login failure, or expiry; broader credential-storage redesign is intentionally outside this PR.
  • Cross-session credential invalidation and shared login throttling for a future multi-replica Hubble deployment remain explicit follow-up TODOs.

Follow-up TODO

The following work is intentionally outside this PR and should be handled in dedicated changes:

  • Refactor the Vermeer and graph-computing integration, including GraphSpace write authorization and matching frontend capability gates.
  • Refactor and implement Text2GQL.
  • Upgrade the frontend graph engine to a new major version.

- centralize server capability profiles in the client
- derive authenticated and anonymous modes from the backend
- expose readable GraphSpace permission presets
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request hubble hugegraph-hubble labels Aug 16, 2026
@github-actions github-actions Bot added the client hugegraph-client label Aug 16, 2026
@codecov

codecov Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.76138% with 635 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.90%. Comparing base (b066b80) to head (9322a30).
⚠️ Report is 218 commits behind head on master.

Files with missing lines Patch % Lines
...org/apache/hugegraph/service/auth/UserService.java 59.04% 77 Missing and 34 partials ⚠️
.../hugegraph/service/op/LiveOperationsCollector.java 72.24% 45 Missing and 13 partials ⚠️
.../hugegraph/service/auth/GraphSpaceUserService.java 80.82% 20 Missing and 31 partials ⚠️
.../hugegraph/controller/ingest/IngestController.java 31.34% 39 Missing and 7 partials ⚠️
...rvice/auth/StandaloneAccountPermissionService.java 63.63% 25 Missing and 15 partials ⚠️
...rg/apache/hugegraph/controller/BaseController.java 60.56% 20 Missing and 8 partials ⚠️
...che/hugegraph/service/space/GraphSpaceService.java 78.22% 14 Missing and 13 partials ⚠️
...graph/controller/algorithm/OltpAlgoController.java 0.00% 26 Missing ⚠️
...raph/controller/auth/GraphSpaceUserController.java 40.54% 18 Missing and 4 partials ⚠️
...ache/hugegraph/service/load/JobManagerService.java 0.00% 18 Missing ⚠️
... and 35 more
Additional details and impacted files
@@              Coverage Diff              @@
##             master     #758       +/-   ##
=============================================
- Coverage     62.49%   45.90%   -16.60%     
- Complexity     1903     4374     +2471     
=============================================
  Files           262      602      +340     
  Lines          9541    29342    +19801     
  Branches        886     3427     +2541     
=============================================
+ Hits           5963    13470     +7507     
- Misses         3190    14552    +11362     
- Partials        388     1320      +932     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- preserve member-manager compatibility
- align version and CI capability boundaries
- normalize PR-added source formatting
@imbajin
imbajin force-pushed the cx/hubble-auth-redesign branch from 018b53e to f31977a Compare August 16, 2026 09:22

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: yes. Summary: No additional actionable source-level finding was confirmed, but this PR is not approvable until the required review evidence and failing latest-head checks are resolved. Evidence: targeted Hubble authorization tests 72/72, frontend auth/route suites 90/90, and ServerCompatibilityTest 2/2; failed checks: hubble-ci (11, 3.11), codecov/patch, codecov/project.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Aug 17, 2026
- refine account and node surfaces
- propagate deployment authentication mode
- stabilize PD, Store, and standalone operations discovery
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Aug 17, 2026
- preserve analyst and administrator preset semantics
- scope graph and template operations
- align write controls and graph listing
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Aug 17, 2026
- upload coverage from real module paths
- cover permission update behavior
- normalize PD states and the 120-column contract
- enforce template ownership and pagination
- reset stale account and GraphSpace context
- separate account identities
- reject or roll back unsafe permission updates
- hide backend bootstrap details
- enforce direct and indirect GraphSpace scope
- isolate query records and account security updates
- retain non-auth verification evidence
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Aug 19, 2026
- support the scoped Basic Gremlin fallback
- require relogin after password changes
- detect anonymous mode and gate unsupported features
- fetch one exact Server revision in CI
@imbajin
imbajin force-pushed the cx/hubble-auth-redesign branch from 71e5fd9 to ebfb3fe Compare August 29, 2026 15:50
- simplify storage unit labels
- explain account assignment and PD health
- align reported Server capabilities
- improve task execution feedback
- gate scoped task actions
- retry unverified configuration
- initialize the Computer manager
- improve account access workflows
- polish navigation interactions and route refresh
- retry failed PD authentication probes
- align and summarize operations source status
- preserve authentication recovery flows
- periodically revalidate verified authentication mode
- test against the resolved Server master SHA
- preserve route state during configuration polling
- remove temporary review images
@imbajin
imbajin force-pushed the cx/hubble-auth-redesign branch 3 times, most recently from d1c66ad to a8a5bcf Compare August 29, 2026 16:26
- add live English screenshots for core workflows
- organize assets under one showcase directory
- add root and Hubble product tours
- retain credentials only for the 1.7 Basic fallback
- avoid plaintext passwords in modern token sessions
- cover modern and legacy login behavior
- keep the integration baseline on Apache master
- fetch and cache one exact commit
- remove redundant version and fork overrides
- assert PD token login keeps no plaintext password
- cover both password session attributes
- preserve token validation checks
- render Vermeer independently of Computer capability
- retain Computer environment gating
- remove the misleading unavailable alert
- derive PD health from PD nodes only
- reconcile Store direct probes with topology
- keep source summaries, facts, and cards consistent
- add a live English Operations screenshot
- show healthy PD and Store tiers
- expose aligned topology, facts, and summaries
@imbajin
imbajin force-pushed the cx/hubble-auth-redesign branch 3 times, most recently from f45beda to 0bf41c6 Compare August 29, 2026 17:39
- clear account identity when entering anonymous mode
- mark deadline-cancelled Stores down
- cover storage cleanup and fanout cancellation
@imbajin
imbajin force-pushed the cx/hubble-auth-redesign branch 8 times, most recently from 488fd71 to 0f7f87d Compare August 30, 2026 04:27
- unify responsive operations, GraphSpace, and node-detail states
- preserve independent Server, PD, and Store health ownership
- close account, session, capability, and compatibility gaps
- refresh final documentation and cluster screenshot
@imbajin
imbajin force-pushed the cx/hubble-auth-redesign branch from 0f7f87d to 146f411 Compare August 30, 2026 04:37
- assign one shared read-write role to standalone accounts
- keep legacy account labels aligned with actual membership
- hide GraphSpace-only resource details in standalone mode
- cover rollback, batch creation, and account rendering
- set an explicit empty URL for HugeGraph 1.7 target creation
- preserve the shared standalone read-write permission model
- cover target URL compatibility in the service test
@imbajin
imbajin merged commit 451abb1 into apache:master Aug 30, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client hugegraph-client enhancement New feature or request hubble hugegraph-hubble size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants