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

Headscale logs bearer tokens #1259

Closed
apollo13 opened this issue Mar 11, 2023 · 13 comments · Fixed by #1640
Closed

Headscale logs bearer tokens #1259

apollo13 opened this issue Mar 11, 2023 · 13 comments · Fixed by #1640
Labels
bug Something isn't working
Milestone

Comments

@apollo13
Copy link

Bug description

Looking at the headscale logs, it logs this at info level when accessing the HTTP api:

2023-03-11T21:13:56Z INF unary dur=0.815623 md={":authority":"/var/run/headscale.sock","authorization":"Bearer XXX.XXX","content-type":"application/grpc","grpcgateway-accept":"*/*","grpcgateway-authorization":"Bearer XXX.XXX","grpcgateway-user-agent":"python-httpx/0.23.3","user-agent":"grpc-go/1.51.0","x-forwarded-for":"xxxxx","x-forwarded-host":"xxxxxx"} method=ListApiKeys req={} service=headscale.v1.HeadscaleService

This includes the whole bearer token. It would be great if the credentials wouldn't get logged :)

@apollo13 apollo13 added the bug Something isn't working label Mar 11, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open for 180 days with no activity.

@github-actions github-actions bot added the stale label Sep 26, 2023
@apollo13
Copy link
Author

apollo13 commented Sep 26, 2023 via email

@github-actions github-actions bot removed the stale label Sep 27, 2023
@disconn3ct
Copy link

This is a security exposure, in security software. Is it on the radar for a fix?

@almereyda
Copy link

Would you like to contribute a PR which fixes the perceived regression? I think the maintainers accept contributions again.

The readme clearly states that this is a project for "self-hosters and hobbyists".

If you have specific security requirements, it's probably better to switch to the commercial Tailscale offer.

@disconn3ct
Copy link

Is that the official response from the project to this security report? I am more than willing to get it a CVE if that helps.

@almereyda
Copy link

This is not an official response, since I am not an official maintainer. This is just how I understand the situation personally.

@apollo13
Copy link
Author

apollo13 commented Oct 20, 2023

Hi @disconn3ct, also not a maintainer but please don't try to get a CVE. You are apparently operating under the assumption that a project has to live up to certain security standards. This is not necessarily the case (I have no idea what the security policy for headscale is) and no one forces you to use headscale. Threatening to issue a CVE will usually only have the effect of getting completely ignored.

If you want to invest your time productively, you could check if this issue is actually still an issue (I don't know I don't use headscale anymore) and if yes try to come up with a patch.

@disconn3ct
Copy link

also not a maintainer

and yet here you are, LARPing as one. Maybe you should let the actual maintainers have a chance to respond.

@disconn3ct
Copy link

kradalby added a commit to kradalby/headscale that referenced this issue Dec 10, 2023
fixes juanfont#1259

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
kradalby added a commit to kradalby/headscale that referenced this issue Dec 10, 2023
fixes juanfont#1259

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
@kradalby kradalby added this to the v0.23.0 milestone Dec 10, 2023
@masterwishx
Copy link

using v 0.22.3 i have a lot of this when moved to goodieshq/headscale-admin from headscale-ui

@disconn3ct
Copy link

Same here. @kradalby can you please reopen this? Or would you prefer a new bug (and new CVE)

headscale-59b8474d86-q55x6 headscale 2024-02-29T14:24:43Z INF unary dur=28.159111 md={":authority":"/var/run/headscale/headscale.sock","authorization":"Bearer OHNO_A_BEARER_TOKEN","content-type":"application/grpc","grpcgateway-accept":"application/json","grpcgateway-accept-language":"en-US,en;q=0.5","grpcgateway-authorization":"Bearer OHNO_ANOTHER!_BEARER_TOKEN","grpcgateway-referer":"https://MY.SITE/admin/nodes/","grpcgateway-user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0","user-agent":"grpc-go/1.54.0","x-forwarded-for":"10.108.0.5, 10.244.2.36","x-forwarded-host":"MY.SITE"} method=ListUsers req={} service=headscale.v1.HeadscaleService

@apollo13
Copy link
Author

Folks, read the ticket history. This is fixed and will be part of 0.23.0

@masterwishx
Copy link

Folks, read the ticket history. This is fixed and will be part of 0.23.0

Sure, I saw it's fixed in latest prerelease fow now... Sorry for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants