Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWT Authorization Header Causes 400 #172

Open
refringe opened this issue Dec 4, 2024 · 0 comments
Open

JWT Authorization Header Causes 400 #172

refringe opened this issue Dec 4, 2024 · 0 comments

Comments

@refringe
Copy link

refringe commented Dec 4, 2024

When I add an authorization header which includes a JWT token to the repository configuration:

git config http.https://lfs.sp-tarkov.com/sp-tarkov/.extraheader "Authorization: Bearer TOKEN"

I would expect the requests to be authorized based on the token provided.

It seams the PUT requests are received with two authorization headers, which ends up being interpreted as a "Bad Request", error 400.

> PUT /sp-tarkov/server/objects/storage/4072225a6cbf17ff1fbe30af5197627ab9316d0f1412a465203d5c839e121475 HTTP/1.1
> Host: lfs.sp-tarkov.com
> Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImdpZnRsZXNzLWludGVybmFsLWp3dC1rZXkifQ.eyJleHAiOjE3MzMyODc1NDIsImlhdCI6MTczMzI4NzQ4MiwibmJmIjoxNzMzMjg3NDgyLCJzdWIiOiJyZWZyaW5nZSIsIm5hbWUiOiJyZWZyaW5nZSIsInNjb3BlcyI6Im9iajpzcC10YXJrb3Yvc2VydmVyLzQwNzIyMjVhNmNiZjE3ZmYxZmJlMzBhZjUxOTc2MjdhYjkzMTZkMGYxNDEyYTQ2NTIwM2Q1YzgzOWUxMjE0NzU6d3JpdGUifQ.BIQimoboa9wwRwlYHdCeMp5qfzwIahE-6rXSo7T_cBg
> Authorization: Bearer TOKEN
> Content-Length: 12615
> Content-Type: text/plain; charset=utf-8
> User-Agent: git-lfs/3.5.1 (GitHub; darwin arm64; go 1.22.1)
> 
{
  "Enabled": false,
  [...]
}
23:44:42.925961 trace git-lfs: HTTP: 400

< HTTP/2.0 400 Bad Request
< Content-Length: 150
< Content-Type: text/html
< Date: Wed, 04 Dec 2024 04:44:42 GMT
< Server: nginx

The first token seams to be an internal token.

Between this issue and #170, I'm not sure how to get simple JWT authentication working at the moment.

On the latest docker image:
https://hub.docker.com/r/datopian/giftless/tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant