• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pomerium / pomerium / 23268795626
52%

Build:
DEFAULT BRANCH: main
Ran 18 Mar 2026 10:04PM UTC
Jobs 1
Files 688
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Mar 2026 09:49PM UTC coverage: 45.535% (+0.02%) from 45.513%
23268795626

push

github

web-flow
fix(mcp): include request path in upstream_auth PRM URL and normalize trailing slash (#6202)

## Summary

Follow-up to #6200. The `upstream_auth.go` `handle401` path had the same
bug: when Pomerium returns a 401 to tell the MCP client to
re-authenticate, the `resource_metadata` URI in `WWW-Authenticate` was
missing the request path, causing a resource mismatch for path-based MCP
routes.

Additionally, `ProtectedResourceMetadataURL` now normalizes trailing
slashes (stripping `/` from root paths) to match the behavior of
`BuildProtectedResourceMetadataURLs` in `upstream_discovery.go`, which
already does this normalization.

## Related issues

- #6199
- #6200

## User Explanation

MCP clients connecting to path-based MCP servers through Pomerium's
upstream auth flow will no longer fail OAuth discovery due to a resource
mismatch in the `WWW-Authenticate` header.

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [ ] ready for review

6 of 6 new or added lines in 2 files covered. (100.0%)

24 existing lines in 6 files now uncovered.

34932 of 76715 relevant lines covered (45.53%)

115.36 hits per line

Coverage Regressions

Lines Coverage ∆ File
9
80.34
0.0% pkg/ssh/manager.go
8
91.72
-1.79% pkg/ssh/policy_index_inmemory.go
2
49.19
0.54% internal/databroker/server_clustered_follower.go
2
78.66
-0.79% internal/recording/server.go
2
85.67
-0.62% pkg/grpc/databroker/syncer.go
1
75.15
0.89% internal/databroker/config_source.go
Jobs
ID Job ID Ran Files Coverage
1 23268795626.1 18 Mar 2026 10:04PM UTC 688
45.53
GitHub Action Run
Source Files on build 23268795626
  • Tree
  • List 688
  • Changed 14
  • Source Changed 2
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23268795626
  • 30ac0dfb on github
  • Prev Build on main (#23265643559)
  • Next Build on main (#23303329007)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc