Skip to content

stop caching guest jwks response#1615

Merged
ignaciojimenezr merged 3 commits intoMCPJam:mainfrom
ignaciojimenezr:codex/remove-cache-for-jwks-url
Mar 15, 2026
Merged

stop caching guest jwks response#1615
ignaciojimenezr merged 3 commits intoMCPJam:mainfrom
ignaciojimenezr:codex/remove-cache-for-jwks-url

Conversation

@ignaciojimenezr
Copy link
Collaborator

@ignaciojimenezr ignaciojimenezr commented Mar 14, 2026

Why:

  • Convex accepts our guest JWT when given the exact same JWKS inline as a data: URI, but rejects it when fetching the remote JWKS URL.
  • The JWKS endpoint is currently publicly cacheable for 1 hour and goes through edge caches.
  • This change makes both JWKS routes non-cacheable (Cache-Control: no-store) so remote verifiers always fetch fresh key material.

Files:

  • server/routes/web/index.ts
  • server/app.ts
  • server/routes/web/tests/guest-jwks.test.ts

@chelojimenez
Copy link
Contributor

chelojimenez commented Mar 14, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@ignaciojimenezr ignaciojimenezr changed the title stop caching guets jwks response stop caching guest jwks response Mar 14, 2026
@ignaciojimenezr ignaciojimenezr marked this pull request as ready for review March 15, 2026 04:48
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 15, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b28c56ff-1003-4ec4-8479-40dfc225c5d4

📥 Commits

Reviewing files that changed from the base of the PR and between 38b3a26 and 688b4b5.

📒 Files selected for processing (3)
  • mcpjam-inspector/server/app.ts
  • mcpjam-inspector/server/routes/web/__tests__/guest-jwks.test.ts
  • mcpjam-inspector/server/routes/web/index.ts

Walkthrough

The guest JWKS endpoint caching policy has been changed to disable all HTTP caching. The Cache-Control header was updated from "public, max-age=3600" to "no-store" in the route configuration. Corresponding test assertions and code comments were updated to reflect this revised behavior, ensuring the JWKS data is not cached by edge caches or clients.

📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 15, 2026
@ignaciojimenezr ignaciojimenezr merged commit 9948ee8 into MCPJam:main Mar 15, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants