Skip to content

Conversation

@MartinNowak
Copy link
Contributor

@MartinNowak MartinNowak commented Nov 15, 2025

Description

Motivation and Context

Leaking too much of the access token could expose

How Has This Been Tested?

This is covered by an existing unittest.

Checklist:

  • My change requires a change to the documentation or CHANGELOG.
  • I have updated the documentation/CHANGELOG accordingly.
  • I have created a feature (non-master) branch for my PR.
  • I have written tests for my code changes.

@MartinNowak MartinNowak requested a review from a team as a code owner November 15, 2025 19:23
@MartinNowak MartinNowak force-pushed the towards-2120-truncate-access-token branch from 0de14d0 to 636c112 Compare November 15, 2025 19:23
Copy link
Member

@tuunit tuunit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me but as this is a code change please add an entry to the CHANGELOG.md

MartinNowak and others added 2 commits January 14, 2026 23:05
…s_token

- leaking half of the access token to the logs seems problematic from
  a security point of view
- also noisier than necessary logging
- fixed by truncating to at most first 5 chars (e.g. `ya29.`)

Signed-off-by: Martin Nowak <code@dawg.eu>
…nd changelog

Signed-off-by: Jan Larwig <jan@larwig.com>
@tuunit tuunit force-pushed the towards-2120-truncate-access-token branch from 636c112 to 7e53271 Compare January 14, 2026 22:06
@tuunit tuunit changed the title more aggressively truncate logged access_token feat: more aggressively truncate logged access_token Jan 14, 2026
@tuunit tuunit merged commit b4eb611 into oauth2-proxy:master Jan 14, 2026
4 checks passed
sourava01 pushed a commit to sourava01/oauth2-proxy that referenced this pull request Jan 15, 2026
* partly address oauth2-proxy#2120 and more aggressively truncate access_token

- leaking half of the access token to the logs seems problematic from
  a security point of view
- also noisier than necessary logging
- fixed by truncating to at most first 5 chars (e.g. `ya29.`)

Signed-off-by: Martin Nowak <code@dawg.eu>

* feat: more aggressively truncate logged access_token; add unit test and changelog

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Martin Nowak <code@dawg.eu>
Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
pierluigilenoci pushed a commit to pierluigilenoci/oauth2-proxy that referenced this pull request Jan 15, 2026
* partly address oauth2-proxy#2120 and more aggressively truncate access_token

- leaking half of the access token to the logs seems problematic from
  a security point of view
- also noisier than necessary logging
- fixed by truncating to at most first 5 chars (e.g. `ya29.`)

Signed-off-by: Martin Nowak <code@dawg.eu>

* feat: more aggressively truncate logged access_token; add unit test and changelog

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Martin Nowak <code@dawg.eu>
Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants