<p>I tried deploying jboss/keycloak with postgresql on openshift. When i enter the keycloak username/password, I am using secure route. It redirects me to the page that says, Invalid parameter: redirect_uri.</p>

<p>Environment variables on keycloak:</p>

<pre><code>        - name: KEYCLOAK_USER
          value: admin
        - name: KEYCLOAK_PASSWORD
          value: admin
        - name: DB_VENDOR
          value: postgres
        - name: DB_PORT
          value: '5432'
        - name: DB_ADDR
          value: postgresql
        - name: DB_PASSWORD
          valueFrom:
            secretKeyRef:
              key: database-password
              name: postgresql
        - name: DB_DATABASE
          valueFrom:
            secretKeyRef:
              key: database-name
              name: postgresql
        - name: DB_USER
          valueFrom:
            secretKeyRef:
              key: database-user
              name: postgresql`
</code></pre>

<p>When I remove the secure route, it works fine. How can i get it work in the <code>https</code> as well</p>

ash007
<p>I have keycloak 7.0.0 docker behind ssl-terminating ingress proxy on kubernetes. </p>

<p><strong>If you are unable to login first time as administrator</strong>:</p>

<p>First, as described <a href="https://stackoverflow.com/a/39129777/878241">here</a>, switch keycloak to http mode.</p>

<pre><code>update REALM set ssl_required = 'NONE' where id = 'master';
</code></pre>

<p>Second, put </p>

<pre><code> - name: KEYCLOAK_ALWAYS_HTTPS
   value: "true"
</code></pre>

<p>into your keycloak docker env.</p>

<p>After first step you will be getting "Invalid parameter: redirect_uri" error. Second step will fix that error and you will be able to login as administrator.</p>

<p>Your ingress should forward http port only.</p>

<p>All env variables for keycloak:</p>

<pre><code>    - name: KEYCLOAK_HOSTNAME
      value: "your.keycloak.host"
    - name: KEYCLOAK_ALWAYS_HTTPS
      value: "true"
    - name: KEYCLOAK_USER
      value: "admin"
    - name: KEYCLOAK_PASSWORD
      value: "password"
    - name: PROXY_ADDRESS_FORWARDING
      value: "true"

    - name: DB_VENDOR
      value: postgres
    - name: DB_ADDR
      value: &lt;host&gt;
    - name: DB_DATABASE
      value: keycloak
    - name: DB_USER
      value: keycloak
    - name: DB_PASSWORD
      value: keycloak
</code></pre>
