Bug 1814806

Summary: [Ceph-dashboard] Error when enabling SSO with certificate file
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Alfonso Martínez <almartin>
Component: Ceph-DashboardAssignee: Alfonso Martínez <almartin>
Status: CLOSED ERRATA QA Contact: Sunil Angadi <sangadi>
Severity: high Docs Contact: Anjana Suparna Sriram <asriram>
Priority: medium    
Version: 4.0CC: ceph-eng-bugs, ceph-qe-bugs, epuertat, hyelloji, sangadi, tserlin
Target Milestone: rcFlags: hyelloji: needinfo+
Target Release: 4.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-14.2.8-28.el8cp, ceph-14.2.8-21.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-19 17:33:05 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:

Description Alfonso Martínez 2020-03-18 16:56:06 UTC
Description of problem:
When following instructions to enable SSO
[[https://docs.ceph.com/docs/master/mgr/dashboard/#dashboard-sso-support]]

ceph dashboard sso setup saml2 <ceph_dashboard_base_url> <idp_metadata> {<idp_username_attribute>} {<idp_entity_id>} {<sp_x_509_cert>} {<sp_private_key>}

and passing idp_metadat, certificate & private key as file paths, I get this error:
<pre>
Error EINVAL: Traceback (most recent call last):
  File "/ceph/src/pybind/mgr/mgr_module.py", line 1153, in _handle_command
    return self.handle_command(inbuf, cmd)
  File "/ceph/src/pybind/mgr/dashboard/module.py", line 379, in handle_command
    res = handle_sso_command(cmd)
  File "/ceph/src/pybind/mgr/dashboard/services/sso.py", line 195, in handle_sso_command
    sp_x_509_cert = f.read()
  File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
</pre>


Expected results:
It should work.

Comment 1 RHEL Program Management 2020-03-18 16:56:14 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 10 errata-xmlrpc 2020-05-19 17:33:05 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-2020:2231