Skip to content

docs(router): TLS Support#94

Merged
dotansimha merged 9 commits into
mainfrom
copilot/create-documentation-for-feature-again
Apr 20, 2026
Merged

docs(router): TLS Support#94
dotansimha merged 9 commits into
mainfrom
copilot/create-documentation-for-feature-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

Documentation for graphql-hive/router#810
Ref ROUTER-289

@ardatan ardatan changed the title docs(router): document wss:// support for WebSocket clients docs(router): TLS Support Apr 17, 2026
@ardatan ardatan marked this pull request as ready for review April 17, 2026 13:08
Copilot AI temporarily deployed to storybook-preview April 17, 2026 13:08 Inactive
Copilot AI review requested due to automatic review settings April 17, 2026 13:08
@ardatan ardatan added the waits for release Represents changes in a library that have not yet been released label Apr 17, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds TLS/mTLS documentation for Hive Router and connects it to existing WebSocket and configuration docs.

Changes:

  • Added a new “TLS & mTLS” security page covering inbound (client→router) and outbound (router→subgraphs) TLS configuration.
  • Updated WebSockets docs to clarify wss:// usage when inbound TLS is enabled.
  • Expanded traffic_shaping configuration reference with inbound router.tls and outbound tls sections, plus a warning callout for insecure verification bypass.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/documentation/content/docs/router/subscriptions/websockets.mdx Adds a TLS/wss:// note and example for WebSocket clients.
packages/documentation/content/docs/router/security/tls.mdx Introduces a new TLS & mTLS documentation page with examples and operational guidance.
packages/documentation/content/docs/router/security/meta.json Adds the new TLS page to the security docs navigation.
packages/documentation/content/docs/router/configuration/traffic_shaping.mdx Documents inbound router.tls and outbound subgraph tls configuration options and warnings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/documentation/content/docs/router/security/tls.mdx Outdated
Comment thread packages/documentation/content/docs/router/subscriptions/websockets.mdx Outdated
ardatan and others added 2 commits April 17, 2026 16:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ckets.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ardatan ardatan temporarily deployed to storybook-preview April 17, 2026 13:13 — with GitHub Actions Inactive
kamilkisiela pushed a commit to graphql-hive/router that referenced this pull request Apr 17, 2026
Ref ROUTER-100
Ref ROUTER-118
Closes #340

Documentation graphql-hive/docs#94

# TLS Support

Adds TLS support to Hive Router for both client and subgraph
connections, including mutual TLS (mTLS) authentication. This allows
secure communication between clients, the router, and subgraphs by
encrypting data in transit and optionally verifying identities.

## TLS Directions

TLS Support has implementations for the following 4 directions:

### Router -> Client - Regular TLS
Router has an `identity` (`cert`, `key`), and client has `cert`, then
Client validates the router's `identity`

### Client -> Router - mTLS
Router has the `cert`, client has the `identity`, mTLS/Client Auth then
the router validates the client's `identity`

### Subgraph -> Router - Regular TLS
Subgraph has the `identity` (`cert`, `key`), and router has `cert`, then
Router validates the subgraph's `identity`.

### Router -> Subgraph - mTLS
Subgraph has the `cert`, router(which is the client this time) has the
`identity`, then subgraph validates the router's `identity`.

## TLS Directions Diagram

```mermaid
flowchart LR
    Client["Client"]
    Router["Router"]
    Subgraph["Subgraph"]

    %% Router -> Client: Regular TLS
    Router -- "TLS\n(cert_file + key_file)" --> Client
    Client -. "validates router identity\n(cert_file)" .-> Router

    %% Client -> Router: mTLS / Client Auth
    Client -- "mTLS\n(client identity)" --> Router
    Router -. "validates client identity\n(client_auth.cert_file)" .-> Client

    %% Subgraph -> Router: Regular TLS
    Subgraph -- "TLS\n(cert_file)" --> Router
    Router -. "validates subgraph identity\n(all/subgraphs.cert_file)" .-> Subgraph

    %% Router -> Subgraph: mTLS
    Router -- "mTLS\n(client_auth.cert_file + key_file)" --> Subgraph
    Subgraph -. "validates router identity\n(cert_file)" .-> Router
```

## Configuration Structure
```yaml
traffic_shaping:
  router:
    key_file:          # Router server private key
    cert_file:         # Router server certificate(s)
    client_auth:       # mTLS: Client -> Router
       cert_file:      # Trusted client CA certificate(s)
  all:                 # Default TLS for all subgraph connections
    cert_file:         # Trusted subgraph CA certificate(s)
    client_auth:       # mTLS: Router -> Subgraph
       cert_file:      # Router client certificate(s)
       key_file:       # Router client private key
  subgraphs:
    SUBGRAPH_NAME:     # Per-subgraph TLS override
      cert_file:       # Trusted subgraph CA certificate(s)
      client_auth:     # mTLS: Router -> Subgraph
         cert_file:    # Router client certificate(s)
         key_file:     # Router client private key
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: theguild-bot <bot@the-guild.dev>
@dotansimha dotansimha merged commit c32fb0e into main Apr 20, 2026
3 of 8 checks passed
@dotansimha dotansimha deleted the copilot/create-documentation-for-feature-again branch April 20, 2026 12:44
Copilot AI added a commit to graphql-hive/router that referenced this pull request May 5, 2026
Ref ROUTER-100
Ref ROUTER-118
Closes #340

Documentation graphql-hive/docs#94

# TLS Support

Adds TLS support to Hive Router for both client and subgraph
connections, including mutual TLS (mTLS) authentication. This allows
secure communication between clients, the router, and subgraphs by
encrypting data in transit and optionally verifying identities.

## TLS Directions

TLS Support has implementations for the following 4 directions:

### Router -> Client - Regular TLS
Router has an `identity` (`cert`, `key`), and client has `cert`, then
Client validates the router's `identity`

### Client -> Router - mTLS
Router has the `cert`, client has the `identity`, mTLS/Client Auth then
the router validates the client's `identity`

### Subgraph -> Router - Regular TLS
Subgraph has the `identity` (`cert`, `key`), and router has `cert`, then
Router validates the subgraph's `identity`.

### Router -> Subgraph - mTLS
Subgraph has the `cert`, router(which is the client this time) has the
`identity`, then subgraph validates the router's `identity`.

## TLS Directions Diagram

```mermaid
flowchart LR
    Client["Client"]
    Router["Router"]
    Subgraph["Subgraph"]

    %% Router -> Client: Regular TLS
    Router -- "TLS\n(cert_file + key_file)" --> Client
    Client -. "validates router identity\n(cert_file)" .-> Router

    %% Client -> Router: mTLS / Client Auth
    Client -- "mTLS\n(client identity)" --> Router
    Router -. "validates client identity\n(client_auth.cert_file)" .-> Client

    %% Subgraph -> Router: Regular TLS
    Subgraph -- "TLS\n(cert_file)" --> Router
    Router -. "validates subgraph identity\n(all/subgraphs.cert_file)" .-> Subgraph

    %% Router -> Subgraph: mTLS
    Router -- "mTLS\n(client_auth.cert_file + key_file)" --> Subgraph
    Subgraph -. "validates router identity\n(cert_file)" .-> Router
```

## Configuration Structure
```yaml
traffic_shaping:
  router:
    key_file:          # Router server private key
    cert_file:         # Router server certificate(s)
    client_auth:       # mTLS: Client -> Router
       cert_file:      # Trusted client CA certificate(s)
  all:                 # Default TLS for all subgraph connections
    cert_file:         # Trusted subgraph CA certificate(s)
    client_auth:       # mTLS: Router -> Subgraph
       cert_file:      # Router client certificate(s)
       key_file:       # Router client private key
  subgraphs:
    SUBGRAPH_NAME:     # Per-subgraph TLS override
      cert_file:       # Trusted subgraph CA certificate(s)
      client_auth:     # mTLS: Router -> Subgraph
         cert_file:    # Router client certificate(s)
         key_file:     # Router client private key
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: theguild-bot <bot@the-guild.dev>
Co-authored-by: kamilkisiela <8167190+kamilkisiela@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waits for release Represents changes in a library that have not yet been released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants