Actions
Bug #50519
closed"ceph dashboard set-ssl-certificate{,-key} -i" is trying to decode an already decoded string.
Status:
Resolved
Priority:
Immediate
Assignee:
Category:
Security & Auth
Target version:
% Done:
0%
Source:
Community (user)
Tags:
Backport:
pacific
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
We are using 16.2.1 on Debian buster directly from https://download.ceph.com/debian-pacific/ .
We just enabled the dashboard on our test installation to validate.
When we tried to enable ssl the cli failed to store the file content after trying to decode an already decoded string.
- ceph dashboard set-ssl-certificate -i fullchain.crt
Error EINVAL: Traceback (most recent call last):
File "/usr/share/ceph/mgr/mgr_module.py", line 1337, in _handle_command
return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
File "/usr/share/ceph/mgr/mgr_module.py", line 389, in call
return self.func(mgr, **kwargs)
File "/usr/share/ceph/mgr/dashboard/module.py", line 372, in set_ssl_certificate
self.set_store('crt', inbuf.decode())
AttributeError: 'str' object has no attribute 'decode'
- ceph dashboard set-ssl-certificate-key -i privatekey.key
Error EINVAL: Traceback (most recent call last):
File "/usr/share/ceph/mgr/mgr_module.py", line 1337, in _handle_command
return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
File "/usr/share/ceph/mgr/mgr_module.py", line 389, in call
return self.func(mgr, **kwargs)
File "/usr/share/ceph/mgr/dashboard/module.py", line 385, in set_ssl_certificate_key
self.set_store('key', inbuf.decode())
AttributeError: 'str' object has no attribute 'decode'
Modifing "inbuf.decode()" to "inbuf" in the regarding lines allowed us then to load the certifikate & key and activate ssl.
Updated by Ernesto Puerta about 3 years ago
- Category set to Security & Auth
- Status changed from New to Triaged
- Assignee set to Alfonso Martínez
- Source set to Community (user)
- Severity changed from 3 - minor to 2 - major
While we're analyzing the issue, as a workaround you can add the dashboard keys directly in the key-value store with the following commands:
ceph config-key set mgr/dashboard/crt -i fullchain.crt ceph config-key set mgr/dashboard/key -i privatekey.key
Updated by Alfonso Martínez about 3 years ago
- Status changed from Triaged to In Progress
- Target version changed from v16.2.2 to v17.0.0
Updated by Alfonso Martínez about 3 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 41062
Updated by Ernesto Puerta about 3 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Backport Bot about 3 years ago
- Copied to Backport #50649: pacific: "ceph dashboard set-ssl-certificate{,-key} -i" is trying to decode an already decoded string. added
Updated by Ernesto Puerta about 3 years ago
- Status changed from Pending Backport to Resolved
Updated by Ernesto Puerta about 3 years ago
- Priority changed from Normal to Urgent
Updated by Ernesto Puerta about 3 years ago
- Priority changed from Urgent to Immediate
Updated by Ernesto Puerta about 3 years ago
- Translation missing: en.field_tag_list set to regression
Actions