pomerium/config
Denis Mishin b944e68232
mcp: implement connect (#5640)
## Summary

adds implementation of `/.pomerium/mcp/connect` method, that takes a
`redirect_url` parameter and would ensure the user goes thru required
redirects so that its session is hydrated with the upstream Oauth token
for the MCP server.
the `redirect_url` parameter host must match one of the _client_ mcp
routes (currently identified by the presence of `mcp:
pass_upstream_access_token: true` in the route.

## Related issues

Fix
https://linear.app/pomerium/issue/ENG-2321/mcp-support-handling-external-oauth-servers

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [x] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-06-02 17:19:34 -04:00
..
envoyconfig config: use stable route ids for authorize matching and order xds responses (#5618) 2025-05-19 10:52:15 -06:00
otelconfig Refactor trace config to match supported otel options (#5447) 2025-01-30 11:59:19 -05:00
testdata
autocert.go
autocert_test.go upgrade to go v1.24 (#5562) 2025-04-02 15:53:09 -06:00
bearer_token_format.go authorize: support authenticating with idp tokens (#5484) 2025-02-18 13:02:06 -07:00
codec_type.go HTTP/3 Support (#5349) 2024-11-19 08:48:30 -07:00
codec_type_test.go
config.go config: minor cleanup in GenerateCatchAllCertificate (#5397) 2024-12-18 13:21:48 -08:00
config_source.go logging: standardize on hyphens in attribute names (#5577) 2025-04-22 10:57:19 -07:00
config_source_test.go fileutil: reimplement file watcher (#5498) 2025-02-26 09:21:06 -07:00
config_test.go upgrade to go v1.24 (#5562) 2025-04-02 15:53:09 -06:00
constants.go authorize: support authenticating with idp tokens (#5484) 2025-02-18 13:02:06 -07:00
custom.go mcp: pass access token to the upstream (#5593) 2025-04-29 12:13:18 -04:00
custom_test.go
doc.go
from.go
from_test.go change Policy.Matches to accept a URL pointer (#5360) 2024-11-07 14:55:44 -05:00
helpers.go
helpers_test.go
http.go core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
http_test.go
identity.go authorize: support authenticating with idp tokens (#5484) 2025-02-18 13:02:06 -07:00
layered.go core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
layered_test.go
log.go New tracing system (#5388) 2025-01-21 13:26:32 -05:00
log_level.go
metrics.go cleanup logs (#5571) 2025-04-14 08:20:10 -06:00
metrics_test.go
mtls.go Core-Zero Import (#5288) 2024-10-09 18:51:56 -04:00
mtls_test.go add mTLS UserPrincipalName SAN match (#5177) 2024-07-26 10:23:19 -07:00
options.go mcp: pass access token to the upstream (#5593) 2025-04-29 12:13:18 -04:00
options_check.go Refactor trace config to match supported otel options (#5447) 2025-01-30 11:59:19 -05:00
options_test.go mcp: add upstream oauth2 config types (#5592) 2025-04-28 19:18:44 -04:00
policy.go mcp: implement connect (#5640) 2025-06-02 17:19:34 -04:00
policy_ppl.go ppl: fix empty/no-op allow block added in some cases to converted PPL policies (#5289) 2024-09-16 18:52:54 -04:00
policy_ppl_test.go policy: support emails from directory user (#5504) 2025-02-27 13:39:28 -07:00
policy_test.go config: support weighted URLs in To field (#5624) 2025-05-20 12:15:10 -06:00
runtime_flags.go mcp: add global runtime flag (#5604) 2025-05-02 16:33:42 -04:00
session.go core: more metrics (#5629) 2025-05-29 09:34:41 -06:00
session_test.go only support loading idp tokens via bearer tokens (#5545) 2025-03-26 09:47:40 -06:00
validate.go