Enable uploading of an image through Horizon with untrusted SSL certificates

By default, the OpenStack Dashboard (Horizon) is configured to load images directly into Glance. However, if a MOSK cluster is deployed using untrusted certificates for public API endpoints and Horizon, uploading of images to Glance through the Horizon web UI may fail.

When accessing the Horizon web UI of such MOSK deployment for the first time, a warning informs you that the site is insecure and you must force trust the certificate of this site. However, when trying to upload an image directly from a web browser, the certificate of the Glance API is still not considered by the web browser as a trusted one since host:port of the site is different. In this case, you must explicitly trust the certificate of the Glance API.

To enable uploading of an image through Horizon with untrusted SSL certificates:

  1. Navigate to the Horizon web UI.

  2. Configure your web browser to trust the Horizon certificate if you have not done so yet:

    • In Google Chrome or Chromium, click Advanced > Proceed to <URL> (unsafe).

    • In Mozilla Firefox, navigate to Advanced > Add Exception, enter the URL in the Location field, and click Confirm Security Exception.

    Note

    For other web browsers, the steps may vary slightly.

  3. Navigate to Project > API Access.

  4. Copy the Service Endpoint URL of the Image service.

  5. Open this URL in a new window or tab of the same web browser.

  6. Configure your web browser to trust the certificate of this site as described in the step 2.

    As a result, the version discovery document should appear with contents that varies depending on the OpenStack version. For example, for OpenStack Victoria:

    {"versions": [{"id": "v2.9", "status": "CURRENT", "links": \
    [{"rel": "self", "href": "https://glance.ic-eu.ssl.mirantis.net/v2/"}]}, \
    {"id": "v2.7", "status": "SUPPORTED", "links": \
    [{"rel": "self", "href": "https://glance.ic-eu.ssl.mirantis.net/v2/"}]}, \
    {"id": "v2.6", "status": "SUPPORTED", "links": \
    [{"rel": "self", "href": "https://glance.ic-eu.ssl.mirantis.net/v2/"}]}, \
    {"id": "v2.5", "status": "SUPPORTED", "links": \
    [{"rel": "self", "href": "https://glance.ic-eu.ssl.mirantis.net/v2/"}]}, \
    {"id": "v2.4", "status": "SUPPORTED", "links": \
    [{"rel": "self", "href": "https://glance.ic-eu.ssl.mirantis.net/v2/"}]}, \
    {"id": "v2.3", "status": "SUPPORTED", "links": \
    [{"rel": "self", "href": "https://glance.ic-eu.ssl.mirantis.net/v2/"}]}, \
    {"id": "v2.2", "status": "SUPPORTED", "links": \
    [{"rel": "self", "href": "https://glance.ic-eu.ssl.mirantis.net/v2/"}]}, \
    {"id": "v2.1", "status": "SUPPORTED", "links": \
    [{"rel": "self", "href": "https://glance.ic-eu.ssl.mirantis.net/v2/"}]}, \
    {"id": "v2.0", "status": "SUPPORTED", "links": \
    [{"rel": "self", "href": "https://glance.ic-eu.ssl.mirantis.net/v2/"}]}]}
    

Once done, you should be able to upload an image through Horizon with untrusted SSL certificates.