Bug 790555

Summary: rhc-chk false failure reported on ~/.ssh/config overrides
Product: OKD Reporter: Matt Hicks <mhicks>
Component: ocAssignee: Fotios Lindiakos <fotios>
Status: CLOSED UPSTREAM QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: high    
Version: 2.xCC: abhgupta, dmcphers, jkeck, mmcgrath, rmillner, xtian
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-31 00:50:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matt Hicks 2012-02-14 20:20:56 UTC
Description of problem:
Running the rhc-chk command can inaccurately report SSH test failures in the case where a user has overridden SSH configuration in ~/.ssh/config.

Version-Release number of selected component (if applicable):
All client tool versions

How reproducible:
100%


Steps to Reproduce:
1. Create a new user / domain - user1 / user1domain
2. Create a new application with that user.
3. Create a new SSH key using ssh-keygen and call it demo_rsa
4. Upload that new key via the web console
5. Change ~/.ssh/config to add a specific entry for this domain that matches the new domain and uses the demo_rsa key
Host *-user1domain.rhcloud.com
    IdentityFile ~/.ssh/demo_rsa
    VerifyHostKeyDNS yes
    StrictHostKeyChecking no
    UserKnownHostsFile ~/.ssh/libra_known_hosts
6. Verify that 'git push' to your application still works.
7. Run rhc-chk for the new user
  
Actual results:
Two failures are reported on the SSH connectivity because the key is compared with libra_rsa_id, not the key that is used in ~/.ssh/config.

Expected results:
No rhc-chk failures.

Additional info:

Comment 1 Abhishek Gupta 2012-02-14 20:29:56 UTC
Fotios: Not sure if anything changed recently, but I have tested this thoroughly using the CLI tools alone (not uploading keys using the web console) and this test case works. A couple of sprints back when I added the multiple ssh key functionality to the CLI tools, I modified the rhc-chk command to take into consideration the primary as well as any additional keys.

Comment 2 Fotios Lindiakos 2012-02-14 21:03:07 UTC
Matt and I discussed this before and this will fail, but the user wouldn't even know because git/ssh will still work. Our tests/tools only take into account a libra_rsa key or something specified in ~/.openshift/express.conf. But ssh will also parse the ~/.ssh/config and pull the correct key.

Comment 3 Mike McGrath 2012-05-15 16:42:02 UTC
Can we make a decision for this one for this release?  If we're going to make a change lets make it, otherwise close as not a bug.

Comment 4 Fotios Lindiakos 2012-05-31 00:50:36 UTC
This has been converted into US2356 and will be completed in a future sprint.