Bug 1601496

Summary: openshift master logs is printing the plain text password of the StorageClass secret
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: mmariyan
Component: kubernetesAssignee: Humble Chirammal <hchiramm>
Status: CLOSED ERRATA QA Contact: Ashmitha Ambastha <asambast>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.0CC: aos-bugs, aos-storage-staff, hchiramm, hekumar, jialiu, jokerman, kramdoss, madam, mawong, mmariyan, mmccomas, nberry, rgeorge, rhs-bugs, sankarshan, xtian
Target Milestone: ---Keywords: ZStream
Target Release: OCS 3.11.1   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/openshift/origin/pull/20756
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-07 06:14:16 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: 1641915, 1644156    

Comment 1 Hemant Kumar 2018-07-16 18:16:36 UTC
Fixed here - https://github.com/kubernetes/kubernetes/pull/59466 . Guess we need to backport it.

Comment 5 Humble Chirammal 2018-07-18 15:23:47 UTC
Thanks Matthew and Hemanth for finding the upstream patch and and also backporting to 3.9. 

Brad, in SC, its just secret name, however later in the code path all configuration for provisioner was logged which is hided now by mentioned patch.

Comment 27 Ashmitha Ambastha 2018-11-21 12:26:18 UTC
Hi, 

On OCP 3.11 with OCS 3.11.1(latest available builds), 

# oc version
oc v3.11.16
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://dhcp46-189.lab.eng.blr.redhat.com:8443
openshift v3.11.16
kubernetes v1.11.0+d4cacc0

Created a pvc using the gluster-sc storage class. 

# oc get sc 
NAME                       PROVISIONER                AGE
glusterfs-registry-block   gluster.org/glusterblock   36d
glusterfs-sc               kubernetes.io/glusterfs    5h
glusterfs-storage          kubernetes.io/glusterfs    1d
# oc get pvc
NAME              STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS        AGE
pvc-bug-1         Bound     pvc-65ca25b6-ed5a-11e8-aec7-005056a528b6   4Gi        RWO            glusterfs-sc        5h
pvc-bug-2         Bound     pvc-a88ef5a3-ed78-11e8-aec7-005056a528b6   5Gi        RWO            glusterfs-sc        1h
pvc-bug-3         Bound     pvc-0ef48781-ed85-11e8-bae2-005056a528b6   2Gi        RWO            glusterfs-sc        22m

On checking in the master-controller logs, HEKETI_ADMIN_KEY value can be found. 

------------- Snippet from master-controller logs --------

EnvFrom:[]v1.EnvFromSource(nil), Env:[]v1.EnvVar{v1.EnvVar{Name:"HEKETI_USER_KEY", Value:"heketiuserkey", ValueFrom:(*v1.EnvVarSource)(nil)}, v1.EnvVar{Name:"HEKETI_ADMIN_KEY", Value:"adminkey", ValueFrom:(*v1.EnvVarSource)(nil)}, v1.EnvVar{Name:"HEKETI_EXECUTOR", Value:"kubernetes", ValueFrom:(*v1.EnvVarSource)(nil)}, v1.EnvVar{Name:"HEKETI_FSTAB", Value:"/var/lib/heketi/fstab"

------------- End of snippet -------------------------

Moving this bug back to assigned state.

Comment 33 errata-xmlrpc 2019-02-07 06:14:16 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/RHEA-2019:0291