Skip to content

Add bearer token support for remote auth proxy#3386

Open
jhrozek wants to merge 1 commit intomainfrom
thv-proxy-remote-bearer-file
Open

Add bearer token support for remote auth proxy#3386
jhrozek wants to merge 1 commit intomainfrom
thv-proxy-remote-bearer-file

Conversation

@jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Jan 21, 2026

Previously, specifying --remote-auth-bearer-token without also setting --remote-auth or --remote-auth-client-id would silently ignore the bearer token. The authentication flow was never triggered.

Add shouldHandleOutgoingAuth() that also checks for bearer token configuration via flag, file, or environment variable. When a bearer token is configured, it is now used as Priority 1 in the authentication flow, before OAuth discovery.

This enables using a pre-obtained bearer token for token exchange without requiring a full OAuth configuration.

@github-actions github-actions bot added the size/XS Extra small PR: < 100 lines changed label Jan 21, 2026
@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.61%. Comparing base (f16d0cc) to head (8123286).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3386   +/-   ##
=======================================
  Coverage   65.61%   65.61%           
=======================================
  Files         407      407           
  Lines       40246    40246           
=======================================
  Hits        26407    26407           
  Misses      11779    11779           
  Partials     2060     2060           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yrobla
Copy link
Contributor

yrobla commented Jan 22, 2026

fix looks good, but could you add some testing to avoid regressions and ensure this doesn't fail again?

yrobla
yrobla previously approved these changes Jan 22, 2026
JAORMX
JAORMX previously approved these changes Jan 23, 2026
@Derek2Tu
Copy link

@jhrozek what's the status of this issue?

Previously, specifying --remote-auth-bearer-token without also setting
--remote-auth or --remote-auth-client-id would silently ignore the
bearer token. The authentication flow was never triggered.

Add shouldHandleOutgoingAuth() that also checks for bearer token
configuration via flag, file, or environment variable. When a bearer
token is configured, it is now used as Priority 1 in the authentication
flow, before OAuth discovery.

This enables using a pre-obtained bearer token for token exchange
without requiring a full OAuth configuration.
@jhrozek jhrozek dismissed stale reviews from JAORMX and yrobla via 8123286 February 4, 2026 23:25
@jhrozek jhrozek force-pushed the thv-proxy-remote-bearer-file branch from 0ee1917 to 8123286 Compare February 4, 2026 23:25
@github-actions github-actions bot added size/XS Extra small PR: < 100 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Feb 4, 2026
@jhrozek
Copy link
Contributor Author

jhrozek commented Feb 4, 2026

@jhrozek what's the status of this issue?

this somehow fell off my radar @Derek2Tu but it's a really small issue that I just happened to run into in my testing. Are you aware of anyone needing the fix (because I assume if yes then they actually want something different fixed...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants