Bug 1509142

Summary: Should not display the "Reveal Secret" link when secrets without 'data' field
Product: OpenShift Container Platform Reporter: shahan <hasha>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 3.7.0CC: aos-bugs, jhadvig, jokerman, mmccomas, spadgett
Target Milestone: ---   
Target Release: 3.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-07 14:27:11 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:

Description shahan 2017-11-03 07:52:37 UTC
Description of problem:
 Should not display the "Reveal Secret" link when secrets without 'data' field

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

How reproducible:
  Always

Steps to Reproduce:
1. Login in web console with ASB deployed, provision serviceclass "Etherpad (APB)" and create binding
2. Enter the secrets page of the binding 


Actual results:
2.  Try clicking the "Reveal Secret" link, there will be nothing to show. Cause there is no 'data' field in the secret yaml file.
$ oc get secret rh-etherpad-apb-2nrnh-credentials-djei3 -o yaml
apiVersion: v1
kind: Secret
metadata:
  creationTimestamp: '2017-11-03T06:54:47Z'
  name: rh-etherpad-apb-2nrnh-credentials-djei3
  namespace: hasha-pro1
  ownerReferences:
    - apiVersion: servicecatalog.k8s.io/v1beta1
      blockOwnerDeletion: true
      controller: true
      kind: ServiceBinding
      name: rh-etherpad-apb-2nrnh-t6n27
      uid: 92a1ffd3-c063-11e7-9c4f-0a580a810003
  resourceVersion: '33542'
  selfLink: >-
    /api/v1/namespaces/hasha-pro1/secrets/rh-etherpad-apb-2nrnh-credentials-djei3
  uid: e19acbca-c063-11e7-a470-fa163e040adc
type: Opaque


Expected results:
2.  Should have an annotation to indicate that no data in the secret instead of display the "Reveal Secret" link when secrets without 'data' field.

Additional info:

Comment 1 openshift-github-bot 2017-11-03 16:46:54 UTC
Commits pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/acd3cd3f94f475db935277ae45daa91fdfc2cd40
Bug 1509142 - Should not display the 'Reveal Secret' link when secrets without 'data' field

https://github.com/openshift/origin-web-console/commit/1b45672006a79e4a9b8cbe5035800d66194d784b
Merge pull request #2448 from jhadvig/secret-data

Automatic merge from submit-queue.

Bug 1509142 - Should not display the 'Reveal Secret' link when secret is without 'data' field

@spadgett PTAL

Comment 3 shahan 2017-11-07 03:00:43 UTC
Checked this issue on the OCP v3.7.0-0.196.0, it has been fixed. There will have kindly warning as well as disabled the "add to application" button. Changed to verified status.