Conversation
Signed-off-by: yosrixp <yosrixp@yahoo.com>
MartinTrojans
approved these changes
Jun 3, 2026
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
Adds
airtableas a new L2-promoted upstream MCP provider, exposed at/v1/airtable/mcpon the MCP gateway. Modeled on Figma (confidential PKCE + direct flat OIDC userinfo) with Oracle EPM's rotating-RT handling, but uses HTTP Basic on the token endpoint per Airtable's docs (curl -u client_id:client_secret).Architecture
sequenceDiagram participant C as MCP Client participant M as MoP /authorize participant A as AirtableResource participant Q as Quarkus OIDC tenant=airtable participant Up as airtable.com OAuth2 participant UI as api.airtable.com/whoami participant L2 as L2 upstream-tokens C->>M: GET /authorize?resource=.../v1/airtable/mcp + PKCE M->>M: Okta leg + mint MoP code M->>A: redirect /airtable/authorize?state=mopCode A->>Q: "@Authenticated -> upstream OIDC PKCE" Q->>Up: /authorize?...&resource=https://mcp.airtable.com Up->>Q: callback /airtable/authorize/callback?code= Q->>Up: POST /token (Basic auth, code+verifier) Up->>Q: AT 1h + RT 60d rotating Q->>UI: GET whoami (Bearer AT) UI->>Q: "{ id, email, scopes }" Q->>A: restore-path A->>L2: storeTokens(airtable, AT=3600, rotated RT) A->>C: redirect with MoP codeChanges
New Java (3 files):
AirtableResource—/airtable/authorizecallback. Uses the 8-argAuthorizerService.storeTokensoverload so the L1 bare row TTL is provider-pinned to the documented 1h AT. Includes the RT-borrow-from-L2 fallback for second/third MCP-client window relogins (Airtable rotates its RT on every refresh, so the L2-borrowed RT is the freshest known-good value).AirtableUpstreamRefreshClient— L2 canonical refresh path. UsesClientSecretBasic(HTTP Basic on theAuthorizationheader) per Airtable's documented curl. Persists the rotated RT verbatim; defensive carry-forward only when upstream anomalously omits a new RT.invalid_grant → OktaTokenRevokedException(matchesUpstreamRefreshService's revoke-on-invalid-grant contract).TokenExchangeServiceAirtableImpl— legacy/native fallback path used byAuthorizerService.refreshUpstreamAndGetToken. Same Basic-auth wire shape and rotation semantics.Java modifications (4 files):
K8SSecretsProvider—SECRET_DATA_KEY_AIRTABLE_CLIENT_SECRET = "airtable-client-secret"constant + map entry.UpstreamProviderClassifier—AIRTABLE_PROVIDERconstant,PROMOTED_PROVIDERSmembership, injected client,resolveRefreshTokenClientbranch, javadoc bullet.TokenExchangeServiceProducer—@Inject+case "airtable"switch arm.OauthProviderLabel—AIRTABLEconstant +normalize()enum case.Configuration (all 7 surfaces):
mcp-oauth-proxy/src/main/resources/application.yamlmcp-oauth-proxy/deploy/mcp-oauth-proxy/templates/configmap.yamlmcp-oauth-proxy/deploy/mcp-oauth-proxy/values.yamlEach got the
airtabletenant block (HTTP Basic, directwhoamiuserinfo,extra-params.resource=https://mcp.airtable.com), the L2 TTL cap (15552000= 6 months), theserver.token-exchange.airtableentry, theremote-servers.endpointsentry where applicable, and aresource-mappingentry pointing at the correct gateway host (mcp-gatewayfor prod,dev-mcp-gatewayfor stage/local). SameclientIdacross all envs; secret read from K8s keyairtable-client-secret.Tests (3 new, 4 extended) — all passing:
AirtableResourceTest,AirtableUpstreamRefreshClientTest(includes regression-guard test assertingAuthorization: Basic <base64(id:secret)>header is set ANDclient_id/client_secretare NOT in the form body),TokenExchangeServiceAirtableImplTest.UpstreamProviderClassifierTest(promoted + resolve + Google-Workspace disambiguation + typo guards),TokenExchangeServiceProducerTest,UpstreamTokenConfigTest(exact-match cap + default fallback + Google-Workspace group-key isolation),K8SSecretsProviderTest.Key behavior
expires_in=3600); L1 bare-row TTL pinned to this via 8-argstoreTokens.MOP_UPSTREAM_TOKEN_EXPIRY_SECONDS_AIRTABLE).https://api.airtable.com/v0/meta/whoamidirectly (flat{id, email, scopes}); no synthetic proxy.resource=https://mcp.airtable.comRFC 8707 indicator on/authorize(same mechanism as Datadog'sextra-params.resource).