feat: OAuth bearer token verification via userinfo endpoint#107
Open
r33drichards wants to merge 2 commits intomainfrom
Open
feat: OAuth bearer token verification via userinfo endpoint#107r33drichards wants to merge 2 commits intomainfrom
r33drichards wants to merge 2 commits intomainfrom
Conversation
Add --oauth-userinfo-url flag that validates opaque OAuth bearer tokens (e.g. GitHub access tokens) by calling a userinfo endpoint. Verified claims (sub, login) are merged into mcp_headers for OPA policy evaluation. This enables GitHub OAuth tokens from a Next.js backend to flow through to filesystem isolation policies without requiring JWKS/JWT infrastructure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MCP-V8 Load Test Benchmark ReportComparison of single-node vs 3-node cluster at various request rates. Results
P95 Latency
Notes
|
…m compat deno_core provides a bare V8 runtime without Web APIs. Libraries like isomorphic-git expect Buffer, Blob, btoa, atob, and process to exist. Add minimal JS polyfills injected before user code runs: - Buffer: Uint8Array subclass with Node.js Buffer API - Blob: spec-compatible with arrayBuffer/text/slice/stream - btoa/atob: base64 encode/decode (needed by esm.sh node shims) - process: stub with env/browser/version for npm package compat Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--oauth-userinfo-urlCLI flag (andOAUTH_USERINFO_URLenv var) for validating opaque OAuth bearer tokenshttps://api.github.com/user) with the Bearer token to validate and extract user claimssub,login) intomcp_headersfor OPA policy evaluation--oauth-sub-keyto configure which response field maps tosub(defaults toidfor GitHub)--jwks-urlJWT verification (they can be used independently or together)This enables GitHub OAuth tokens from a backend like NextAuth.js to flow through to filesystem isolation policies without requiring JWKS/JWT infrastructure.
Test plan
cargo build— compiles cleanly--oauth-userinfo-url=https://api.github.com/userand pass a valid GitHub token asAuthorization: Bearer <token>mcp_headers(check logs)input.mcp_headers.subfrom OAuth claims🤖 Generated with Claude Code