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

Adding credential-reference with non-exist alias to authentication-configuration through CLI results to NPE

XMLWordPrintable

      When Elytron authentication-configuration is added with credential-reference with non-exist alias through CLI then it results to NullPointerException.

      See:

      /subsystem=elytron/credential-store=cs:add(location=cs.jceks,create=true,relative-to=jboss.server.data.dir,credential-reference={clear-text=pass})
      /subsystem=elytron/credential-store=cs:add-alias(alias=exist,secret-value=pass)
      /subsystem=elytron/authentication-configuration=cfg1:add(credential-reference={store=cs,alias=exist})
      {"outcome" => "success"}
      /subsystem=elytron/authentication-configuration=cfg2:add(credential-reference={store=cs,alias=nonexist})
      {
          "outcome" => "failed",
          "failure-description" => {"WFLYCTL0080: Failed services" => {"org.wildfly.security.authentication-configuration.cfg2" => "Failed to start service
          Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
          Caused by: java.lang.NullPointerException"}},
          "rolled-back" => true
      }
      

      NPE in server log:

      ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service org.wildfly.security.authentication-configuration.cfg2: org.jboss.msc.service.StartException in service org.wildfly.security.authentication-configuration.cfg2: Failed to start service
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1978)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
      	at org.wildfly.extension.elytron.AuthenticationClientDefinitions$1.lambda$getValueSupplier$17(AuthenticationClientDefinitions.java:364)
      	at java.util.function.Function.lambda$andThen$5(Function.java:88)
      	at org.wildfly.extension.elytron.AuthenticationClientDefinitions$1.lambda$getValueSupplier$18(AuthenticationClientDefinitions.java:370)
      	at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
      	... 3 more
      Caused by: java.lang.NullPointerException
      	at org.wildfly.extension.elytron.AuthenticationClientDefinitions$1.lambda$getValueSupplier$17(AuthenticationClientDefinitions.java:359)
      	... 8 more
      

              rhn-engineering-lgao Lin Gao
              olukas Ondrej Lukas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 2 days
                  2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified