From a20fe6335f960a350483d0079db2ec281c68202c Mon Sep 17 00:00:00 2001 From: Matthew Zeng Date: Fri, 2 Oct 2026 05:16:51 +0000 Subject: [PATCH] Replace the Figma OAuth exception with Mercado Pago (#50189) ## What changed Allow the issuer `https://mcp.mercadopago.com/mcp` to use authorization endpoints on `https://auth.mercadopago.com` and token endpoints on `https://mcp.mercadopago.com` without issuer-bound callbacks. Remove the previous Figma exception. ## Testing Update the provider-exception test to accept the Mercado Pago combination and reject lookalike issuer hosts, unrelated token hosts, and HTTP issuer and token URLs. GitOrigin-RevId: 3838c7e4c32d6a2022f0011d6020e383035fe67f --- .../rmcp-client/src/oauth/issuer_binding.rs | 6 ++--- .../src/oauth_client_registration_tests.rs | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/codex-rs/rmcp-client/src/oauth/issuer_binding.rs b/codex-rs/rmcp-client/src/oauth/issuer_binding.rs index 24e264bc05..ec5cb7b07e 100644 --- a/codex-rs/rmcp-client/src/oauth/issuer_binding.rs +++ b/codex-rs/rmcp-client/src/oauth/issuer_binding.rs @@ -50,9 +50,9 @@ pub(crate) fn validate_authorization_server_endpoints( token_endpoint.origin().ascii_serialization().as_str(), ), ( - "https://api.figma.com/", - "https://www.figma.com", - "https://api.figma.com", + "https://mcp.mercadopago.com/mcp", + "https://auth.mercadopago.com", + "https://mcp.mercadopago.com", ) | ( "https://agent.robinhood.com/mcp/trading", "https://robinhood.com", diff --git a/codex-rs/rmcp-client/src/oauth_client_registration_tests.rs b/codex-rs/rmcp-client/src/oauth_client_registration_tests.rs index 8835449f5d..ca334f346f 100644 --- a/codex-rs/rmcp-client/src/oauth_client_registration_tests.rs +++ b/codex-rs/rmcp-client/src/oauth_client_registration_tests.rs @@ -243,9 +243,9 @@ async fn registration_selection_preserves_dcr_capabilities_and_exact_redirects() fn legacy_provider_exceptions_require_exact_issuer_and_endpoint_origins() -> Result<()> { for (issuer, authorization_endpoint, token_endpoint, accepted) in [ ( - "https://api.figma.com", - "https://www.figma.com/oauth/mcp", - "https://api.figma.com/v1/oauth/token", + "https://mcp.mercadopago.com/mcp", + "https://auth.mercadopago.com/mcp/authorization", + "https://mcp.mercadopago.com/oauth/token", true, ), ( @@ -255,21 +255,21 @@ fn legacy_provider_exceptions_require_exact_issuer_and_endpoint_origins() -> Res true, ), ( - "https://api.figma.com.attacker.example", - "https://www.figma.com/oauth/mcp", - "https://api.figma.com.attacker.example/token", + "https://mcp.mercadopago.com.attacker.example/mcp", + "https://auth.mercadopago.com/mcp/authorization", + "https://mcp.mercadopago.com.attacker.example/oauth/token", false, ), ( - "https://api.figma.com", - "https://www.figma.com/oauth/mcp", + "https://mcp.mercadopago.com/mcp", + "https://auth.mercadopago.com/mcp/authorization", "https://attacker.example/token", false, ), ( - "http://api.figma.com", - "https://www.figma.com/oauth/mcp", - "http://api.figma.com/v1/oauth/token", + "http://mcp.mercadopago.com/mcp", + "https://auth.mercadopago.com/mcp/authorization", + "http://mcp.mercadopago.com/oauth/token", false, ), (