Bug 1289387 - Director haproxy.conf Options
Summary: Director haproxy.conf Options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-puppet-modules
Version: 7.0 (Kilo)
Hardware: All
OS: Linux
high
high
Target Milestone: async
: 8.0 (Liberty)
Assignee: Juan Antonio Osorio
QA Contact: Marius Cornea
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-08 00:43 UTC by Chris Lincoln
Modified: 2020-04-15 14:19 UTC (History)
22 users (show)

Fixed In Version: openstack-puppet-modules-7.0.19-1.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-14 19:51:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 319865 0 None MERGED Make cipher suite and SSL options configurable 2021-01-05 13:42:39 UTC
Red Hat Product Errata RHBA-2016:1228 0 normal SHIPPED_LIVE openstack-puppet-modules bug fix advisory 2016-06-14 23:50:58 UTC

Description Chris Lincoln 2015-12-08 00:43:16 UTC
Description of problem:
Due to concern over POODLE vulnerability and weak ciphers, customer is configuring haproxy.conf options such as the following example after the deployment of the Overcloud:

listen ceilometer
bind 172.22.216.2:13777 ssl crt /etc/pki/instack-certs/undercloud.pem ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3
  bind 172.22.216.3:8777 
  server 172.22.216.1 172.22.216.1:8777 check fall 5 inter 2000 rise 2

What kind of SSL/TLS ciphers, etc. are configured by default? Is it possible to make variables such as no-sslv3 or specific ciphers configurable options?

Comment 12 James Slagle 2016-02-10 22:01:23 UTC
this can be set by passing some hieradata via the ExtraConfig parameter in an environment file:

parameter_defaults:
  ExtraConfig:
    'tripleo::loadbalancer::haproxy_listen_bind_param': 'ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3'

Note that by default, 'tripleo::loadbalancer::haproxy_listen_bind_param' is set to 'transparent'[1], so if you still want that parameter as well, it would look like:

parameter_defaults:
  ExtraConfig:
    'tripleo::loadbalancer::haproxy_listen_bind_param': 'transparent ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3'

Note that this is going to set the bind options on both bind lines in each listen section, resulting in haproxy config that looks like (just an example):

listen ceilometer
  bind 172.16.2.4:8777 ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3
  bind 192.0.3.30:8777 ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3
  server overcloud-controller-0 172.16.2.6:8777 check fall 5 inter 2000 rise 2
  server overcloud-controller-1 172.16.2.8:8777 check fall 5 inter 2000 rise 2
  server overcloud-controller-2 172.16.2.9:8777 check fall 5 inter 2000 rise 2

I don't forsee that causing any issues (when ssl is not used, the ciphers parameter is ignored).

[1] http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#5.1-transparent

Comment 13 Ryan Brown 2016-02-24 13:50:09 UTC
I'm not an expert in optimal SSL/TLS configs, but Mozilla security provides a tool that has different (sane) configs for old clients, intermediate, and modern clients[1]. I think giving users different presets (like in [1]) would be really helpful for customers, since I can't imagine most users knowing exactly what ciphers they do and don't trust. It seems more likely they'd say "I want to use only the most secure ciphers available, whichever those happen to be".

1: https://mozilla.github.io/server-side-tls/ssl-config-generator/ (see haproxy section)

Comment 15 Felipe Alfaro Solana 2016-03-03 11:24:56 UTC
Does it make sense to use "controllerExtraConfig" instead of "ExtraConfig"? AFAIK, "controllerExtraConfig" only applies to controller nodes while "ExtraConfig" applies to all nodes.

Comment 16 Guillaume Chenuet 2016-03-03 15:55:31 UTC
(In reply to James Slagle from comment #12)
> this can be set by passing some hieradata via the ExtraConfig parameter in
> an environment file:
> 
> parameter_defaults:
>   ExtraConfig:
>     'tripleo::loadbalancer::haproxy_listen_bind_param': 'ciphers
> ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:
> DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3'
> 
> Note that by default, 'tripleo::loadbalancer::haproxy_listen_bind_param' is
> set to 'transparent'[1], so if you still want that parameter as well, it
> would look like:
> 
> parameter_defaults:
>   ExtraConfig:
>     'tripleo::loadbalancer::haproxy_listen_bind_param': 'transparent ciphers
> ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:
> DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3'
> 
> Note that this is going to set the bind options on both bind lines in each
> listen section, resulting in haproxy config that looks like (just an
> example):
> 
> listen ceilometer
>   bind 172.16.2.4:8777 ciphers
> ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:
> DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3
>   bind 192.0.3.30:8777 ciphers
> ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:
> DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3
>   server overcloud-controller-0 172.16.2.6:8777 check fall 5 inter 2000 rise
> 2
>   server overcloud-controller-1 172.16.2.8:8777 check fall 5 inter 2000 rise
> 2
>   server overcloud-controller-2 172.16.2.9:8777 check fall 5 inter 2000 rise
> 2
> 
> I don't forsee that causing any issues (when ssl is not used, the ciphers
> parameter is ignored).
> 
> [1]
> http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#5.1-transparent

As Felipe Alfaro Solana observed, "tripleo::loadbalancer::haproxy_listen_bind_param" expect a list and not a string.

On loadbalancer.pp:
A list of params to be added to the HAProxy listener bind directive. By
default the 'transparent' param is added but it should be cleared if
one of the *_virtual_ip addresses is a wildcard, eg. 0.0.0.0
Defaults to [ 'transparent' ]

Thanks for this information Felipe.

Comment 17 Marius Cornea 2016-03-28 16:43:15 UTC
I tested this on OSP8 and passing the following environment file:

parameter_defaults:
  controllerExtraConfig:
    'tripleo::loadbalancer::haproxy_listen_bind_param': 
      - 'transparent'
      - 'ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS'
      - 'no-sslv3'


resulted in:

listen ceilometer
  bind 172.16.20.10:8777 transparent ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3
  bind 172.16.23.10:13777 transparent ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS no-sslv3 ssl crt /etc/pki/tls/private/overcloud_endpoint.pem
  server overcloud-controller-0 172.16.20.13:8777 check fall 5 inter 2000 rise 2

Comment 21 Hugh Brock 2016-05-23 11:12:30 UTC
Moving this bug to Juan Osorio who may actually know the answer.

Comment 22 Juan Antonio Osorio 2016-05-23 11:19:24 UTC
It is possible to set the cipher options and ssl options with the following parameters from puppet-tripleo (which can be passed via hiera data). There parameters are https://github.com/openstack/puppet-tripleo/blob/master/manifests/loadbalancer.pp#L127 and https://github.com/openstack/puppet-tripleo/blob/master/manifests/loadbalancer.pp#L133 respectively and set these options:       'ssl-default-bind-ciphers', 'ssl-default-bind-options'.

We are not using the HAProxy defaults, and have defaults that come from the Fedora system crypto policy.

Comment 25 Juan Antonio Osorio 2016-05-23 11:43:39 UTC
backport to OSP8 submitted

Comment 28 errata-xmlrpc 2016-06-14 19:51:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1228


Note You need to log in before you can comment on or make changes to this bug.