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

Error when trying to edit secret with invalid base64 strings

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.19.z, 4.20.z, 4.21.z, 4.22
    • Management Console
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      When trying to edit a secret with invalid base64 values via button "Actions", then "Edit Secret", an error "Something wrong happened" is shown, except when the field with the invalid value is the last in the list.
      
      When clicking on "Show details" on the error message, the following information is shown.
      
      Component trace:
      
      I@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1532549
      div
      j@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:582275
      P@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:582762
      b@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1521554
      p@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1549371
      N@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:52239
      ne@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:57663
      Suspense
      i@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:359205
      m
      section
      m@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:360695
      B@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1270119
      main
      div
      div
      div
      a@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:264014
      d@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:262826
      div
      c@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:261161
      div
      div
      b@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:352526
      div
      u@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:495622
      div
      a@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:263351
      div
      div
      a@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:264014
      d@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:262826
      div
      c@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:261161
      A@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1189401
      c@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1188779
      div
      a@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:263351
      div
      div
      a@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:264014
      d@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:262826
      div
      c@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:261161
      br@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:122327
      i@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:53801
      k@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/quick-start-chunk-2a1073c2b8da75a1b5ee.min.js:1:1317
      p@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1549371
      p@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:53046
      ge@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1282244
      Qe@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:2:81150
      ge@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1282244
      ge@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1282244
      ge@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1282244
      u@https://console-openshift-console.apps.tdsynnex.rhlab.ch/api/plugins/kubevirt-plugin/exposed-modalProvider-chunk-4730c456ef3df5018695.min.js:1:414
      ge@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1282244
      ge@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1282244
      b@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:184074
      f@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:182958
      a@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:16446
      d@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:18645
      ve@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1282382
      fe@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1285550
      N@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:52239
      ne@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:57663
      N@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:52239
      ne@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:57663
      te@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:57146
      X@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:45033
      t@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:66523
      be@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1285827
      g@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:588942
      c@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:157195
      e@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2933849
      v@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1263036
      u@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:19485
      Suspense
      
      Stack trace:
      
      @https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1532964
      I@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:1532893
      so@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2867160
      $a@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2919007
      Il@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2906357
      El@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2906285
      Sl@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2906146
      vl@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2903143
      822551/Ki/<@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2853088
      307463/t.unstable_runWithPriority@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:3167369
      Gi@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2852865
      Ki@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2853035
      Wi@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2852968
      yl@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/vendors~main-chunk-93837-51729aab8176600c09a5.min.js:52:2903464
      notify@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:29233
      notifyNestedSubs@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:29642
      i@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:29073
      v@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:82398
      901265/r/</</<@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:79844
      dispatch@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/77014-bundle-7a031b4eaed39f88b340.min.js:2:85575
      721007/T/</f/<@https://console-openshift-console.apps.tdsynnex.rhlab.ch/static/main-bundle-0751ab4c8bd2480f96af.min.js:1:173943

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

          

      How reproducible:

      Always

      Steps to Reproduce:

      1. Create a secret with, e.g., the following content. Please note that it does not matter whether the secret is created using the "data" or "stringData" field.
      
      $ oc apply -f - << EOF
      kind: Secret
      apiVersion: v1
      metadata:
        name: test-encoded
      data:
        keystore-password: Zml4bWU=
        keystore.p12: Zml4bWU=
        truststore-password: Zml4bWU=
        truststore.p12: Zml4bWU=
      type: Opaque
      EOF
      
      2. Edit the secret and change one of the values to an invalid base64 value:
      
      $ oc patch secret/example -p '{"data":{"keystore-password":"Zml4asdfbWU="}}'
      
      3. Open the secret in OpenShift's web console, click on button "Actions" and choose "Edit Secret"

      Actual results:

      Error message as described under problem description appears.

      Expected results:

      View for editing the secret appears. In case of invalid base64 values, the informatoin "Non-printable file detected." is displayed.

      Additional info:

      Note that the issue cannot be triggered if the invalid base64 value is the last key/value pair in the secret's list.

              jhadvig@redhat.com Jakub Hadvig
              rh-ee-baffolte Benjamin Affolter
              YaDan Pei YaDan Pei
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: