pomerium/authorize
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
..
checkrequest authorize: refactor logAuthorizeCheck() (#5576) 2025-04-23 09:21:52 -07:00
evaluator fix metric to use milliseconds (#5632) 2025-06-02 09:36:10 -06:00
internal/store mcp: handle and pass upstream oauth2 tokens (#5595) 2025-05-01 12:42:31 -04:00
access_tracker.go core/go: use hashicorp/go-set (#5278) 2024-10-03 12:59:11 -06:00
access_tracker_test.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
authorize.go core: more metrics (#5629) 2025-05-29 09:34:41 -06:00
authorize_int_test.go authorize: move IdP token session creator initialization (#5616)d 2025-05-14 13:54:39 -07:00
authorize_test.go upgrade to go v1.24 (#5562) 2025-04-02 15:53:09 -06:00
check_response.go mcp: add global runtime flag (#5604) 2025-05-02 16:33:42 -04:00
check_response_grpc.go authorize: handle gRPC requests (#5400) 2024-12-19 08:46:53 -07:00
check_response_test.go mcp: add global runtime flag (#5604) 2025-05-02 16:33:42 -04:00
databroker.go proxy: use querier cache for user info (#5532) 2025-03-20 09:50:22 -06:00
databroker_test.go proxy: use querier cache for user info (#5532) 2025-03-20 09:50:22 -06:00
grpc.go mcp: implement connect (#5640) 2025-06-02 17:19:34 -04:00
grpc_test.go config: use stable route ids for authorize matching and order xds responses (#5618) 2025-05-19 10:52:15 -06:00
log.go core: more metrics (#5629) 2025-05-29 09:34:41 -06:00
log_test.go config: use stable route ids for authorize matching and order xds responses (#5618) 2025-05-19 10:52:15 -06:00
state.go authorize: move IdP token session creator initialization (#5616)d 2025-05-14 13:54:39 -07:00