You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mTLS (client certificate authentication) is included in the Enterprise distribution of Spice.ai. [Learn more](https://spice.ai).
126
+
:::
127
+
128
+
mTLS extends standard TLS by requiring the client to also present a certificate during the TLS handshake. This provides cryptographic authentication of both the server and the client.
129
+
130
+
### Enable mTLS via spicepod.yaml
131
+
132
+
Set `client_auth_mode` to `request` or `required` and provide a CA bundle to verify client certificates:
133
+
134
+
```yaml
135
+
runtime:
136
+
tls:
137
+
enabled: true
138
+
certificate_file: /path/to/server.crt
139
+
key_file: /path/to/server.key
140
+
client_auth_mode: required
141
+
client_auth_ca_file: /path/to/client-ca.pem
142
+
```
143
+
144
+
### Enable mTLS via command line
145
+
146
+
```bash
147
+
spiced --tls-enabled true \
148
+
--tls-certificate-file /path/to/server.crt \
149
+
--tls-key-file /path/to/server.key \
150
+
--tls-client-auth-mode required \
151
+
--tls-client-auth-ca-file /path/to/client-ca.pem
152
+
```
153
+
154
+
### Client auth modes
155
+
156
+
| Mode | Behavior |
157
+
|------|----------|
158
+
| `none` *(default)* | Standard one-way TLS. No client certificate is requested. |
159
+
| `request` | The server requests a client certificate but accepts connections without one. Presented certificates are verified against the CA. Useful for migration or audit-only deployments. |
160
+
| `required` | A valid client certificate is required. The Flight listener rejects no-cert connections at the TLS handshake. The HTTP listener admits no-cert connections so `/health` and `/v1/ready` remain accessible for Kubernetes probes, but all other HTTP endpoints return 401 without a verified client certificate. |
Kubernetes liveness/readiness probes (`/health`, `/v1/ready`) and the metrics endpoint (`/metrics`) are always accessible without a client certificate, even under `client_auth_mode: required`.
182
+
183
+
### Client CA hot-reload
184
+
185
+
When `client_auth_ca_file` is used, the CA bundle is watched for changes and reloaded atomically alongside the server certificate and key. When `client_auth_ca` (inline) is used, the CA is loaded once at startup.
186
+
187
+
For a complete walkthrough, see the [mTLS Cookbook recipe](https://github.com/spiceai/cookbook/tree/trunk/mtls).
Copy file name to clipboardExpand all lines: website/docs/reference/spicepod/runtime.md
+51Lines changed: 51 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -290,6 +290,57 @@ runtime:
290
290
key_file: /path/to/key.pem
291
291
```
292
292
293
+
### `runtime.tls.client_auth_mode`
294
+
295
+
:::info Enterprise Feature
296
+
mTLS (client certificate authentication) is included in the Enterprise distribution of Spice.ai. [Learn more](https://spice.ai).
297
+
:::
298
+
299
+
Controls whether the runtime requires, requests, or ignores client certificates on its public endpoints (HTTP, Flight, Metrics). Defaults to `none`.
300
+
301
+
| Mode | Behavior |
302
+
|------|----------|
303
+
| `none` *(default)* | Standard one-way TLS. No client certificate is requested. |
304
+
| `request` | The server sends a `CertificateRequest` but accepts connections without a certificate. Presented certificates are verified against the configured CA. Useful for migration or audit-only deployments. |
305
+
| `required` | A valid client certificate is required. The Flight (gRPC) listener rejects connections without a certificate at the TLS handshake. The HTTP listener admits no-cert connections so `/health` and `/v1/ready` remain accessible for Kubernetes probes, but all other HTTP endpoints return 401 without a verified client certificate. The metrics listener has no client-auth gate. |
306
+
307
+
Requires `client_auth_ca_file` or `client_auth_ca` to be set when mode is `request` or `required`.
308
+
309
+
```yaml
310
+
runtime:
311
+
tls:
312
+
enabled: true
313
+
certificate_file: /path/to/cert.pem
314
+
key_file: /path/to/key.pem
315
+
client_auth_mode: required
316
+
client_auth_ca_file: /path/to/client-ca.pem
317
+
```
318
+
319
+
### `runtime.tls.client_auth_ca_file`
320
+
321
+
Path to a PEM-encoded CA bundle used to verify client certificates. The file is watched for changes and reloaded atomically alongside the server certificate and key.
322
+
323
+
```yaml
324
+
runtime:
325
+
tls:
326
+
...
327
+
client_auth_ca_file: /path/to/client-ca.pem
328
+
```
329
+
330
+
### `runtime.tls.client_auth_ca`
331
+
332
+
Inline PEM (or `${ secrets:... }`) form of the client CA bundle. Mutually exclusive with `client_auth_ca_file`. Inline material is loaded once at startup and is not hot-reloaded.
333
+
334
+
```yaml
335
+
runtime:
336
+
tls:
337
+
...
338
+
client_auth_ca: |
339
+
-----BEGIN CERTIFICATE-----
340
+
...
341
+
-----END CERTIFICATE-----
342
+
```
343
+
293
344
## `runtime.task_history`
294
345
295
346
The task history section specifies runtime task history configuration. For more details, see the [Task History documentation](../task_history).
0 commit comments