Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1595666

Summary: [RFE] etcd with custom cipher-suite
Product: OpenShift Container Platform Reporter: Borja Aranda <farandac>
Component: InstallerAssignee: Vadim Rutkovsky <vrutkovs>
Status: CLOSED ERRATA QA Contact: Gaoyun Pei <gpei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, jokerman, mmccomas, vrutkovs
Target Milestone: ---Keywords: NeedsTestCase
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-11 07:20:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Borja Aranda 2018-06-27 10:13:26 UTC
Description of problem:
With etcd 3.2.22 or higher, the administrator can set a custom cipher-suite list with '--cipher-suites "comma-separated-cipher-list"'

It would be great to bring this to the OCP installer.

Steps to Reproduce:
1. Environment with etcd 3.2.22 or higher

2. Create a new env variable in /etc/etcd/etcd.conf, with a comma-separated cipher list:

~~~
ETCD_CIPHER_SUITES="TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
~~~

* changes should be in https://github.com/openshift/openshift-ansible/blob/master/roles/etcd/templates/etcd.conf.j2

3. Edit the ExecStart in the systemd unit to use this cipher list:

~~~
ExecStart=/bin/bash -c "GOMAXPROCS=$(nproc) /usr/bin/etcd --name=\"${ETCD_NAME}\" --data-dir=\"${ETCD_DATA_DIR}\" --cipher-suites \"${ETCD_CIPHER_SUITES}\" --listen-client-urls=\"${ETCD_LISTEN_CLIENT_URLS}\""
~~~

* I think the playbook should create a new systemd unit in /etc/systemd/... to avoid the default unit file to be overriden by the rpm (which by default overrides /usr/lib/systemd/...)

Expected results:
As an administrator I want to set my etcd cipher-suite list in my ansible host file.

Comment 3 Vadim Rutkovsky 2018-09-05 11:54:27 UTC
PR to implement custom list of ciphers in openshift-ansible master: https://github.com/openshift/openshift-ansible/pull/9883

Comment 5 Gaoyun Pei 2018-09-06 03:39:39 UTC
Verify this bug with openshift-ansible-3.11.0-0.28.0.git.0.730d4be.el7.noarch.rpm

Set etcd_cipher_suites in ansible inventory

etcd_cipher_suites=TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

After installation, check etcd conf file.
[root@ip-172-18-2-210 ~]# grep ETCD_CIPHER_SUITES /etc/etcd/etcd.conf
ETCD_CIPHER_SUITES="TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"

Comment 7 errata-xmlrpc 2018-10-11 07:20:54 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-2018:2652