Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-9680

redirect_uri error message due to port forced to 0

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Out of Date
    • 4.8.3.Final
    • None
    • Adapter - JEE
    • Hide

      Have an application in http that is plugged to a specific port (not 80).
      Have a Keycloack Server installed in https mode.
      Create a realm and client for that application allowing redir from that URL

      NB : hiding the http port behind a virtual host fix the issue (of course).
      NB : I cannot reproduce the issue when keycloack URL is in http and not https.

      Show
      Have an application in http that is plugged to a specific port (not 80). Have a Keycloack Server installed in https mode. Create a realm and client for that application allowing redir from that URL NB : hiding the http port behind a virtual host fix the issue (of course). NB : I cannot reproduce the issue when keycloack URL is in http and not https.
    • NEW
    • NEW

    Description

      Hello to all,

      I use keycloak-4.8.3.Final with a tomcat application (apache-tomcat-8.5.35)
      that uses keycloak-tomcat8-adapter-dist-4.8.3.Final.

      The issue I have is that when I try to access my application with the
      following url that have a defined port in it (8095 in the example above) :

      http://vm.cerberus-testing.org:8095/Cerberus

      I get redirected to my keycloak URL with the following url :

      https://vm.cerberus-testing.org:38443/auth/realms/R-AAAAA/protocol/openid-connect/auth?response_type=code&client_id=Cerberus&redirect_uri=https%3A%2F
      %2Fvm.cerberus-testing.org%3A0%2FCerberus%2F&state=4cd22c37-8530-4919-a076-d6dcb1335ff5&login=true&scope=openid

      The URL is correct appart from the parameter redirect_uri :
      redirect_uri=https%3A%2F%2Fvm.cerberus-testing.org%3A0%2FCerberus%2F
      ie :
      redirect_uri=https://vm.cerberus-testing.org:0/Cerberus/

      I would expect that to be
      redirect_uri=https://vm.cerberus-testing.org:8095/Cerberus/

      Of course, as a consequence, I get a "We're sorry..." page with a message :
      "Invalid parameter: redirect_uri" Which is correct .

      Am I doing something wrong ?

      My keycloak config under tomcat is :
      {
      "realm": "${org.cerberus.keycloak.realm}",
      "auth-server-url": "${org.cerberus.keycloak.url}",
      "ssl-required": "external",
      "resource": "${org.cerberus.keycloak.client}",
      "public-client": true,
      "confidential-port": 0
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            vertigo17 Benoit DUMONT (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: