Conversation
Signed-off-by: NAYANAR <nayana.r5@ibm.com>
14 tasks
madhav165
requested changes
Jul 29, 2025
Collaborator
madhav165
left a comment
There was a problem hiding this comment.
@Nayana-R-Gowda This test seems to be failing
Test 2: Strict mode
export REQUIRE_TOKEN_EXPIRATION=true
curl -H "Authorization: Bearer $NO_EXP_TOKEN" http://localhost:4444/version
This is returning data instead of returning 401. Please check.
madhav165
approved these changes
Jul 29, 2025
Collaborator
madhav165
left a comment
There was a problem hiding this comment.
Test 2 seems to be working fine after setting export REQUIRE_TOKEN_EXPIRATION=false before running the gateway
Signed-off-by: NAYANAR <nayana.r5@ibm.com>
vk-playground
pushed a commit
to vk-playground/mcp-context-forge
that referenced
this pull request
Sep 14, 2025
make test smoketest doctest passed Signed-off-by: Madhav Kandukuri <madhav165@users.noreply.github.com>
vk-playground
pushed a commit
to vk-playground/mcp-context-forge
that referenced
this pull request
Sep 14, 2025
make test smoketest doctest passed
vk-playground
pushed a commit
to vk-playground/mcp-context-forge
that referenced
this pull request
Sep 16, 2025
make test smoketest doctest passed Signed-off-by: Vicky Kuo <vicky.kuo@ibm.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
What problem does this PR fix and why?
This PR ensures that JWT tokens must include an expiration claim (exp) when the REQUIRE_TOKEN_EXPIRATION setting is set to true
💡 Fix Description
How did you solve it? Key design points.
Added a REQUIRE_TOKEN_EXPIRATION config flag to enforce or warn on missing exp claims in JWTs.
Updated verify_jwt_token to reject or log based on this setting, and enhanced CLI to warn on non-expiring tokens.
Ensures security compliance while allowing flexibility for automation use cases.
🧪 Verification
make lintmake test📐 MCP Compliance (if relevant)
✅ Checklist
make black isort pre-commit)