looksaw2 opened a new issue, #759: URL: https://github.com/apache/hugegraph-toolchain/issues/759
### Bug Type (问题类型) rest-api (结果不合预期) ### Before submit - [x] I had searched in the [issues](https://github.com/apache/hugegraph-toolchain/issues) and found no similar issues. ### 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: be7ef3ae - 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 1. Start HugeGraph Server 1.5.0 with `StandardAuthenticator` enabled. 2. Confirm `GET /versions` reports Core 1.5.0. 3. Confirm the test credentials are accepted by `GET /graphs/hugegraph/auth/users?name=<user>`. 4. Create a current pre-fix `HugeClient` for `DEFAULT / hugegraph`. 5. Call `client.auth().getUser(<existing-user>)`. 6. 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 <img width="1418" height="768" alt="Hubble login page before compatibility fix" src="https://github.com/user-attachments/assets/e0524ed9-bb79-4abb-ab30-36dbc70580fd" /> ### Step 2: Enter credentials already verified against the Server 1.5 graph-scoped auth endpoint <img width="1418" height="768" alt="Verified local credentials entered with password masked" src="https://github.com/user-attachments/assets/ca615956-60a5-4a35-9107-60deb100fe6a" /> ### Step 3: Submit the login form <img width="1418" height="768" alt="Hubble login request fails against Server 1.5" src="https://github.com/user-attachments/assets/1c36cf6d-0151-4160-823b-5875fa595846" /> ## 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 (问题点 / 边数据举例) ```javascript N/A — this issue is not dependent on vertex or edge data. ``` ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构) ```javascript N/A — this issue is caused by authentication endpoint compatibility, not graph schema. ``` -- 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]
