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

Setting of `type` of `Argon2PasswordHashProviderFactory` is incorrect, [GHI#40232]

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

      authentication

      Describe the bug

      The type (i, d or id) is read from the configuration by the version key. This should be the type key.
      In code:

      @Override
      public void init(Config.Scope config) {
      

      version = config.get(VERSION_KEY, Argon2Parameters.DEFAULT_VERSION);
      type = config.get(VERSION_KEY, Argon2Parameters.DEFAULT_TYPE);
      ...

      
      

      this should be

      @Override
      public void init(Config.Scope config) {
      

      version = config.get(VERSION_KEY, Argon2Parameters.DEFAULT_VERSION);
      type = config.get(TYPE_KEY, Argon2Parameters.DEFAULT_TYPE);
      ...

      
      

      Further there is a typo in cpuCoreSempahore, this should be cpuCoreSemaphore.

      I can make a PR for both issues (well, one issue, one typo).

      Version

      26.2 / main

      Regression

      [ ] The issue is a regression

      Expected behavior

      The type should be read from the correct environment / configuration variable.

      Actual behavior

      It is read from the wrong variable.

      How to Reproduce?

      Try to configure the Argon2 type using the documented property, this will not work.

      Anything else?

      I can make a PR for this.

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

                Created:
                Updated:
                Resolved: