Bug 1510346 - Secret of null key-value displays messy code when Reveal Secret
Summary: Secret of null key-value displays messy code when Reveal Secret
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 3.7.0
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-07 09:30 UTC by Xingxing Xia
Modified: 2017-11-28 22:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, secrets with null values would display incorrectly when values were revealed on the secret details page. Now the web console will correctly display the secret key as having "No value."
Clone Of:
Environment:
Last Closed: 2017-11-28 22:21:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
the messy code (19.48 KB, image/png)
2017-11-07 09:30 UTC, Xingxing Xia
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description Xingxing Xia 2017-11-07 09:30:32 UTC
Created attachment 1348877 [details]
the messy code

Description of problem:
Secret of null key-value displays messy code when Reveal Secret

Version-Release number of selected component (if applicable):
v3.7.0-0.196.0

How reproducible:
Always

Steps to Reproduce:
1. $ oc secret new secretone /dev/null
2. Go to secret page of "secretone", click "Reveal Secret"
3. In Environment tab of DC page, select above secret under "Environment From" part, then click "View Details" on the right --> "Reveal Secret"

Actual results:
2 & 3: both display messy code, see attachment

Expected results:
2 & 3: display well

Additional info:

Comment 2 openshift-github-bot 2017-11-07 20:53:44 UTC
Commits pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/13b215c971758db8ba73ef1fefeba1abe4d12e0a
Bug 1510346 - Handle null secret values

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1510346

https://github.com/openshift/origin-web-console/commit/eb4047d1b20a27e162b2abc1ae7d9b225ac69fd9
Merge pull request #2465 from spadgett/secret-value-null

Automatic merge from submit-queue.

Bug 1510346 - Handle null secret values

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1510346

/kind bug
/assign @jwforres

Comment 4 Xingxing Xia 2017-11-08 10:05:18 UTC
Tested in v3.7.0-0.198.0, now does not show messy code, only shows empty box.
But, copy something like "aaaa" and click Copy to Clipboard button, it shows Copied, then paste somewhere, it is still "aaaa". Not sure if it is worthy to refine this?

Comment 5 Samuel Padgett 2017-11-08 13:06:08 UTC
For me, it doesn't copy anything. It keeps whatever was on my clipboard previously. Although arguably that is a bug, too.

Comment 6 Samuel Padgett 2017-11-08 13:11:42 UTC
Follow on PR that removes the copy to clipboard button when the value is empty:

https://github.com/openshift/origin-web-console/pull/2478

Comment 7 openshift-github-bot 2017-11-08 14:00:35 UTC
Commits pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/599890b25ae67749e802ccffc6fdcf49a506098d
Bug 1510346 - Don't let users copy empty secret value

Instead of using copy-to-clipboard with an empty value, show "No value" when a
secret value is null.

Follow on fix for https://bugzilla.redhat.com/show_bug.cgi?id=1510346

https://github.com/openshift/origin-web-console/commit/501c413f3f9925923d88af83f15cf0f18222a9b7
Merge pull request #2478 from spadgett/blank-secret

Automatic merge from submit-queue.

Bug 1510346 - Don't let users copy empty secret value

Instead of using copy-to-clipboard with an empty value, show "No value" when a
secret value is null.

Follow on fix for https://bugzilla.redhat.com/show_bug.cgi?id=1510346

/kind bug
/assign @jwforres

Comment 8 Xingxing Xia 2017-11-09 06:30:54 UTC
Thanks, verified in v3.7.4, now both step 2 and step 3 work well (step 2 shows No value without the copy button, step 3 shows empty box, it is OK for me). Regression test of other non-null secrets has no regression issue

Comment 11 errata-xmlrpc 2017-11-28 22:21:49 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/RHSA-2017:3188


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