pomerium/authorize/evaluator
Denis Mishin 9363457849
mcp: add mcp method and tool logging to authorize (#5668)
## Summary

Adds support for extending authorization log with Model Context Protocol
details.

i.e. 
```json
{
  "level": "info",
  "server-name": "all",
  "service": "authorize",
  "mcp-method": "tools/call",
  "mcp-tool": "describe_table",
  "mcp-tool-parameters": { "table_name": "Categories" },
  "allow": true,
  "allow-why-true": ["email-ok", "mcp-tool-ok"],
  "deny": false,
  "deny-why-false": [],
  "time": "2025-06-24T17:40:41-04:00",
  "message": "authorize check"
}
```

## Related issues

Fixes
https://linear.app/pomerium/issue/ENG-2393/mcp-authorize-each-incoming-request-to-an-mcp-route

## 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
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-06-24 20:58:51 -04:00
..
config.go mcp: handle and pass upstream oauth2 tokens (#5595) 2025-05-01 12:42:31 -04:00
evaluator.go mcp: add mcp method and tool logging to authorize (#5668) 2025-06-24 20:58:51 -04:00
evaluator_test.go mcp: add mcp method and tool logging to authorize (#5668) 2025-06-24 20:58:51 -04:00
functions.go logging: remove ctx from global log methods (#5337) 2024-10-23 14:18:52 -06:00
functions_test.go add mTLS UserPrincipalName SAN match (#5177) 2024-07-26 10:23:19 -07:00
gen-test-certs.go add mTLS UserPrincipalName SAN match (#5177) 2024-07-26 10:23:19 -07:00
google_cloud_serverless.go core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
google_cloud_serverless_test.go upgrade to go v1.24 (#5562) 2025-04-02 15:53:09 -06:00
headers_evaluator.go core: more metrics (#5629) 2025-05-29 09:34:41 -06:00
headers_evaluator_evaluation.go mcp: split mcp into server and client for better option grouping (#5666) 2025-06-24 10:21:32 -07:00
headers_evaluator_test.go chore(deps): bump the go group with 24 updates (#5638) 2025-06-17 09:36:50 -07:00
log.go core/authorize: add support for rego print statements (#5049) 2024-04-01 14:17:14 -06:00
log_test.go chore(deps): bump the go group with 24 updates (#5638) 2025-06-17 09:36:50 -07:00
mcp.go mcp: add mcp method and tool logging to authorize (#5668) 2025-06-24 20:58:51 -04:00
policy_evaluator.go mcp: add mcp_tool to ppl (#5662) 2025-06-23 12:43:43 -04:00
policy_evaluator_test.go chore(deps): bump the go group with 24 updates (#5638) 2025-06-17 09:36:50 -07:00