Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-36173

Secret key with binary file changes when edited via Console

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 4.15.z
    • Management Console
    • None
    • Important
    • Yes
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      When modifying a secret in the Management Console that has a binary file included (such as a keystore), the binary file will get corrupted post the modification and therefore impact application functionality (as the keystore can not be read).
      
      This is a regression of:
      Bugs for 4.12 / 4.13 / 4.14:
      
      https://issues.redhat.com/browse/OCPBUGS-10844
      https://issues.redhat.com/browse/OCPBUGS-17530
      https://issues.redhat.com/browse/OCPBUGS-16040
      
      Bug for 4.16:
      https://issues.redhat.com/browse/OCPBUGS-32401
      
      
      

      Version-Release number of selected component (if applicable):

          OCP 4.15.16

      How reproducible:

      always

      Steps to Reproduce:

      1. Create a new dummy file
        $ head -c 1k /dev/urandom > test.bin
      2. Create new secret from file:
        $ oc create secret generic dummy -n <namespace> --from-file=file=./test.bin
      3. Check the secret, and take a backup
        $ oc get secret dummy -n <namespace> -o yaml > secret-orig.yaml
      4. Open OCP console, Go to Workload --> Secret --> Select project --> Click on dummy secret -->Action --> Edit secret --> Save it without changing anything
      5. Check the secret again, and take a backup
        $ oc get secret dummy -n <namespace> -o yaml > secret-after-edit.yaml
      6. Diff shows changes to the file in the secret
        $ diff secret-orig.yaml secret-after-edit.yaml

      Actual results:

          There is a file DIFF between secret-orig.yaml secret-after-edit.yaml

      Expected results:

      The binary file though should not be modified if no changes was made on it's value, when editing the secret in the Management Console.

      Additional info:

          In https://issues.redhat.com/browse/OCPBUGS-32401 this was also identified for 4.16. However I believe this should be fixed, as if this is a regression.

              rh-ee-jonjacks Jon Jackson
              rhn-support-ctawfik Chris Tawfik
              Xiyun Zhao Xiyun Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: