Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfigMap: add options to set ssl-engine and ssl-mode-async #269

Merged
merged 1 commit into from
Jan 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,9 @@ The following parameters are supported:
||[`ssl-ciphers`](#ssl-ciphers)|colon-separated list|[link to code](https://github.com/jcmoraisjr/haproxy-ingress/blob/v0.6/pkg/controller/config.go#L40)|
||[`ssl-dh-default-max-size`](#ssl-dh-default-max-size)|number|`1024`|
||[`ssl-dh-param`](#ssl-dh-param)|namespace/secret name|no custom DH param|
||[`ssl-engine`](#ssl-engine)|OpenSSL engine name and parameters|no engine set|
||[`ssl-headers-prefix`](#ssl-headers-prefix)|prefix|`X-SSL`|
||[`ssl-mode-async`](#ssl-engine)|[true\|false]|`false`|
||[`ssl-options`](#ssl-options)|space-separated list|`no-sslv3` `no-tls-tickets`|
||[`ssl-redirect`](#ssl-redirect)|[true\|false]|`true`|
||[`stats-auth`](#stats)|user:passwd|no auth|
Expand Down Expand Up @@ -743,6 +745,19 @@ resulting secret.

http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#3.1-ssl-dh-param-file

### ssl-engine

Set the name of the OpenSSL engine to use. The string shall include the engine name
and its parameters.

Additionally, ssl-mode-async can be set to enable asynchronous TLS I/O operations if
the ssl-engine used supports it.

Reference:

* http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#ssl-engine
* http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#ssl-mode-async

### ssl-headers-prefix

Define the http header prefix that should be used with certificate parameters such as
Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ func newHAProxyConfig(haproxyController *HAProxyController) *types.HAProxyConfig
CookieKey: "Ingress",
StrictHost: true,
DynamicScaling: false,
SSLEngine: "",
SSLModeAsync: false,
StatsSocket: "/var/run/haproxy-stats.sock",
UseProxyProtocol: false,
StatsProxyProtocol: false,
Expand Down
2 changes: 2 additions & 0 deletions pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ type (
CookieKey string `json:"cookie-key"`
StrictHost bool `json:"strict-host"`
DynamicScaling bool `json:"dynamic-scaling"`
SSLEngine string `json:"ssl-engine"`
SSLModeAsync bool `json:"ssl-mode-async"`
StatsSocket string
UseProxyProtocol bool `json:"use-proxy-protocol"`
StatsProxyProtocol bool `json:"stats-proxy-protocol"`
Expand Down
6 changes: 6 additions & 0 deletions rootfs/etc/haproxy/template/haproxy.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ global
ssl-dh-param-file {{ $cfg.SSLDHParam.Filename }}
{{- else }}
tune.ssl.default-dh-param {{ $cfg.SSLDHParam.DefaultMaxSize }}
{{- end }}
{{- if ne $cfg.SSLEngine "" }}
ssl-engine {{ $cfg.SSLEngine }}
{{- if $cfg.SSLModeAsync }}
ssl-mode-async
{{- end }}
{{- end }}
ssl-default-bind-ciphers {{ $cfg.SSLCiphers }}
ssl-default-bind-options {{ $cfg.SSLOptions }}
Expand Down