[SSL certs] Validate charm options before propagating changes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard Charm |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
The charm accepts base64 encoded certificates on ssl_cert, ssl_key, and ssl_ca.
These certificates are - as far as I can tell - written to disk and installed without any prior validation. This implies that base64 data that does not decode to a certificate will still be processed and installed.
I see that install_ca_cert executes
subprocess.
This could theoretically catch corrupted CA certificates and have the config-changed hook fail; unfortunately, update-
In any case, I think doing some basic sanity checks on the config values could prevent the charm from pushing configuration that is syntactically incorrect. I don't think checks should necessarily go as far as proper certificate validation, because a basic "does this thing actually decode to a certificate?" would already help.
Of course the same logic could be extended to any config option, but this feature request is limited to SSL certificate handling.
tags: | added: canonical-bootstack |
Changed in charm-openstack-dashboard: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Related fix proposed to branch: master /review. opendev. org/c/openstack /charm- openstack- dashboard/ +/836797
Review: https:/