1 Reply Latest reply on Dec 13, 2017 4:55 AM by dlofthouse

    Propogate user name in wildfly10 without security domain

    mhramrhsn

      i am using wildfly 10 , here is the content of jboss-ejb-client.properties

       

      remote.connections=default

      remote.connection.default.port=8080

      remote.connection.default.host=localhost

      remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

      remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

      remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT=false

      remote.connection.default.username=user1

      remote.connection.default.password=pass1

       

      to configure security domain in ear, i added  jboss-ejb3.xml in META-INF here is the content of jboss-ejb3.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss:jboss

              xmlns="http://java.sun.com/xml/ns/javaee"

              xmlns:jboss="http://www.jboss.com/xml/ns/javaee"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xmlns:s="urn:security:1.1"

              version="3.1" impl-version="2.0">

          <assembly-descriptor>

              <s:security>

                  <!-- Even wildcard * is supported -->

                  <ejb-name>*</ejb-name>

                  <s:missing-method-permissions-deny-access>false</s:missing-method-permissions-deny-access>

                  <!-- Name of the security domain which is configured in the EJB3 subsystem -->

                  <s:security-domain>installerDomain</s:security-domain>

              </s:security>

          </assembly-descriptor>

      </jboss:jboss>

       

      and this is the way i configured my security domain in standalone.xml

       

      <security-domain name="installerDomain" cache-type="default">

                          <authentication>

                              <login-module code="Remoting" flag="optional">

                                  <module-option name="password-stacking" value="useFirstPass"/>

                              </login-module>

                              <login-module code="RealmDirect" flag="required">

                                  <module-option name="password-stacking" value="useFirstPass"/>

                              </login-module>

                          </authentication>

      </security-domain>

       

       

      my question is whenever i configured security domain in my ear i can get  correct CallerPrincipal as "user1"

      but when i exclude jboss-ejb3.xml from META-INF to exclude security domain on my ear, i get "ananymous" as CallerPrincipal instead of "user1".

      so why without security domain why wildfly is unabale to propogate CallerPrincipal as provided in jboss-ejb-client.properties.

       

      i am trying since weeks but helpless, please guide me. already  i have spent alot of time on it.