influxdata / influxdata/influxdb

Always getting {"error":"signature is invalid"} when using jwt authentication

Open
#16,007 2 comments 0 reactions 0 assignees View on GitHub
1.x
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Hi,

My current influxdb version is 1.1.1. I wanted to enable the authentications for http requests. I did all the configuration changes in the /etc/influx/influx.conf file. If I am using username and password for authentication, everything works fine.

But I wnt to enable JWT authentication for the same. So enabled the shared-secret configuration in the file. Then I used third party sites to create token for verifying the authentication.
Header to create JWT:
{
"alg": "HS256",
"typ": "JWT"
}

I used payload below:
{
"username": "admin",
"exp": 1576239022
}

and to verify, I gave my secret key. I used https://jwt.io/ to create token.
And I tried in command line. but always I am getting signature is invalid.
What I m doing wrong here?

Thanks.

Contributor guide

Open the contributing guide

Research direction

Start with the JWT authentication settings in /etc/influx/influx.conf and the token-generation details in the issue, then reproduce the failure from the command line using the reported InfluxDB 1.1.1 setup. Done means identifying why the generated token is rejected and documenting or implementing a verified authentication path.

Written by the indexing model from the issue text.

Assessment

Domain
authentication, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.