question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploying keycloak with http (not https!) only

See original GitHub issue

Describe the bug

It is possible to deploy keycloak, using the operator, in http (not https!) mode. Which makes sense for development setups, using e.g. Minikube or Kind.

However, in that case, e.g. the admin console doesn’t work, as it always redirects to https://, even if the port is 80:

image

This did work in 17 (legacy).

Version

18.0.0

Expected behavior

Allows to use plain HTTP.

Actual behavior

Wrongly redirects from http to https when opening the admin console.

How to Reproduce?

Use the following CR:

apiVersion: k8s.keycloak.org/v2alpha1
kind: Keycloak
metadata:
  name: sso
spec:
  hostname: sso.192.168.39.167.nip.io
  instances: 1
  serverConfiguration:
  - name: db
    value: postgres
  - name: db-url-database
    secret:
      key: database
      name: keycloak-db-secret
  - name: db-url-host
    secret:
      key: host
      name: keycloak-db-secret
  - name: db-url-port
    secret:
      key: port
      name: keycloak-db-secret
  - name: db-username
    secret:
      key: username
      name: keycloak-db-secret
  - name: db-password
    secret:
      key: password
      name: keycloak-db-secret
  - name: hostname-strict
    value: "false"
  - name: hostname
    value: sso.192.168.39.167.nip.io
  - name: hostname-port
    value: "80"
  - name: proxy
    value: passthrough
  tlsSecret: INSECURE-DISABLE

Anything else?

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Wolfsrudelcommented, May 10, 2022

I’m stuck there too. I assume you have a proxy in front of it? I think it has something to do with the headers, but I haven’t been able to find a suitable combination of possible solutions that works. 😅

0reactions
ctroncommented, May 11, 2022

Do you think we can close this issue?

Of course!

Read more comments on GitHub >

github_iconTop Results From Across the Web

"HTTPS required" while logging in to Keycloak as admin
I am using Keycloak (version 1.0.4.Final) in JBOSS AS 7.1.1 server. The server is on Amazon AWS. ... The server is on AWS,...
Read more >
HTTPS/SSL Setup | keycloak-documentation
Keycloak is not set up by default to handle SSL/HTTPS. It is highly recommended that you either enable SSL on the Keycloak server...
Read more >
Configuring TLS - Keycloak
In this guide, you will learn how to configure Keycloak to use HTTPS/TLS. ... When no keystore file is explicitly configured, but http-enabled...
Read more >
Server Installation and Configuration Guide - Keycloak
The Keycloak is built on top of the WildFly Application Server. This guide will only go over the basics for deployment within a...
Read more >
Configuring the hostname - Server - Keycloak
When using the hostname option the server is going to resolve the HTTP scheme, port, and path, automatically so that: https scheme is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found