Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-10740

<use-service-loader-providers/> does not work in wildfly-config.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 7.1.0.DR19
    • None
    • Security
    • None

      I see the following exception, adding use-service-loader-providers does not help

      Caused by: java.security.NoSuchAlgorithmException: ELY08028: Invalid algorithm "clear"
      at org.wildfly.security.password.PasswordFactory.getInstance(PasswordFactory.java:121)
      at org.wildfly.security.auth.client.ElytronXmlParser.lambda$parseClearPassword$47(ElytronXmlParser.java:2009)
      ... 46 more

      Problem is there is used directly System::getProviders()

      ElytronXmlParser.java
                          case "key-store-clear-password": {
                              // group 2
                              if (! gotSource || gotCredential) {
                                  throw reader.unexpectedElement();
                              }
                              gotCredential = true;
                              final char[] clearPassword = ((ClearPassword) parseClearPassword(reader, Security::getProviders).get()).getPassword();
                              passwordFactory = () -> clearPassword;
                              break;
                          }
      		...
                          case "key-store-clear-password": {
                              if (keyStoreCredential != null) throw reader.unexpectedElement();
                              ExceptionSupplier<Password, ConfigXMLParseException> credential = parseClearPassword(reader, Security::getProviders);
                              keyStoreCredential = () -> new PasswordEntry(credential.get());
                              break;
                          }
      		...
                          case "protection-parameter-credentials": {
                              if (++attributesSectionCount > 2) throw reader.unexpectedContent();
                              credentialSourceSupplier = parseCredentialsType(reader, keyStoresMap, credentialStoresMap, Security::getProviders);
                              break;
                          }
      

      instead of providerSupplier, e.g:

      ElytronXmlParser.java
                          case "credentials": {
                              if (isSet(foundBits, 9)) throw reader.unexpectedElement();
                              foundBits = setBit(foundBits, 9);
                              ExceptionSupplier<CredentialSource, ConfigXMLParseException> credentialSource = parseCredentialsType(reader, keyStoresMap, credentialStoresMap, providerSupplier);
                              configuration = andThenOp(configuration, parentConfig -> parentConfig.useCredentials(credentialSource.get()));
                              break;
                          }
      

            darran.lofthouse@redhat.com Darran Lofthouse
            mchoma@redhat.com Martin Choma
            Martin Choma Martin Choma
            Martin Choma Martin Choma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: