Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-300

Absence of key-store-credential NPEs

XMLWordPrintable

      Trying to parse

      <authentication-client xmlns="urn:elytron:1.0">
          <key-stores>
              <key-store name="test" type="PasswordFile">
                  <file name="keystore/xml-client-keystore-credential-test.keystore"/>
                  <!--<key-store-credential key-store-name="test" alias="test-alias"/>-->
              </key-store>
          </key-stores>
      </authentication-client>
      

      I end up with

      java.lang.NullPointerException
      	at org.wildfly.security.auth.client.ElytronXmlParser$AbstractKeyStoreFactory.create(ElytronXmlParser.java:1082)
      	at org.wildfly.security.auth.client.ElytronXmlParser$AbstractKeyStoreFactory.create(ElytronXmlParser.java:1067)
      	at org.wildfly.security.OneTimeSecurityFactory.create(OneTimeSecurityFactory.java:45)
      	at org.wildfly.security.auth.client.ElytronXmlParser.lambda$parseKeyStoreRefType$115(ElytronXmlParser.java:709)
      	at org.wildfly.security.auth.client.ElytronXmlParser$$Lambda$4/1929600551.create(Unknown Source)
      	at org.wildfly.security.auth.client.KeyStoreEntrySecurityFactory.create(KeyStoreEntrySecurityFactory.java:47)
      	at org.wildfly.security.auth.client.KeyStoreEntrySecurityFactory.create(KeyStoreEntrySecurityFactory.java:30)
      	at org.wildfly.security.auth.client.ElytronXmlParser.lambda$parseAuthenticationClientRuleType$106(ElytronXmlParser.java:425)
      	at org.wildfly.security.auth.client.ElytronXmlParser$$Lambda$5/1053782781.create(Unknown Source)
      	at org.wildfly.security.OneTimeSecurityFactory.create(OneTimeSecurityFactory.java:45)
      	at org.wildfly.security.auth.client.ElytronXmlParser.lambda$parseAuthenticationClientRuleType$113(ElytronXmlParser.java:474)
      	at org.wildfly.security.auth.client.ElytronXmlParser$$Lambda$6/2012232625.create(Unknown Source)
      	at org.wildfly.security.auth.client.ElytronXmlParser.lambda$parseAuthenticationClientRulesType$88(ElytronXmlParser.java:242)
      	at org.wildfly.security.auth.client.ElytronXmlParser$$Lambda$7/627150481.create(Unknown Source)
      	at org.wildfly.security.OneTimeSecurityFactory.create(OneTimeSecurityFactory.java:45)
      	at org.wildfly.security.auth.client.XmlClientKeyStoreCredentialTest.testKeystoreCredential(XmlClientKeyStoreCredentialTest.java:110)
      

      This appears to be because the passwordFactory is only instantiated when parsing the key-store-credential element

              dlloyd@redhat.com David Lloyd
              kkhan1@redhat.com Kabir Khan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: