Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-7665

Write attribute operation for Elytron ldap-key-store throws NPE

    XMLWordPrintable

Details

    • Hide

      Use standalone-elytron.xml and following CLI commands:

      /subsystem=elytron/dir-context=dirContext:add(url=ldap://127.0.0.1:10389,credential=secret,principal="uid=admin,ou=system")
      /subsystem=elytron/ldap-key-store=ldapKeyStore:add(dir-context=dirContext,search-path="ou=Roles,dc=jboss,dc=org")
      /subsystem=elytron/ldap-key-store=ldapKeyStore:write-attribute(name=search-recursive,value=false)
      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.NullPointerException",
          "rolled-back" => true
      }
      
      Show
      Use standalone-elytron.xml and following CLI commands: /subsystem=elytron/dir-context=dirContext:add(url=ldap: //127.0.0.1:10389,credential=secret,principal= "uid=admin,ou=system" ) /subsystem=elytron/ldap-key-store=ldapKeyStore:add(dir-context=dirContext,search-path= "ou=Roles,dc=jboss,dc=org" ) /subsystem=elytron/ldap-key-store=ldapKeyStore:write-attribute(name=search-recursive,value= false ) { "outcome" => "failed" , "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.NullPointerException" , "rolled-back" => true }

    Description

      In case when CLI write-attribute operation is called for ldap-key-store then it results to NullPointerException.

      Exception occurs in server log:

      ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 7) WFLYCTL0013: Operation ("write-attribute") failed - address: ([
          ("subsystem" => "elytron"),
          ("ldap-key-store" => "ldapKeyStore")
      ]): java.lang.NullPointerException
      	at org.wildfly.extension.elytron.LdapKeyStoreDefinition$WriteAttributeHandler.getParentServiceName(LdapKeyStoreDefinition.java:359)
      	at org.jboss.as.controller.RestartParentWriteAttributeHandler.applyUpdateToRuntime(RestartParentWriteAttributeHandler.java:57)
      	at org.jboss.as.controller.AbstractWriteAttributeHandler$1.execute(AbstractWriteAttributeHandler.java:104)
      	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:921)
      	at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:664)
      	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:383)
      	at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1364)
      	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:416)
      	at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:237)
      	at org.wildfly.security.auth.client.PeerIdentity.runAsAll(PeerIdentity.java:431)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:206)
      	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:237)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:217)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$400(ModelControllerClientOperationHandler.java:137)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:161)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:157)
      	at org.wildfly.security.auth.client.PeerIdentity.runAsAll(PeerIdentity.java:464)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:225)
      	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:185)
      	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:157)
      	at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
      	at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
      	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)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      

      Attachments

        Issue Links

          Activity

            People

              mpetrov@redhat.com Michal Petrov
              olukas Ondrej Lukas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: