Bug 1879638 - Binary file uploaded to a secret in OCP 4 GUI is not properly converted to Base64-encoded string
Summary: Binary file uploaded to a secret in OCP 4 GUI is not properly converted to Ba...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.8.0
Assignee: Joe Caiani
QA Contact: Siva Reddy
URL:
Whiteboard:
Depends On:
Blocks: 1939553
TreeView+ depends on / blocked
 
Reported: 2020-09-16 17:23 UTC by Rejeeb
Modified: 2024-03-25 16:30 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: after 4.x we stopped supporting bin files for secrets Consequence: in 4.8 we've added this ability back to the console Fix: support binary files for secret values Result:
Clone Of:
: 1939553 (view as bug list)
Environment:
Last Closed: 2021-07-27 22:33:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
OriginalSecret (2.19 KB, text/plain)
2021-03-16 22:38 UTC, Siva Reddy
no flags Details
binary file (25.93 KB, text/plain)
2021-03-16 22:39 UTC, Siva Reddy
no flags Details
yaml output (35.07 KB, text/plain)
2021-03-16 22:39 UTC, Siva Reddy
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 7399 0 None open Bug 1879638: Support binary file type secret entries 2021-02-15 20:27:19 UTC
Red Hat Knowledge Base (Solution) 5415211 0 None None None 2020-10-27 12:23:36 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:33:45 UTC

Description Rejeeb 2020-09-16 17:23:35 UTC
Description of problem:
A binary file when uploaded to a secret via OCP 4.x GUI, it is not properly converted to a Base64-encoded string. Whereas in OCP 3.11 GUI/CLI, had verified that when a secret value contains non-printable characters, it is converted properly as a Base64-encoded string.

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

How reproducible:
100%

Steps to Reproduce:
1. Login to the GUI and create a generic key value secret using a binary file.
2. Now create a generic key value secret using the same binary file through CLI.

Actual results:
Secrets created using same binary files are providing different Base64-encoded string.

Expected results:
Both CLI and GUI should provide correct Base64-encoded string for a secret based on a binary file.

Comment 2 Samuel Padgett 2020-09-17 14:09:45 UTC
I believe the underlying issue that we read the file as text, which won't work for binary files: `reader.readAsText(file, 'UTF-8')`

https://github.com/spadgett/console/blob/3c1e88824e28cff26a472a95041f4c892f01b042/frontend/public/components/utils/file-input.tsx#L39

Comment 3 Jakub Hadvig 2020-10-02 15:27:52 UTC
In the middle of the fixing process. Will fix next sprint.

Comment 4 Jakub Hadvig 2020-10-23 13:19:57 UTC
Still working on this issue.

Comment 5 akretzsc 2020-11-05 19:25:53 UTC
Jakub,

Do you have any update to share on this bug please?

Comment 6 Jakub Hadvig 2020-11-13 10:30:15 UTC
Hey Alex,
we are still working on this issue. To be honest we have't got time to address it yet since we are on feature work.
But Im confident it will get solved this sprint.

Comment 7 Joe Caiani 2020-12-04 20:38:04 UTC
pr is up for review, will complete in upcoming sprint

Comment 12 Siva Reddy 2021-03-16 22:38:45 UTC
Created attachment 1763852 [details]
OriginalSecret

Comment 13 Siva Reddy 2021-03-16 22:39:11 UTC
Created attachment 1763853 [details]
binary file

Comment 14 Siva Reddy 2021-03-16 22:39:40 UTC
Created attachment 1763854 [details]
yaml output

Comment 16 Siva Reddy 2021-03-24 04:47:19 UTC
retested using correct binary file and it works as intended.
  hence moving to verified.

Comment 25 errata-xmlrpc 2021-07-27 22:33: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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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-2021:2438


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