Skip to content

Commit f4c9cbd

Browse files
committed
docs: Add mTLS client params to Spice.ai data connector
Documents the four new mTLS client identity parameters (`spiceai_tls_client_certificate_file`, `spiceai_tls_client_key_file`, `spiceai_tls_client_certificate`, `spiceai_tls_client_key`) added in spiceai/spiceai#10764 for spice-to-spice mTLS. Mirrors the FlightSQL connector docs update in #1720. - Adds the parameters to the connector reference table. - Adds the parameters to the deployment guide reference table. - Adds an "Mutual TLS (mTLS)" subsection with file-based and inline configuration examples to both pages.
1 parent 47b93e9 commit f4c9cbd

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

website/docs/components/data-connectors/spiceai/deployment.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ The connector authenticates to the upstream Spice runtime using `spiceai_api_key
4141
| `spiceai_endpoint` | Override the Flight endpoint URL. Schemes: `http://`, `https://`, `grpc+tls://`. |
4242
| `spiceai_flight_endpoint` | Legacy alias for `spiceai_endpoint`. |
4343
| `spiceai_tls_ca_certificate_file` | Path to a CA PEM file for verifying a self-hosted upstream that uses a private CA. Ignored for `http://` endpoints. |
44+
| `spiceai_tls_client_certificate_file` | Path to a PEM client certificate chain for mutual TLS (mTLS). Must be set together with `spiceai_tls_client_key_file`. Mutually exclusive with `spiceai_tls_client_certificate`. |
45+
| `spiceai_tls_client_key_file` | Path to the PEM private key matching `spiceai_tls_client_certificate_file`. Must be set together with `spiceai_tls_client_certificate_file`. Mutually exclusive with `spiceai_tls_client_key`. |
46+
| `spiceai_tls_client_certificate` | Inline PEM client certificate chain for mutual TLS (mTLS). Resolve from a [secret store](../../secret-stores/) via `${secrets:...}`. Must be set together with `spiceai_tls_client_key`. Mutually exclusive with `spiceai_tls_client_certificate_file`. |
47+
| `spiceai_tls_client_key` | Inline PEM private key for mutual TLS (mTLS). Resolve from a [secret store](../../secret-stores/) via `${secrets:...}`. Must be set together with `spiceai_tls_client_certificate`. Mutually exclusive with `spiceai_tls_client_key_file`. |
4448

4549
Always source production keys from a managed secret store rather than from a checked-in `.env` file. API keys do not expire — rotate manually in the issuing system and update the secret store. Secret stores that support live reload (Kubernetes, Vault) pick up rotations without restarting the runtime.
4650

@@ -68,6 +72,29 @@ params:
6872
6973
The CA file is loaded once at startup; updates require a runtime restart. Mount it via Kubernetes ConfigMap or Secret in containerized deployments.
7074
75+
### Mutual TLS (mTLS)
76+
77+
When the upstream Spice runtime enforces mutual TLS (e.g. `runtime.tls.client_auth_mode: required`), the connector presents a client certificate during the handshake. Configure it as PEM files mounted into the pod, or as inline PEM material from a managed secret store:
78+
79+
```yaml
80+
# File-based
81+
params:
82+
spiceai_endpoint: grpc+tls://upstream.cluster.svc:50051
83+
spiceai_tls_ca_certificate_file: /etc/spice/clients/server-ca.pem
84+
spiceai_tls_client_certificate_file: /etc/spice/clients/client.pem
85+
spiceai_tls_client_key_file: /etc/spice/clients/client.key
86+
```
87+
88+
```yaml
89+
# Inline / secrets
90+
params:
91+
spiceai_endpoint: grpc+tls://upstream.cluster.svc:50051
92+
spiceai_tls_client_certificate: ${secrets:CLIENT_CERT_PEM}
93+
spiceai_tls_client_key: ${secrets:CLIENT_KEY_PEM}
94+
```
95+
96+
Certificate and key must be set as a pair within each form, and the file-based and inline forms are mutually exclusive. The cached Flight `Channel` is built once at dataset-load time, so cert rotation requires a runtime restart.
97+
7198
### Append Streams
7299

73100
The connector supports long-lived append streams for real-time CDC. The upstream — whether Cloud or self-hosted — must expose a dataset with append-stream support. The sidecar subscribes over Flight `DoExchange` and receives each new batch as soon as it's emitted. Stream reconnection is automatic; persistent loss of connection causes the dataset to enter `Error` state if the lag exceeds the acceptable window. See [Data Refresh](../../../features/data-acceleration/data-refresh).

website/docs/components/data-connectors/spiceai/index.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ Plain `grpc://` (without TLS) is rejected at startup. Use `http://` for unencryp
6969
| `spiceai_endpoint` | Built from `spiceai_region` (Cloud) | Override the Flight endpoint URL. Use for VPC / regional Cloud endpoints, or to point at a self-hosted Spice runtime. Schemes: `http://`, `https://`, `grpc+tls://`. |
7070
| `spiceai_flight_endpoint` | None | Legacy alias for `spiceai_endpoint`. |
7171
| `spiceai_tls_ca_certificate_file` | System cert store | Path to a CA certificate file (PEM) to verify a self-hosted upstream that uses a private CA. Ignored for `http://` endpoints. |
72+
| `spiceai_tls_client_certificate_file` | None | Path to a PEM client certificate chain for mutual TLS (mTLS). Must be set together with `spiceai_tls_client_key_file`. Mutually exclusive with `spiceai_tls_client_certificate`. |
73+
| `spiceai_tls_client_key_file` | None | Path to the PEM private key matching `spiceai_tls_client_certificate_file`. Must be set together with `spiceai_tls_client_certificate_file`. Mutually exclusive with `spiceai_tls_client_key`. |
74+
| `spiceai_tls_client_certificate` | None | Inline PEM client certificate chain for mutual TLS (mTLS). Use the [secret replacement syntax](../secret-stores/) to load from a secret store, e.g. `${secrets:my_cert}`. Must be set together with `spiceai_tls_client_key`. Mutually exclusive with `spiceai_tls_client_certificate_file`. |
75+
| `spiceai_tls_client_key` | None | Inline PEM private key for mutual TLS (mTLS). Use the [secret replacement syntax](../secret-stores/) to load from a secret store, e.g. `${secrets:my_key}`. Must be set together with `spiceai_tls_client_certificate`. Mutually exclusive with `spiceai_tls_client_key_file`. |
7276

7377
#### Endpoint resolution order
7478

@@ -170,6 +174,33 @@ params:
170174

171175
For local development and trusted internal networks, `http://` (no TLS) is also supported and avoids cert configuration entirely.
172176

177+
### Mutual TLS (mTLS)
178+
179+
When the upstream Spice runtime enforces mutual TLS (e.g. `runtime.tls.client_auth_mode: required`), the connector can present a client certificate during the handshake. Configure it in one of two mutually exclusive forms:
180+
181+
**File-based** — point at PEM files on disk:
182+
183+
```yaml
184+
params:
185+
spiceai_endpoint: grpc+tls://upstream.cluster.svc:50051
186+
spiceai_tls_ca_certificate_file: /etc/spice/clients/server-ca.pem
187+
spiceai_tls_client_certificate_file: /etc/spice/clients/client.pem
188+
spiceai_tls_client_key_file: /etc/spice/clients/client.key
189+
```
190+
191+
**Inline** — supply PEM material directly, typically from a [secret store](../secret-stores/):
192+
193+
```yaml
194+
params:
195+
spiceai_endpoint: grpc+tls://upstream.cluster.svc:50051
196+
spiceai_tls_client_certificate: ${secrets:CLIENT_CERT_PEM}
197+
spiceai_tls_client_key: ${secrets:CLIENT_KEY_PEM}
198+
```
199+
200+
Within each form, cert and key must be set together — setting only one is rejected at dataset-load time with a clear error naming both fields. The file-based and inline forms are mutually exclusive; mixing them is also rejected.
201+
202+
The cached Flight `Channel` is built once at dataset-load time, so certificate rotation requires a runtime restart.
203+
173204
### Append streams (real-time CDC)
174205

175206
The connector advertises [`supports_append_stream`](../../features/cdc/) — when the upstream Spice exposes a dataset with append-stream support, the sidecar can subscribe over Flight `DoExchange` and receive each new batch as soon as the upstream emits it. Enable on the sidecar via `refresh_mode: append` on an accelerated dataset:

0 commit comments

Comments
 (0)