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

Creating LDAP security realm fails with cryptic error message

    XMLWordPrintable

Details

    Description

      When creating an LDAP security realm via CLI, setup fails with cryptic error message.

      For example, creating a dir-context works fine:
      /subsystem=elytron/dir-context=exampleDC:add(url="ldap://127.0.0.1:10389",principal="uid=admin,ou=system",credential="secret")

      But when creating an ldap-realm:
      /subsystem=elytron/ldap-realm=exampleLR:add(dir-context=exampleDC,identity-mapping={search-base-dn="ou=Users,dc=jboss,dc=org",rdn-identifier="uid",user-password-mapper={from="userPassword"}})

      It fails:
      {
      "outcome" => "failed",
      "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalArgumentException",
      "rolled-back" => true
      }

      Full log in wildfly:
      14:11:03,368 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 4) WFLYCTL0013: Operation ("add") failed - address: ([
      ("subsystem" => "elytron"),
      ("ldap-realm" => "exampleLR")
      ]): java.lang.IllegalArgumentException
      at org.jboss.dmr.ModelValue.asBoolean(ModelValue.java:69)
      at org.jboss.dmr.ModelNode.asBoolean(ModelNode.java:267)
      at org.wildfly.extension.elytron.LdapRealmDefinition$UserPasswordCredentialMappingObjectDefinition.configure(LdapRealmDefinition.java:163)
      at org.wildfly.extension.elytron.LdapRealmDefinition$RealmAddHandler.configureIdentityMapping(LdapRealmDefinition.java:420)
      at org.wildfly.extension.elytron.LdapRealmDefinition$RealmAddHandler.performRuntime(LdapRealmDefinition.java:375)
      at org.jboss.as.controller.AbstractAddStepHandler.performRuntime(AbstractAddStepHandler.java:337)
      at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:151)
      at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:940)
      at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:683)
      at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:382)
      at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1363)
      at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:410)
      at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:232)
      at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:213)
      at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:136)
      at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:157)
      at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:153)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:422)
      at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:149)
      at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:153)
      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

              jkalina@redhat.com Jan Kalina (Inactive)
              zrhoads Zach Rhoads (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: