1 2 Previous Next 17 Replies Latest reply on Sep 21, 2017 2:35 PM by wolfgangknauf Go to original post
      • 15. Re: WildFly 11: Using Elytron on the client side
        dmlloyd

        Farah Juma wrote:

         

        One thing to note is that it looks like there's one difference between your working wildfly-config.xml file and your programmatic set up - the rule used for deciding which authentication configuration to use when establishing a connection is slightly different. The <rule use-configuration="default-config"/> line in your wildfly-config.xml file indicates that the "default-config" authentication configuration should always be used. However, in your programmatic set up, context.with(MatchRule.ALL.matchHost("127.0.0.1"), adminConfig) indicates that the authentication configuration you specified should only be used if the name of the host that the client is attempting to connect to matches "127.0.0.1". If your client is attempting to connect to a host other than "127.0.0.1", the rule won't match so your authentication configuration won't get used. One thing you could try to do is change the rule in your programmatic set up to context.with(MatchRule.ALL, adminConfig) to see if that makes a difference.

        Good point; if you're connecting to "localhost" or "localhost.localdomain" or "::1" or something like that, the rule would not match.

         

        At this point though it's hard to guess what could be the problem without seeing the actual code.

        • 16. Re: WildFly 11: Using Elytron on the client side
          fjuma

          A final difference between your working wildfly-config.xml file and your programmatic set up is that setSaslMechanismSelector(SaslMechanismSelector.NONE.addMechanism("DIGEST-MD5")) is specifying that the DIGEST-MD5 mechanism should be used. To use PLAIN, this line should either be removed or modified to specify PLAIN instead.

          • 17. Re: WildFly 11: Using Elytron on the client side
            wolfgangknauf

            Perfect, Farah, this did it!

             

            Many thanks to you all for your help!

             

            Just for the records: my previous attachment contained also the source code - is is based on an Eclipse JavaEE project which was export including source files.

             

            Wolfgang

            1 2 Previous Next