Bug 1360754 - [RFE] Allow users to add the CA for their named certificates to the generated CA by ansible installer
Summary: [RFE] Allow users to add the CA for their named certificates to the generated...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Andrew Butcher
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-27 12:07 UTC by Kenjiro Nakayama
Modified: 2016-08-18 20:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Administrators can now add the CA for named certificates to the generated CA using the `cafile` option with the openshift_master_named_certificates Ansible variable. For example: openshift_master_named_certificates=[{"certfile": "/path/to/custom1.crt", "keyfile": "/path/to/custom1.key","cafile": "/path/to/ca.crt"}]
Clone Of:
Environment:
Last Closed: 2016-08-18 19:29:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1639 0 normal SHIPPED_LIVE OpenShift Enterprise atomic-openshift-utils bug fix and enhancement update 2016-08-18 23:26:45 UTC

Description Kenjiro Nakayama 2016-07-27 12:07:30 UTC
1. Proposed title of this feature request

[RFE] Allow users to add the CA for their named certificates to the generated CA by ansible installer

3. What is the nature and description of the request?

Same request with https://github.com/openshift/openshift-ansible/issues/1535, but I reported here as Red Hat customer's request.

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

- Upstream has same request - https://github.com/openshift/openshift-ansible/issues/1535
- And they have already testedthe patch mentioned here https://github.com/openshift/openshift-ansible/issues/1535#issuecomment-224187922 (and worked)

10. List any affected packages or components.

- Ansible installer

11. Would the customer be able to assist in testing this functionality if implemented?

- They have already tested above partial patch.

Comment 2 Kenjiro Nakayama 2016-07-27 12:09:41 UTC
> - And they have already testedthe patch mentioned here https://github.com/openshift/openshift-ansible/issues/1535#issuecomment-224187922 (and worked)

Sorry, they means customer and consultant who requested this RFE.

Comment 3 Andrew Butcher 2016-08-09 14:29:30 UTC
This feature was recently added to the master branch of openshift-ansible.

https://github.com/openshift/openshift-ansible/pull/2049

https://trello.com/c/0nKBEzbi

Comment 5 Gaoyun Pei 2016-08-12 05:46:14 UTC
Verify this bug with openshift-ansible-3.2.22-1.git.0.7961a61.el7.noarch.rpm

Specify openshift_master_named_certificates=[{"certfile": "/path/to/custom1.crt", "keyfile": "/path/to/custom1.key","cafile": "/path/to/ca.crt"}] in ansible inventory, after installation, check the named certs setting on master.

[root@openshift-219 ~]# ls /etc/origin/master/named_certificates/
ca.crt  custom1.crt  custom1.key

In /etc/origin/master/master-config.yaml, the named certs info was added correctly, "names" was detected correctly from custom1.crt.
  namedCertificates:
  - certFile: /etc/origin/master/named_certificates/custom1.crt
    keyFile: /etc/origin/master/named_certificates/custom1.key
    names:
    - "master.custom-cert.com"


The ca-bundle.crt works well for the custom name. 
[root@openshift-219 ~]# curl --cacert /etc/origin/master/ca-bundle.crt https://master.custom-cert.com:8443/
{
  "paths": [
    "/api",
    "/api/v1",
    "/apis",
    "/controllers",
    "/healthz",
    "/healthz/ping",
    "/healthz/ready",
    "/metrics",
    "/oapi",
    "/oapi/v1",
    "/swaggerapi/"
  ]

The ca.crt on node also works well
[root@openshift-211 ~]# curl --cacert /etc/origin/node/ca.crt https://master.custom-cert.com:8443/
{
  "paths": [
    "/api",
    "/api/v1",
    "/apis",
    "/controllers",
    "/healthz",
    "/healthz/ping",
    "/healthz/ready",
    "/metrics",
    "/oapi",
    "/oapi/v1",
    "/swaggerapi/"
  ]

Comment 7 errata-xmlrpc 2016-08-18 19:29:58 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:1639


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