pomerium/internal/log
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
..
access.go envoy: log mtls failures (#5210) 2024-08-09 14:05:10 -04:00
authorize.go mcp: add mcp method and tool logging to authorize (#5668) 2025-06-24 20:58:51 -04:00
debug.go New integration test fixtures (#5233) 2024-11-05 14:31:40 -05:00
grpc.go cleanup logs (#5571) 2025-04-14 08:20:10 -06:00
headers.go core/go: use hashicorp/go-set (#5278) 2024-10-03 12:59:11 -06:00
headers_test.go proxy: add support for logging http request headers (#4388) 2023-07-25 09:46:42 -06:00
log.go Fix many instances of contexts and loggers not being propagated (#5340) 2024-10-25 14:50:56 -04:00
log_test.go logging: standardize on hyphens in attribute names (#5577) 2025-04-22 10:57:19 -07:00
middleware.go add additional authorization check logs (#5598) 2025-05-01 10:57:28 -06:00
middleware_test.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
multiwriter.go chore(deps): bump github.com/spf13/viper from 1.16.0 to 1.18.2 (#4861) 2023-12-27 16:16:38 -07:00
warnings.go Fix many instances of contexts and loggers not being propagated (#5340) 2024-10-25 14:50:56 -04:00