JBOSS-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge

14,908

Solution 1

I fixed the error with below changes.

It looks like i was using ApplicationRealm for remote authentication as well. I updated below line with my jaas realm.

<http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>

Also, i set SASL_POLICY_NOANONYMOUS and SASL_POLICY_NOPLAINTEXT to false on client side.

Solution 2

My understanding is the following. For a local access, the authentification is not required. For a remote access, the authentification is required, so I'd suggest to double check the user account and password first.

Share:
14,908
likeachamp
Author by

likeachamp

Updated on June 04, 2022

Comments

  • likeachamp
    likeachamp almost 2 years

    When I want to access EJB on remote wildfly server from a different server, i get following error.

    Error: Authentication failed: all available authentication mechanisms failed:
       JBOSS-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge [Caused by java.io.FileNotFoundException: /../wildfly/standalone-/tmp/auth/X.challenge (No such file or directory)]
       DIGEST-MD5: Server rejected authentication
    

    If i access EJB within the server, i don't get any auth error. I use following to access server;

    http-remoting://server1:8080
    

    Basically if i call this in server1, there is no problem. If i call this from server2, i get the error. I assume it looks for auth file in server2 which exists in server1.

    I am not sure if I have to make some config on EJB or wildfly to enable access from different server. I did go through every steps which are available online but clearly i am missing something.