rucio / webui

RucioWebUI (v2.0)
Apache License 2.0
2 stars 13 forks source link

insecure request when using https #408

Open v1kko opened 3 months ago

v1kko commented 3 months ago

Description

Dear developers,

First of all, thanks for this nice work!

When trying to use the dashboard over https I get the following error:

comdom.js:76 Mixed Content: The page at 'https://webui.test.rucio.km3net.de/comdom.js' was loaded over HTTPS, but requested an insecure resource 'http://webui.test.rucio.km3net.de/api/feature/list-dids?query=testing%3A&type=Dataset'. This request has been blocked; the content must be served over HTTPS.

I agree with the browser here, I think the resource should be requested over the same protocol as the page was served.

When manually adding https:// the request works

Steps to reproduce

  1. Serve dashboard over https
  2. Try to list dids

Rucio WebUI Version

rucio/rucio-webui:release-33.0.0

Additional Information

v1kko commented 3 months ago

I think the issue might be is in this discrepancy, the capitalization is different: https://github.com/rucio/helm-charts/blob/3b2baf62e078739ac9f8784467b26634340d63e8/charts/rucio-webui/templates/deployment.yaml#L174 https://github.com/rucio/webui/blob/a2df395aa605a02a05478d3b000ff586d411841b/tools/env-generator/src/templates/.env.liquid#L2

However setting RUCIO_WEBUI_ENABLE_SSL to "true" breaks the apache frontend.

v1kko commented 3 months ago

The apache frontend breaks because of this line: https://github.com/rucio/containers/blob/f3db13fb5c104053c2689bef3ae3d74b32c537ac/webui/rucio.conf.j2#L36

maany commented 3 months ago

Thanks for investigating @v1kko. I will send a patch and update you here.