Skip to content

feat: subgraph mTLS documentation#252

Merged
SkArchon merged 3 commits intomainfrom
milinda/eng-8895-router-add-mtls-authentication-to-subgraphs
Feb 24, 2026
Merged

feat: subgraph mTLS documentation#252
SkArchon merged 3 commits intomainfrom
milinda/eng-8895-router-add-mtls-authentication-to-subgraphs

Conversation

@SkArchon
Copy link
Copy Markdown
Contributor

@SkArchon SkArchon commented Feb 18, 2026

Description

This PR adds documentation for mTLS with subgraphs, and overriding CA certificates for subgraphs. Depends on wundergraph/cosmo#2514.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guides for configuring outbound mTLS (client certificates) for router-to-subgraph connections with global and per-subgraph options.
    • Included environment variable references, custom CA certificate handling and related warnings.
    • Added YAML examples demonstrating router-level and per-subgraph client certificate setups.
    • Note: the new TLS sections appear twice in the docs and will be consolidated in a follow-up.

Checklist

  • I have validated my changes locally using mintlify dev
  • I have validated my changes are working as expected by looking at the preview deployment
  • All links in my documentation work correctly
  • All images render properly
  • Code examples are tested and formatted correctly
  • If I added new pages, they are included in the navigation (docs.json)

@SkArchon SkArchon requested review from a team as code owners February 18, 2026 15:36
@SkArchon SkArchon requested review from JivusAyrus, StarpTech, asoorm and wilsonrivera and removed request for a team February 18, 2026 15:36
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 18, 2026

Walkthrough

Added documentation sections describing outbound client TLS (mTLS) for router-to-subgraph connections: environment variables, global and per-subgraph client certificate configuration, CA handling, and verification-skip options. The new content is duplicated within the updated files.

Changes

Cohort / File(s) Summary
Outbound TLS Documentation
docs/router/configuration.mdx, docs/router/security/tls.mdx
Adds outbound client TLS (mTLS) docs: environment variables (TLS_CLIENT_CERT_FILE, TLS_CLIENT_KEY_FILE, TLS_CLIENT_CA_FILE, TLS_CLIENT_INSECURE_SKIP_CA_VERIFICATION), global and per-subgraph YAML examples, custom CA guidance and warnings. Note: the section is duplicated within the files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: subgraph mTLS documentation' accurately describes the main change, which is adding documentation for mutual TLS authentication between the router and subgraphs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/router/security/tls.mdx (1)

140-140: Heading level inconsistency.

"Per-Subgraph Configuration" is at ### (h3) level, but "Global Configuration" above it is at #### (h4). Since both are configuration approaches under "Router mTLS", they should be at the same level for a consistent hierarchy.

📝 Suggested fix
-### Per-Subgraph Configuration
+#### Per-Subgraph Configuration
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/router/security/tls.mdx` at line 140, The heading "Per-Subgraph
Configuration" is marked as ### while the earlier "Global Configuration" is ####
under the same "Router mTLS" section, causing inconsistent hierarchy; update the
"Per-Subgraph Configuration" heading to match the "Global Configuration" level
(i.e., change the "Per-Subgraph Configuration" heading token to the same number
of # signs as "Global Configuration") so both configuration approaches under
"Router mTLS" are at the same heading level.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/router/configuration.mdx`:
- Line 419: Update the broken anchor in the link so it matches an existing
heading in the TLS doc: replace the fragment "#outbound-mtls-to-subgraphs" in
the link text "Outbound mTLS to Subgraphs" with a valid anchor such as
"#tls-with-subgraphs" (or "#router-mtls") so the URL becomes
"/router/security/tls#tls-with-subgraphs" ensuring the link from the
configuration page resolves correctly to the TLS section.

---

Nitpick comments:
In `@docs/router/security/tls.mdx`:
- Line 140: The heading "Per-Subgraph Configuration" is marked as ### while the
earlier "Global Configuration" is #### under the same "Router mTLS" section,
causing inconsistent hierarchy; update the "Per-Subgraph Configuration" heading
to match the "Global Configuration" level (i.e., change the "Per-Subgraph
Configuration" heading token to the same number of # signs as "Global
Configuration") so both configuration approaches under "Router mTLS" are at the
same heading level.

Comment thread docs/router/configuration.mdx Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/router/security/tls.mdx (2)

120-121: Consider cross-linking to related configuration documentation.

If the router configuration documentation (e.g., configuration.mdx) contains related TLS client configuration details, consider adding a cross-reference link here to help users discover all relevant configuration options.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/router/security/tls.mdx` around lines 120 - 121, Add a cross-reference
from the "TLS with Subgraphs" section to the router configuration docs by
inserting a short link to the related configuration page (e.g.,
configuration.mdx) with descriptive anchor text like "Router TLS / client
configuration" or "TLS client options" so readers can find all TLS/client
settings; if configuration.mdx has a specific subsection or anchor (e.g., "TLS
client configuration" or "tls-client-options"), link directly to that anchor to
take users straight to the relevant details.

163-177: Heading level should match sibling sections.

For consistency with the heading hierarchy fix mentioned above, this should also be H4 if it's a subsection under "Router mTLS".

📝 Suggested fix
-### Custom CA Certificates
+#### Custom CA Certificates
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/router/security/tls.mdx` around lines 163 - 177, Change the "Custom CA
Certificates" heading from H3 to H4 so it matches sibling subsections under
"Router mTLS": update the heading token for "Custom CA Certificates" (the
visible text) to use one fewer "#" (i.e., make it an H4) and verify the
surrounding subsections use the same heading level and indentation for
consistency in the document hierarchy.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/router/security/tls.mdx`:
- Around line 140-161: Change the heading "Per-Subgraph Configuration" to match
the level used by "Global Configuration" (make it H4 to be a peer under "Router
mTLS") and update the explanatory Note to stop saying per-subgraph entries are
"nested under `tls.client.all`" — instead state that per-subgraph entries live
under `tls.client.subgraphs` and use the same field structure as
`tls.client.all` (e.g., `cert_file`, `key_file`), clarifying that a per-subgraph
entry fully overrides the global `all` config for that subgraph.

---

Nitpick comments:
In `@docs/router/security/tls.mdx`:
- Around line 120-121: Add a cross-reference from the "TLS with Subgraphs"
section to the router configuration docs by inserting a short link to the
related configuration page (e.g., configuration.mdx) with descriptive anchor
text like "Router TLS / client configuration" or "TLS client options" so readers
can find all TLS/client settings; if configuration.mdx has a specific subsection
or anchor (e.g., "TLS client configuration" or "tls-client-options"), link
directly to that anchor to take users straight to the relevant details.
- Around line 163-177: Change the "Custom CA Certificates" heading from H3 to H4
so it matches sibling subsections under "Router mTLS": update the heading token
for "Custom CA Certificates" (the visible text) to use one fewer "#" (i.e., make
it an H4) and verify the surrounding subsections use the same heading level and
indentation for consistency in the document hierarchy.

Comment thread docs/router/security/tls.mdx Outdated
Copy link
Copy Markdown
Contributor

@StarpTech StarpTech left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/router/security/tls.mdx (1)

124-131: Add a cross-link to the configuration reference.
This new section would benefit from a direct link to the configuration reference where all TLS fields are listed, aligning with the docs-linking guideline.

✅ Suggested addition
 In addition to accepting mTLS connections from clients (inbound), the router can also present client certificates when connecting to subgraphs (outbound). This is useful when your subgraphs require mTLS authentication to accept requests from the router.
 
 You can configure a global client certificate that applies to all subgraph connections, and optionally override it on a per-subgraph basis.
+For the full option reference, see the [Router Configuration](/router/configuration#tls) section.

As per coding guidelines: "Link between related documentation pages".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/router/security/tls.mdx` around lines 124 - 131, Add a cross-link from
the "Global Configuration" section to the configuration reference page that
lists all TLS fields (e.g., add a sentence like "See the Configuration Reference
for all TLS fields" linking to the TLS/config reference). Place the link near
the "Global Configuration" heading or immediately before the example so readers
can jump to detailed field docs; reference this change against the "Global
Configuration" heading and the TLS fields list in the configuration reference.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/router/security/tls.mdx`:
- Around line 124-131: Add a cross-link from the "Global Configuration" section
to the configuration reference page that lists all TLS fields (e.g., add a
sentence like "See the Configuration Reference for all TLS fields" linking to
the TLS/config reference). Place the link near the "Global Configuration"
heading or immediately before the example so readers can jump to detailed field
docs; reference this change against the "Global Configuration" heading and the
TLS fields list in the configuration reference.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cfa1360 and 5ddb188.

📒 Files selected for processing (2)
  • docs/router/configuration.mdx
  • docs/router/security/tls.mdx

@SkArchon SkArchon merged commit c323982 into main Feb 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants