Bug 1144950

Summary: Console should show error info when adding invalid SSL certificate file.
Product: OpenShift Online Reporter: Yanping Zhang <yanpzhan>
Component: Management ConsoleAssignee: Jessica Forrester <jforrest>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: calfonso, jforrest, jokerman, libra-bugs, libra-onpremise-devel, lmeyer, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1144940 Environment:
Last Closed: 2015-02-18 16:51:02 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:
Bug Depends On:    
Bug Blocks: 1144940    

Description Yanping Zhang 2014-09-22 06:34:27 UTC
+++ This bug was initially created as a clone of Bug #1144940 +++

Description of problem:
On enterprise website, after having added an alias to an app, add an SSL certificate file with invalid content to the alias, click "save" button, it doesn't show any information about whether it's  successful or invalid.

Version-Release number of selected component (if applicable):
ose2.1.z/2014-09-19.2

How reproducible:
always

Steps to Reproduce:
1.Login to enterprise website.Create an app, add an alias to the app, click "save".
2.Under SSL Certificate item, enter the path of file with invalid content(such as f1 with "abcd"), click "save".
3.Add SSL Certificate file in command line.
3.1 $rhc alias update-cert  srb19 rb.test.com --certificate f1  --private-key f2
3.2 $ rhc alias update-cert  srb19 rb.test.com --certificate ~/server.crt  --private-key f.txt

Actual results:
1.Save successfully.
2.Show nothing.
3.Have error info displayed:
3.1 $rhc alias update-cert  srb19 rb.test.com --certificate f1  --private-key f2
Invalid certificate: not enough data
3.2 $ rhc alias update-cert  srb19 rb.test.com --certificate /home/yanping/server.crt  --private-key f1.txt
Invalid private key or pass phrase: Could not parse PKey: no start line


Expected results:
2.Should show info as the command line do : "Invalid certificate: not enough data" or "Invalid private key or pass phrase" under the related form.

Additional info:
If add the alias and invalid SSL Certificate file at the same time on the website, it will show erro info.

Comment 1 Yanping Zhang 2014-09-22 06:36:05 UTC
The bug also exists on devenv_5180.

Comment 2 Jessica Forrester 2014-09-22 17:42:15 UTC
Fixed in https://github.com/openshift/origin-server/pull/5830

Comment 3 openshift-github-bot 2014-09-22 18:38:39 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/4a2aa5bf01a201d63c106bd1858be30a62aa1c7a
Bug 1144950 - Show server-side errors for bad certs

Comment 4 Yanping Zhang 2014-09-23 03:23:37 UTC
Verified on devenv_5183. 
Steps to verify:
1.Login the env, Create an app, add an alias to the app, click "save".
2.Under SSL Certificate item, enter the path of file with invalid content, click "save".
Actual results:
When certificate file is invalid, next to the form prompt:Invalid certificate: not enough data.
When key file is invalid, next to the form prompt:Invalid private key or pass phrase: Could not parse PKey: no start line.

Works as expected, so change status to verified.THX!