Skip to content

rhdh addon: HTTP Route unusable in a browser with default RHDH CSP #25

Description

@jasonmadigan

What

oinc addon install rhdh exposes RHDH over a plain-HTTP Route (http://rhdh.127.0.0.1.nip.io:9080). RHDH's default Content-Security-Policy includes upgrade-insecure-requests, so the browser upgrades every subresource fetch (JS bundles, assets) to https on that origin and gets ERR_SSL; the app never loads. The addon's curl readiness check passes because plain document fetches are unaffected, so the breakage is invisible until a real browser hits it. localhost is exempt from the upgrade behaviour, which is why port-forward flows never showed it; a real hostname like nip.io is not.

Found running Playwright against the addon-installed RHDH in kuadrant-backstage-plugin (PR #348): 7 console errors and a blank app, dropping to 0 errors with a sign-in page rendered once the consumer overlay sets backend.csp.upgrade-insecure-requests: false. That workaround now lives consumer-side; it belongs in the addon.

Fix options

  • Set backend.csp.upgrade-insecure-requests: false in the addon's base values when serving the HTTP Route. One line, matches the exposure the addon itself chose.
  • Or serve an edge-TLS Route instead, keeping the default CSP intact. Cleaner, needs cert handling for the nip.io hostname.

Acceptance criteria

  • A browser loads the addon-installed RHDH at the advertised Route URL with no CSP-induced asset failures, out of the box
  • Readiness reflects browser usability, not just a curl 200 (a check that fetches an asset, or documented rationale)
  • Consumers can delete their CSP override (kuadrant-backstage-plugin has one to remove)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions