influxdata / influxdata/influxdb-client-java

Java client library: finfluxdb client | influx HTTP status code: 401; Message: Unauthorized access.

Open
#522 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Java
Stars
477
Forks
129
PR merge metrics
No merged PRs in 30d

Description

Java client library: influxdb client
https://github.com/influxdata/influxdb-client-java

Builder builder = InfluxDBClientOptions.builder();
builder.url(serverUrl);
if (!token.isEmpty()) {
builder.authenticateToken(token.toCharArray()); // 1.
} else {
builder.authenticate(username, password.toCharArray()); // 2.
}
builder.bucket(bucketName);
builder.org(organization);
InfluxDBClientOptions options = builder.build();

1) the connection via builder.authenticateToken(token.toCharArray()); works.
2) If the connection is made via builder.authenticate(username, password.toCharArray()); --> error message
influx HTTP status code: 401; message: Unauthorized access

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names no repository file or test; start at InfluxDBClientOptions.builder() and compare authenticateToken(token.toCharArray()) with authenticate(username, password.toCharArray()). Reproduce both connection paths against the reported server setup, then confirm the username/password path no longer returns HTTP 401 and add coverage if the relevant test location is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.