Skip to content

P1-mcp-auth: OAuth 2.1/OIDC short-lived scoped tokens for MCP boundary #317

Description

@omarespejel

Summary

Harden MCP server authentication with modern token-based identity and scoped authorization.

Problem

HMAC/mTLS replay controls are necessary but not sufficient for multi-tenant/third-party client usage.

Scope

  • Add OAuth 2.1/OIDC validation path for MCP entrypoints.
  • Enforce short-lived access tokens and audience checks.
  • Enforce scope-to-tool mapping (tool:*, read:*, write:*).
  • Add token subject binding to request trace IDs and audit logs.
  • Keep existing proxy controls (P0-proxy: HMAC + mTLS + nonce replay protection (Redis TTL) #219) as defense-in-depth.

Acceptance Criteria

  • Unscoped token cannot invoke privileged tools
  • Expired token is rejected deterministically
  • Scope checks are visible in structured audit logs
  • Docs include deployment profile (issuer/jwks/audience)

Dependencies

Metadata

Metadata

Assignees

Labels

area:infraCI/spec/conformance and toolingarea:securitySecurity hardening and threat-model correctnessenhancementNew feature or requestpriority:P1High leverage / next

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions