Skip to content

[Bug] Hubble: Data Import fails with "Invalid Token" when StandardAuthenticator is enabled #2978

@roshan-Kawale

Description

@roshan-Kawale

Description

When attempting to import CSV data via the Hubble UI (v1.7.0), the import task fails if authentication is enabled on the server. The same import works perfectly fine if StandardAuthenticator is disabled.

Expected Behavior

  1. Successful Ingestion: Large data imports (CSV/JSON) via the Hubble UI should complete successfully when Hubble is connected with valid credentials.
  2. Token Persistence: The authentication token (JWT) should be correctly maintained and propagated throughout the entire lifecycle of the import task.
  3. Session Stability: The task should not be interrupted by internal session mismatches or random key generation if the server has not restarted.

Actual Behavior

  1. Task Failure: Data import aborts partway through with a generic "Failed" status in the Hubble UI.
  2. Unauthorized Access: Server audit logs report frequent 401 Unauthorized errors with the message jakarta.ws.rs.NotAuthorizedException: Invalid token for the admin user, even when the initial connection was valid.
  3. Successful without Auth: Disabling the authenticator and removing the PASSWORD environment variable allows the same data files to be imported perfectly.

Observed Error (Audit Log Snippet)

2026-03-26 07:44:50 - Failed to verify token: [ admin ], cause:
jakarta.ws.rs.NotAuthorizedException: Invalid token
	at org.apache.hugegraph.auth.TokenGenerator.verify(TokenGenerator.java:69)
	at org.apache.hugegraph.auth.StandardAuthManager.validateUser(StandardAuthManager.java:702)

Steps to Reproduce

  1. Start HugeGraph-Server v1.7.0 with auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator.
  2. Access Hubble UI v1.7.0 and connect to the graph using the admin account.
  3. Navigate to "Data Import" and upload a CSV file with corresponding mapping.
  4. Execute the import task and observe the failure and server logs.

Environment (环境信息)

HugeGraph-Server Version: 1.7.0
HugeGraph-Hubble Version: 1.7.0
Deployment: Docker Compose
Authenticator: org.apache.hugegraph.auth.StandardAuthenticator

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions