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

邮差的信 提交于 2019-12-04 04:16:43

问题


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.


回答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.




回答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.



来源:https://stackoverflow.com/questions/42517454/jboss-local-user-javax-security-sasl-saslexception-failed-to-read-server-chall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!