Bug Type (问题类型)
rest-api (结果不合预期)
Before submit
Environment (环境信息)
- HugeGraph Server: 1.5.0 (Core 1.5.0, REST API 0.71.0.0)
- Reproduction Hubble/Toolchain baseline: 60df3c51 (before the compatibility changes)
- Current upstream PR target: be7ef3a
- Authentication: StandardAuthenticator enabled
- Deployment: standalone, DEFAULT / hugegraph
- OS: macOS
- Browser: Google Chrome
- Data size: not data-dependent
Expected & Actual behavior (期望与实际表现)
When the current Java Client connects to an authentication-enabled HugeGraph Server 1.5, AuthManager creates UserAPI with the GraphSpace-scoped path. Because Server 1.5 does not support GraphSpace, RestClient removes the graphspaces/DEFAULT/ prefix and sends the request to /auth/users. Server 1.5 instead requires /graphs/{graph}/auth/users, and that legacy endpoint returns a users wrapper.
As a result, user lookup fails even when the supplied Basic credentials are valid. The Hubble screenshots below show the broader user-visible login symptom; this issue is intentionally scoped to the Java Client UserAPI path and response handling. Full Hubble login compatibility should be handled separately.
Steps to reproduce
- Start HugeGraph Server 1.5.0 with
StandardAuthenticator enabled.
- Confirm
GET /versions reports Core 1.5.0.
- Confirm the test credentials are accepted by
GET /graphs/hugegraph/auth/users?name=<user>.
- Create a current pre-fix
HugeClient for DEFAULT / hugegraph.
- Call
client.auth().getUser(<existing-user>).
- Observe that the client falls back to
/auth/users instead of /graphs/hugegraph/auth/users, so the lookup fails.
Before evidence
Step 1: Open the Hubble login page
Step 2: Enter credentials already verified against the Server 1.5 graph-scoped auth endpoint
Step 3: Submit the login form
Actual behavior
The legacy server request is routed to the unscoped /auth/users endpoint and user lookup fails. In Hubble this surfaces as Request failed: Failed to login HugeGraph Server.
Expected behavior
When GraphSpace is unsupported and a graph name is available, UserAPI should use /graphs/{graph}/auth/users and read the legacy users response wrapper. The existing GraphSpace-scoped behavior for modern servers should remain unchanged.
Proposed focused fix
- Add a graph-aware legacy auth path in the Java Client.
- Use it only when GraphSpace is unsupported and a graph name is present.
- Parse the Server 1.5
users wrapper in UserAPI.getByName().
- Add regression tests for both legacy and modern paths.
Vertex/Edge example (问题点 / 边数据举例)
N/A — this issue is not dependent on vertex or edge data.
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
N/A — this issue is caused by authentication endpoint compatibility, not graph schema.
Bug Type (问题类型)
rest-api (结果不合预期)
Before submit
Environment (环境信息)
Expected & Actual behavior (期望与实际表现)
When the current Java Client connects to an authentication-enabled HugeGraph Server 1.5,
AuthManagercreatesUserAPIwith the GraphSpace-scoped path. Because Server 1.5 does not support GraphSpace,RestClientremoves thegraphspaces/DEFAULT/prefix and sends the request to/auth/users. Server 1.5 instead requires/graphs/{graph}/auth/users, and that legacy endpoint returns auserswrapper.As a result, user lookup fails even when the supplied Basic credentials are valid. The Hubble screenshots below show the broader user-visible login symptom; this issue is intentionally scoped to the Java Client
UserAPIpath and response handling. Full Hubble login compatibility should be handled separately.Steps to reproduce
StandardAuthenticatorenabled.GET /versionsreports Core 1.5.0.GET /graphs/hugegraph/auth/users?name=<user>.HugeClientforDEFAULT / hugegraph.client.auth().getUser(<existing-user>)./auth/usersinstead of/graphs/hugegraph/auth/users, so the lookup fails.Before evidence
Step 1: Open the Hubble login page
Step 2: Enter credentials already verified against the Server 1.5 graph-scoped auth endpoint
Step 3: Submit the login form
Actual behavior
The legacy server request is routed to the unscoped
/auth/usersendpoint and user lookup fails. In Hubble this surfaces asRequest failed: Failed to login HugeGraph Server.Expected behavior
When GraphSpace is unsupported and a graph name is available,
UserAPIshould use/graphs/{graph}/auth/usersand read the legacyusersresponse wrapper. The existing GraphSpace-scoped behavior for modern servers should remain unchanged.Proposed focused fix
userswrapper inUserAPI.getByName().Vertex/Edge example (问题点 / 边数据举例)
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)