Skip to content

Commit 982aed8

Browse files
committed
Fixes as per @knobunc review comments.
1 parent a10557d commit 982aed8

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

images/router/haproxy/conf/haproxy-config.template

+6-7
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,11 @@ frontend fe_sni
237237
# requests if the DN field in the client certificate doesn't match that value.
238238
# Please note that this match is a subset (substring) match.
239239
# Example: For DN set to: /CN=header.test/ST=CA/C=US/O=Security/OU=OpenShift3,
240-
# A. ROUTER_MUTUAL_TLS_AUTH_FILTER="header.test" would match the
241-
# DN field and the request will be passed on to the backend.
240+
# A. ROUTER_MUTUAL_TLS_AUTH_FILTER="header.test" OR
241+
# ROUTER_MUTUAL_TLS_AUTH_FILTER="head" OR
242+
# ROUTER_MUTUAL_TLS_AUTH_FILTER="/CN=header.test/ST=CA/C=US/O=Security/OU=OpenShift3" /* exact match example */
243+
# the filter would match the DN field (substring or exact match)
244+
# and the request will be passed on to the backend.
242245
# B. ROUTER_MUTUAL_TLS_AUTH_FILTER="legacy-web-client", the request
243246
# will be rejected.
244247
acl cert_cn_matches ssl_c_s_dn -m sub {{.}}
@@ -302,11 +305,7 @@ frontend fe_no_sni
302305
# If a mutual TLS auth subject filter environment variable is set, we deny
303306
# requests if the DN field in the client certificate doesn't match that value.
304307
# Please note that this match is a subset (substring) match.
305-
# Example: For DN set to: /CN=header.test/ST=CA/C=US/O=Security/OU=OpenShift3,
306-
# A. ROUTER_MUTUAL_TLS_AUTH_FILTER="header.test" would match the
307-
# DN field and the request will be passed on to the backend.
308-
# B. ROUTER_MUTUAL_TLS_AUTH_FILTER="legacy-web-client", the request
309-
# will be rejected.
308+
# See the config section 'frontend fe_sni' for examples.
310309
acl cert_cn_matches ssl_c_s_dn -m sub {{.}}
311310
http-request deny unless cert_cn_matches
312311
{{- end }}

pkg/oc/admin/router/router.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ type RouterConfig struct {
237237
Local bool
238238

239239
// MutualTLSAuth controls access to the router using a mutually agreed
240-
// upon TLS authentication mechanism (ala client certificates).
240+
// upon TLS authentication mechanism (example client certificates).
241241
// One of: required | optional | none - the default is none.
242242
MutualTLSAuth string
243243

@@ -334,7 +334,7 @@ func NewCmdRouter(f kcmdutil.Factory, parentName, name string, out, errout io.Wr
334334
cmd.Flags().BoolVar(&cfg.StrictSNI, "strict-sni", cfg.StrictSNI, "Use strict-sni bind processing (do not use default cert). Not supported for F5.")
335335
cmd.Flags().BoolVar(&cfg.Local, "local", cfg.Local, "If true, do not contact the apiserver")
336336

337-
cmd.Flags().StringVar(&cfg.MutualTLSAuth, "mutual-tls-auth", cfg.MutualTLSAuth, "Controls access to the router using mutually agreed upon TLS configuration (ala client certificates). You can choose one of 'required', 'optional', or 'none'. The default is none.")
337+
cmd.Flags().StringVar(&cfg.MutualTLSAuth, "mutual-tls-auth", cfg.MutualTLSAuth, "Controls access to the router using mutually agreed upon TLS configuration (example client certificates). You can choose one of 'required', 'optional', or 'none'. The default is none.")
338338
cmd.Flags().StringVar(&cfg.MutualTLSAuthCA, "mutual-tls-auth-ca", cfg.MutualTLSAuthCA, "Optional path to a file containing one or more CA certificates used for mutual TLS authentication. The CA certificate[s] are used by the router to verify a client's certificate.")
339339
cmd.Flags().StringVar(&cfg.MutualTLSAuthCRL, "mutual-tls-auth-crl", cfg.MutualTLSAuthCRL, "Optional path to a file containing the certificate revocation list used for mutual TLS authentication. The certificate revocation list is used by the router to verify a client's certificate.")
340340
cmd.Flags().StringVar(&cfg.MutualTLSAuthFilter, "mutual-tls-auth-filter", cfg.MutualTLSAuthFilter, "Optional value to filter the client certificates. If the client certificate subject field does _not_ contain (substring match) this value, requests will be rejected by the router.")

0 commit comments

Comments
 (0)