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

[SECURITY] OIDC ID token leaking in ingress controller logs #642

Open
tmsdce opened this issue Mar 9, 2023 · 1 comment
Open

[SECURITY] OIDC ID token leaking in ingress controller logs #642

tmsdce opened this issue Mar 9, 2023 · 1 comment

Comments

@tmsdce
Copy link

tmsdce commented Mar 9, 2023

Description

When using OIDC, the ID token is sent as a query string parameter in GET requests. Many web servers / ingress controllers log the query string.

Impact

A person with simple read access on ingress controllers pods' logs could retrieve an ID token, possibly granting this person more permissions than needed not only on Nebraska but on various other apps also using OIDC.

Environment and steps to reproduce

  1. Deploy nebraska and expose it through an Ingress (I tested with Nginx)
  2. Watch the ingress controller logs and see the query string parameter being logged :
..."path": "/", "request_query": "id_token=eyJhbG..., "request_length": 3897, "method": "GET"...

Expected behavior

ID Tokens should not be exposed using query string

Additional information

I am not this familiar with the various OIDC authentication flows that exist, so I may be missing something here. Maybe the token cannot be used as is, but I think it's worth checking this out ^^

@acuteaura
Copy link

RFC says SHOULD NOT.

Because of the security weaknesses associated with the URI method
(see Section 5), including the high likelihood that the URL
containing the access token will be logged, it SHOULD NOT be used
unless it is impossible to transport the access token in the
"Authorization" request header field or the HTTP request entity-body.
Resource servers MAY support this method.

https://datatracker.ietf.org/doc/html/rfc6750#section-2.3

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

2 participants