Bug 1735363 - must-gather should redact kubectl.kubernetes.io/last-applied-configuration in secrets
Summary: must-gather should redact kubectl.kubernetes.io/last-applied-configuration in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.1.z
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.1.z
Assignee: Luis Sanchez
QA Contact: zhou ying
URL:
Whiteboard:
Depends On: 1723472
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-31 20:19 UTC by Luis Sanchez
Modified: 2019-09-10 15:59 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1723472
Environment:
Last Closed: 2019-09-10 15:59:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift must-gather pull 116 0 None None None 2019-07-31 22:29:00 UTC
Red Hat Product Errata RHSA-2019:2594 0 None None None 2019-09-10 15:59:38 UTC

Description Luis Sanchez 2019-07-31 20:19:11 UTC
+++ This bug was initially created as a clone of Bug #1723472 +++

Description of problem:
Some secret data is redacted but annotations are kept.  This means the encoded secret is gathered.

Version-Release number of selected component (if applicable):
oc version: v4.1.0+515979d-839-dirty
(note this is the version reported by oc binary from quay.io/openshift/origin-cli:4.2.0)

How reproducible:
Every time

Steps to Reproduce:
1. Get latest 4.2.0 cli from quay.io/openshift/origin-cli:4.2.0
2. Login to v4 cluster as kubeadmin
3. Run `oc adm must-gather`

Actual results:
Annotation "kubectl.kubernetes.io/last-applied-configuration" with passwords are not redacted.  

Expected results:
Annotation "kubectl.kubernetes.io/last-applied-configuration" with passwords are redacted along with the secret data.

Additional info:
Example of this is secret for LDAP bindPassword created in openshift-config namespace.  Both this secret and the copy of the secret in openshift-authentication have the encoded "bindPassword" value in annotation "kubectl.kubernetes.io/last-applied-configuration" in the must-gather output.

--- Additional comment from Luis Sanchez on 2019-07-31 20:03:51 UTC ---

https://github.com/openshift/must-gather/pull/115

Comment 2 zhou ying 2019-08-26 03:28:49 UTC
Confirmed with payload 4.1.0-0.nightly-2019-08-25-164016, the issue has fixed:
  metadata:
    annotations:
      kubectl.kubernetes.io/last-applied-configuration: ""

Comment 4 errata-xmlrpc 2019-09-10 15:59:27 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-2019:2594


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