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

EJB client requires authentication context to be configured

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.DR19
    • 7.1.0.DR18
    • EJB, Security
    • None

      Lets have wildfly-config.xml:

      <configuration>
          <jboss-ejb-client xmlns="urn:jboss:wildfly-client-ejb:3.0">
              <connections>
                  <connection uri="remote+http://127.0.0.1:8080" />
              </connections>
          </jboss-ejb-client>
      </configuration>
      

      EJB client requires authentication context to be configured and this will fail.

      If I following lines are added, everything is fine.

          <authentication-client xmlns="urn:elytron:1.0">
              <authentication-rules>
                  <rule use-configuration="default"/>
              </authentication-rules>
              <authentication-configurations>
                  <configuration name="default">
                      <use-service-loader-providers/>
                  </configuration>
              </authentication-configurations>
          </authentication-client>
      

      IMHO, this should not be required.

      Here is a stacktrace.

      10:55:35,178 INFO  [org.wildfly.security.Version:57] ELY00001: WildFly Elytron version 1.1.0.Beta42-redhat-1
      Exception in thread "main" java.lang.ExceptionInInitializerError
              at org.wildfly.security.auth.client.AuthenticationContext.lambda$static$0(AuthenticationContext.java:49)
              at org.wildfly.common.context.ContextManager.getPrivileged(ContextManager.java:282)
              at org.wildfly.security.auth.client.AuthenticationContext.captureCurrent(AuthenticationContext.java:81)
              at org.jboss.remoting3.Endpoint.getConnectedIdentity(Endpoint.java:139)
              at org.jboss.remoting3.Endpoint.getConnection(Endpoint.java:216)
              at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider.lambda$discover$0(RemotingEJBDiscoveryProvider.java:103)
              at java.security.AccessController.doPrivileged(Native Method)
              at org.jboss.ejb.protocol.remote.RemotingEJBDiscoveryProvider.discover(RemotingEJBDiscoveryProvider.java:103)
              at org.wildfly.discovery.impl.AggregateDiscoveryProvider.discover(AggregateDiscoveryProvider.java:58)
              at org.wildfly.discovery.ConfiguredProvider.discover(ConfiguredProvider.java:45)
              at org.wildfly.discovery.Discovery.discover(Discovery.java:94)
              at org.jboss.ejb.client.EJBClientContext.discover(EJBClientContext.java:442)
              at org.jboss.ejb.client.EJBClientContext.discoverAffinityNone(EJBClientContext.java:714)
              at org.jboss.ejb.client.EJBClientContext.performLocatedAction(EJBClientContext.java:701)
              at org.jboss.ejb.client.EJBClientContext.createSession(EJBClientContext.java:681)
              at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:288)
              at org.jboss.ejb.client.EJBRootContext.lookupNative(EJBRootContext.java:146)
              at org.wildfly.naming.client.AbstractContext.lookup(AbstractContext.java:88)
              at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:153)
              at javax.naming.InitialContext.lookup(InitialContext.java:417)
              at client.Client.main(Client.java:48)
      Caused by: org.wildfly.security.auth.client.InvalidAuthenticationConfigurationException: org.wildfly.client.config.ConfigXMLParseException: CONF0003: Unexpected end of document
              at file:/home/istraka/repositories/istraka/mock-artifacts/ejbclient/eap7.1-set-source-ip-address/client/target/classes/META-INF/wildfly-config.xml:23:17
              at org.wildfly.security.auth.client.DefaultAuthenticationContextProvider.lambda$static$0(DefaultAuthenticationContextProvider.java:40)
              at java.security.AccessController.doPrivileged(Native Method)
              at org.wildfly.security.auth.client.DefaultAuthenticationContextProvider.<clinit>(DefaultAuthenticationContextProvider.java:36)
              ... 21 more
      Caused by: org.wildfly.client.config.ConfigXMLParseException: CONF0003: Unexpected end of document
              at file:/home/istraka/repositories/istraka/mock-artifacts/ejbclient/eap7.1-set-source-ip-address/client/target/classes/META-INF/wildfly-config.xml:23:17
              at org.wildfly.client.config.ConfigurationXMLStreamReader.unexpectedDocumentEnd(ConfigurationXMLStreamReader.java:266)
              at org.wildfly.security.auth.client.ElytronXmlParser.parseAuthenticationClientConfiguration(ElytronXmlParser.java:208)
              at org.wildfly.security.auth.client.ElytronXmlParser.parseAuthenticationClientConfiguration(ElytronXmlParser.java:141)
              at org.wildfly.se
      

              darran.lofthouse@redhat.com Darran Lofthouse
              istraka@redhat.com Ivan Straka
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: