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
flag.StringVar(&cfg.ClientCertFile, "client-tls-cert", "", "TLS certificate files for backend connections, multiple keys may be given comma separated - the order must match the keys")
634
638
flag.DurationVar(&cfg.ClientCertRefreshInterval, "client-tls-cert-refresh-interval", 0, "How often to reload client TLS certificate and key files for backend connections. Defaults to 5 minutes if certificate files are set.")
635
639
// MTLS
640
+
flag.StringVar(&cfg.MtlsAuthnCaFile, "mtls-authn-ca", "", "PEM encoded CA files to use in mtlsAuthn() filter to validate client certificates, multiple files may be given comma separated")
641
+
flag.BoolVar(&cfg.MtlsAuthnAppendCA, "mtls-authn-append-ca", false, "If set to true -mtls-authn-ca will load system CAs, too.")
636
642
flag.BoolVar(&cfg.EnableMTLS, "enable-mtls", false, "Enables MTLS support in the proxy. It uses -client-tls-cert and -client-tls-key as files and rotates the client cert every -client-tls-cert-refresh-interval time.Duration. It only supports one cert and one key file!")
Copy file name to clipboardExpand all lines: docs/operation/operation.md
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,6 +191,63 @@ addresses.
191
191
192
192
## Authentication and Authorization
193
193
194
+
### mTLS
195
+
196
+
Skipper as a proxy supports mTLS as authentication and authorization
197
+
method as client and as server and per route via filters to check the
198
+
data in the validated X509 certificate.
199
+
200
+
#### proxy client to backend
201
+
202
+
To enable proxy client to backend authentication, skipper will create
203
+
an mTLS connection sending its client certificate as its identity to
204
+
the backend such that backends can verify the connection is ok to
205
+
trust.
206
+
207
+
To enable this you need to use `-enable-mtls`, `-client-tls-cert` and
208
+
`-client-tls-key`. Skipper supports only one identity, so only one
209
+
cert+key in the mTLS case. The provided file paths for cert and key
210
+
can be used to rotate cert and key. Skipper will automatically detect
211
+
new data in these files and will reload the TLS client configuration
212
+
to use the new cert and key. Rotation will happen every
213
+
`-client-tls-cert-refresh-interval`, which defaults to `5m`.
214
+
215
+
This configuration will enable mTLS for all connections to all
216
+
backends of the proxy. More advanced configurations are work in
217
+
progress:
218
+
219
+
-https://github.com/zalando/skipper/issues/4072
220
+
-https://github.com/zalando/skipper/issues/4042
221
+
222
+
#### client to proxy server
223
+
224
+
For mTLS to be able to work you need to terminate TLS in skipper. If
225
+
you want to validate client certificates for mTLS connections in
226
+
skipper, it is possible to do so per route.
227
+
228
+
Global configuration is not needed if the system CAs are enough to
229
+
validate all client certificates. If you want to add your own CAs,
230
+
you can use `-mtls-authn-ca="pem1,pem2"` to add your PEM encoded CA
231
+
bundles. If you also want to add the system CAs, too, you can use
232
+
`-mtls-authn-append-ca=true` to load also system bundles.
233
+
234
+
How mTLS authentication and authorization works per route:
235
+
236
+
The client presents the client certificate and Go passes it to the
237
+
http.Request.TLS object that we can process in filters. For example in
238
+
the [`mtlsAuthn()`](../reference/filters.md#mtlsauthn) filter to
239
+
validate client certificates. In order to check more details for authorization, you can add the other mtls filters after the `mtlsAuthn()` filter, like:
0 commit comments