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

Null Pointer is thrown when KeycloakDeployment attempts to get Oidc Configuration using HttpClient

    Details

    • Sprint:
      Keycloak Sprint 35
    • Steps to Reproduce:
      Hide

      1. Have a Wildfly 18 instance with a keycloak 8.0.1 adapter installed.
      2. Have a keycloak 8.0.1 instance installed.
      3. Create a secure-deployment in the standalone*.xml for the REST server.
      4. Create a openid-connect, bearer-only client in the keycloak admin console for the REST server.
      5. Create a openid-connect, public client in the keycloak admin console for the javascript client that asks the REST server for information.
      6. Login to javascript client.
      7. Have the javascript client ask the REST server for information.
      8. Null pointer is thrown and is shown in wildfly log.

      Show
      1. Have a Wildfly 18 instance with a keycloak 8.0.1 adapter installed. 2. Have a keycloak 8.0.1 instance installed. 3. Create a secure-deployment in the standalone*.xml for the REST server. 4. Create a openid-connect, bearer-only client in the keycloak admin console for the REST server. 5. Create a openid-connect, public client in the keycloak admin console for the javascript client that asks the REST server for information. 6. Login to javascript client. 7. Have the javascript client ask the REST server for information. 8. Null pointer is thrown and is shown in wildfly log.
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      Using the 8.0.1 version of the keycloak wildfly adapter we receive a null pointer exception on line 325 of KeycloakDeployment.java. This is a snippet of stack trace we saw in our wildfly log:

      Failed to load URLs from <auth-server-url>/realms/TEDS/.well-known/openid-configuration: java.lang.RuntimeException: java.lang.NullPointerException
      

      When this exception is thrown the client receives a response with a status of 401 which includes this header:

      WWW-Authenticate: Bearer realm="<realm>", error="invalid_token", error_description="Realm URL not set"
      

      The null pointer on line 325 of KeycloakDeployment.java throws when any one of our javascript clients tries to communicate with a REST server that is a secure-deployment for information.

      Note: Using a wildfly that has a 7.0.1 keycloak adapter installed our clients can get the information they ask with no problems even when using a 8.0.1 keycloak server.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                sebastian.laskawiec Sebastian Laskawiec
                Reporter:
                cbolgiano Chris Bolgiano
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: