Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .changesets/feat_tls_config.md
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
```
163 changes: 160 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/apollo-mcp-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ http = "1.3.1"
humantime-serde = "1.1.1"
jsonschema = "0.33.0"
jsonwebtoken = "9"
jwks = "0.4.0"
jwks = { git = "https://github.com/chenhunghan/jwks", tag = "v0.5.1" }
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We pinned the jwks crate to v0.5.1 directly from Git because this version includes chenhunghan/jwks#19, which adds support for using a custom reqwest::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.

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member Author

@DaleSeo DaleSeo Jan 6, 2026

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.

lz-str = "0.2.1"
opentelemetry = "0.30.0"
opentelemetry-otlp = { version = "0.30.0", features = [
Expand Down Expand Up @@ -69,6 +69,7 @@ url.workspace = true

[dev-dependencies]
assert_fs = "1"
tempfile = "3"
chrono = { version = "0.4.41", default-features = false, features = ["now"] }
figment = { version = "0.10.19", features = ["test"] }
insta.workspace = true
Expand Down
Loading