Bug #59689
Updated by Volker Theile 12 months ago
When SSO is enabled, with PyJWT >= 2 and python3, login via SSO fails with: Internal Server Error Traceback (most recent call last): File "/usr/share/ceph/mgr/dashboard/services/exception.py", line 47, in dashboard_exception_handler return handler(*args, **kwargs) File "/usr/lib/python3.6/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__ return self.callable(*self.args, **self.kwargs) File "/usr/share/ceph/mgr/dashboard/controllers/_base_controller.py", line 267, in inner ret = func(*args, **kwargs) File "/usr/share/ceph/mgr/dashboard/controllers/saml2.py", line 73, in auth_response token = token.decode('utf-8') AttributeError: 'str' object has no attribute 'decode' This is because tokens in PyJWT are already str objects. To fix this This commit update the token.decode line in controllers/saml2.py is adapted to match the form used in controllers/auth.py to avoid this error.