Bug 1187812 - The '--ssl-client-key-file' option does not write to servers.yml
Summary: The '--ssl-client-key-file' option does not write to servers.yml
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1203435
TreeView+ depends on / blocked
 
Reported: 2015-01-30 21:54 UTC by Timothy Williams
Modified: 2019-04-16 14:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1203435 (view as bug list)
Environment:
Last Closed: 2015-03-05 19:57:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Timothy Williams 2015-01-30 21:54:14 UTC
Description of problem:
When running rhc setup with the '--ssl-client-key-file' option, the configuration for the ssl client key file is not written to the servers.yml file.

Version-Release number of selected component (if applicable):
rhc 1.34.2

How reproducible:
Always


Steps to Reproduce:
1. Provide the `rhc setup` command with a client key file:
    $ rhc setup --ssl-client-cert-file example.crt --ssl-client-key-file example.key
2. 
3.

Actual results:
Certificate file (among other options) are written to servers.yml, but the ssl client key file is not:
- server:
    hostname: broker.example.com
    nickname: example
    login: tiwillia
    use_authorization_tokens: true
    insecure: true
    ssl_client_cert_file: /home/tiwillia/example.crt


Expected results:
Both certificate and key file are written to servers.yml:
- server:
    hostname: broker.example.com
    nickname: example
    login: tiwillia
    use_authorization_tokens: true
    insecure: true
    ssl_client_cert_file: /home/tiwillia/example.crt
    ssl_client_key_file: /home/tiwillia/example.key

Comment 1 XiuJuan Wang 2015-02-02 04:53:16 UTC
Could reproduce this issue with rhc-1.34.2

And if use ‘server add’ a server with '--ssl-client-key-file' option
, the key could be written into server.yml, but can't list this parameter using 'server list'

issue:

$cat server.yml
 - server:
     hostname: broker.example.com
     nickname: example
     login: xiuwang
     use_authorization_tokens: true
     insecure: true
     ssl_client_key_file: /home/.openshift/example.key

$rhc server list 
Server 'example' (in use)
----------------------
  Hostname:        broker.example.com
  Login:           xiuwang
  Use Auth Tokens: true
  Insecure:        true

Comment 2 Fabiano Franz 2015-02-02 19:40:09 UTC
Fixed in https://github.com/openshift/rhc/pull/671

Comment 3 XiuJuan Wang 2015-02-03 09:36:51 UTC
Test with rhc-1.35.0_build from lastest code

When 'rhc setup' could writte '--ssl-client-key-file' value into server.yml, but still can't 'server list' this parameter.


$cat server.yml
 - server:
     hostname: broker.example.com
     nickname: example
     login: xiuwang
     use_authorization_tokens: true
     insecure: true
     ssl_client_key_file: /home/.openshift/example.key

$rhc server list 
Server 'example' (in use)
----------------------
  Hostname:        broker.example.com
  Login:           xiuwang
  Use Auth Tokens: true
  Insecure:        true

Comment 4 Fabiano Franz 2015-02-03 22:17:51 UTC
Fixed in https://github.com/openshift/rhc/pull/671

Comment 5 XiuJuan Wang 2015-02-04 03:29:39 UTC
Verified with rhc-1.35.0 build with code in https://github.com/openshift/rhc/pull/671
Could also 'server list' '--ssl-client-key-file' value.

Server 'server1' (in use)
-------------------------
  Hostname:                 ec2-54-166-108-190.compute-1.amazonaws.com
  Login:                    xiuwang
  Use Auth Tokens:          true
  Insecure:                 true
  SSL x509 Client Key File: /root/.openshift/cert/server.key

Thanks!

Comment 6 openshift-github-bot 2015-02-07 05:28:30 UTC
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/3a2a5a9dd8c37b940580742aef8132e16858f755
Bug 1187812 - must handle ssl_client_key_file in config files


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