Skip to content

Return 401 with WWW-Authenticate for expired upstream tokens - #3984

Merged
amirejaz merged 1 commit into
mainfrom
upstream-refresh/0-middleware-401
Mar 4, 2026
Merged

amirejaz merged 1 commit into
mainfrom
upstream-refresh/0-middleware-401

Conversation

@jhrozek

@jhrozek jhrozek commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

When upstream tokens are expired or missing, return a clear 401 with WWW-Authenticate header instead of silently passing the request through with an invalid token.

Related: #3914

When upstream tokens are expired or missing, return a clear 401 with
WWW-Authenticate header instead of silently passing the request through
with an invalid token.

Related: #3914
@github-actions github-actions Bot added the size/S Small PR: 100-299 lines changed label Mar 3, 2026
@jhrozek
jhrozek requested a review from tgrunnagle March 3, 2026 23:03
@codecov

codecov Bot commented Mar 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.56%. Comparing base (c46ae47) to head (64c2f40).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3984   +/-   ##
=======================================
  Coverage   68.56%   68.56%           
=======================================
  Files         437      437           
  Lines       44662    44673   +11     
=======================================
+ Hits        30621    30630    +9     
  Misses      11657    11657           
- Partials     2384     2386    +2     

☔ 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.

@amirejaz
amirejaz merged commit b690645 into main Mar 4, 2026
37 checks passed
@amirejaz
amirejaz deleted the upstream-refresh/0-middleware-401 branch March 4, 2026 10:50
reyortiz3 pushed a commit that referenced this pull request Mar 4, 2026
When upstream tokens are expired or missing, return a clear 401 with
WWW-Authenticate header instead of silently passing the request through
with an invalid token.

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

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants