Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keycloak 25.0.0 codecentric helm charts - Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure resource '<URL>'. #786

Open
ajmalkhalil opened this issue Aug 1, 2024 · 5 comments

Comments

@ajmalkhalil
Copy link

I have deployed Keycloak using the Codecentric Helm charts versions 2.4.1, 2.4.2, and 2.4.3, but none of these versions are accessible. When attempting to access Keycloak via the Ingress URL, I'm encountering the following error in the browser console:
ERROR:
Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure resource ''. This request has been blocked; the content must be served over HTTPS.

I'm unsure why this issue is occurring. I have attempted to resolve it by configuring the following environment variables in my Helm charts:

  • name: PROXY_ADDRESS_FORWARDING
    value: "true"
  • name: KC_PROXY
    value: "edge" # also tried "passthrough"

My startup commands are configured as:

command:

  • "/opt/keycloak/bin/kc.sh"
  • "start"
  • "--hostname=myhostname"
  • "--http-enabled=true"
  • "--http-port=8080"
  • "--hostname-strict=false"
  • "--hostname-backchannel-dynamic=false"

and the environment variables are set as

extraEnv: |

  • name: KEYCLOAK_ADMIN
    value: admin
  • name: KEYCLOAK_ADMIN_PASSWORD
    value: admin
  • name: JAVA_OPTS_APPEND
    value: >-
    -Djgroups.dns.query={{ include "keycloak.fullname" . }}-headless
    -Dkeycloak.hostname=myhostname
    -Dkeycloak.proxy=forward
  • name: KEYCLOAK_PRODUCTION
    value: "true"
  • name: KC_PROXY
    value: "edge"

've searched for other solutions, but they don't seem to apply to this version of Keycloak. Any assistance with resolving this issue would be greatly appreciated. Thank you!

@skripted-io
Copy link

I had the same issue when using KC behind an AWS ALB. This document helped me https://www.keycloak.org/server/reverseproxy

      - name: KC_PROXY_HEADERS
        value: "xforwarded"

@ajmalkhalil
Copy link
Author

Thank you man, it helped

@rome-legacy
Copy link

thx, helped me with microk8s deployment on my private cloud in combination with nginx-ingress (TLS)

@dspasic12
Copy link

I had the same issue when using KC behind an AWS ALB. This document helped me https://www.keycloak.org/server/reverseproxy

      - name: KC_PROXY_HEADERS
        value: "xforwarded"

Thanks, it resolved our problems:)

@leejoyful
Copy link

Thank you man, it helped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants