Skip to content

fix(client): support graph-scoped legacy user auth paths - #760

Open
looksaw2 wants to merge 1 commit into
apache:masterfrom
hugegraph:codex/client-legacy-user-auth
Open

fix(client): support graph-scoped legacy user auth paths#760
looksaw2 wants to merge 1 commit into
apache:masterfrom
hugegraph:codex/client-legacy-user-auth

Conversation

@looksaw2

@looksaw2 looksaw2 commented Aug 23, 2026

Copy link
Copy Markdown

Summary

  • use graphs/{graph}/auth/users when the server does not support GraphSpace;
  • request all legacy users with limit=-1, then find the exact username in the Server 1.5 users wrapper;
  • preserve the existing GraphSpace-scoped path and name query for modern servers;
  • add regression coverage for the legacy path, a target user after the default first 100 records, and the unchanged modern path.

Environment and reproduction

  • HugeGraph Server: 1.5.0, Core 1.5.0, REST API 0.71.0.0
  • Authentication: StandardAuthenticator
  • Context: DEFAULT / hugegraph
  • PR base: apache/hugegraph-toolchain@be7ef3ae
  • OS: macOS

The full Before flow and three step-by-step screenshots are recorded in #759.

After verification

  1. Real Server 1.5 contract:
    • GET /graphs/hugegraph/auth/users?limit=-1 -> HTTP 200
    • GET /auth/users?limit=-1 -> HTTP 404
    • response wrapper -> users
  2. Patched Java Client against the real Server 1.5 runtime:
    • client.auth().getUserByName("admin") -> user=admin success=true
  3. Regression suite:
    • 63 tests, 0 failures, 0 errors
    • 0 Checkstyle violations

Step 1: verify the real Server 1.5 contract

Server 1.5 legacy auth contract

Step 2: run the patched Java Client against Server 1.5

Patched client user lookup succeeds

Step 3: run focused and unit regression tests

Client regression tests pass

Tests

cd hugegraph-client
mvn test -Dtest=AuthApiPathTest,UnitTestSuite \
  -Dmaven.javadoc.skip=true -ntp

Fixes #759

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. client hugegraph-client labels Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client hugegraph-client size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Client UserAPI falls back to an incompatible auth path on Server 1.5

1 participant