Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-3742

Incorrect Basic Auth encoding for OIDC IDentity Provider when Client ID contains colon [GHI#43022]

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Before reporting an issue

      [x] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

      Area

      oidc

      Describe the bug

      Based on OAuth2.1 Client Secret, when an Identity Provider has Client authentication as Client secret sent as basic auth basic authentication encoding must be : based64_encode(url_encode(client_id) + ":" + url_encode(client_secret)).

      Keycloak need to respect it and send the basic authenticator encoding based on OAuth 2.1

      Version

      26.3.5

      Regression

      [ ] The issue is a regression

      Expected behavior

      Basic authentication encoding is : based64_encode(url_encode(client_id) + ":" + url_encode(client_secret)).

      Actual behavior

      Basic authentication encoding is : based64_encode(client_id + ":" +client_secret).

      How to Reproduce?

      Create an OIDC Identity Provider with Basic Authenticator and client_id including colon (fe https://www.keycloak.org/). Observe the basic authentication that Keycloak sends.
      When you will try to login, authentication will be failed due to wrong client credentials.
      Keycloak client will try to authenticate with client_id = 'https'

      Anything else?

      No response

              Unassigned Unassigned
              pvlha Pavel Vlha
              Keycloak Core IAM
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: