-
Notifications
You must be signed in to change notification settings - Fork 65
Add TLS configuration options for auth #536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2b9ea4c
chore: update jwks crate
DaleSeo 7c8785f
feat: add TLS configuration
DaleSeo d1f4a93
docs: update config reference
DaleSeo 14f466f
test: add tests for TLS configuration
DaleSeo 0023a08
chore: changeset
DaleSeo 4631d85
refactor: build HTTP client at startup instead of per-request
DaleSeo e3a8fdb
Update .changesets/feat_tls_config.md
DaleSeo 84c3ba6
Update docs/source/config-file.mdx
DaleSeo b4d6e50
docs: format config-file.mdx
DaleSeo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ### Add TLS configuration options for auth - @DaleSeo PR #536 | ||
|
|
||
| Adds TLS configuration options for connecting to OAuth servers during token validation. | ||
|
|
||
| When the MCP server validates OAuth tokens, it connects to upstream OAuth servers to fetch JWKS keys. Previously, this required those servers to have certificates trusted by the system's default CA bundle. This change allows users to trust custom CA certificates or disable validation for development environments. | ||
|
|
||
| ```yaml | ||
| transport: | ||
| streamable_http: | ||
| auth: | ||
| servers: | ||
| - https://auth.example.com | ||
| audiences: | ||
| - my-audience | ||
| resource: https://mcp.example.com/mcp | ||
| tls: | ||
| ca_cert: /path/to/ca-certificate.pem | ||
| danger_accept_invalid_certs: false # Set this to true for development or testing purposes only | ||
| ``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We pinned the
jwkscrate to v0.5.1 directly from Git because this version includes chenhunghan/jwks#19, which adds support for using a customreqwest::Client. This is necessary for our TLS configuration feature. Without it, we wouldn't be able to use a client set up with custom CA certificates. This version hasn't been published to crates.io yet.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the clarification @DaleSeo ! Is there an existing issue upstream asking for a crates.io publish, or should we open one?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an existing issue: chenhunghan/jwks#27. Looks like the publish to crates.io failed in https://github.com/chenhunghan/jwks/actions/runs/17892875856/job/50875615384. Once that's resolved, we can switch back from the Git dependency.