With JBOSS7.1 Fianl version also Iam getting encrypted username at the server and database login is failing.
standalone.xml file contents :
<security-realm name="ApplicationRealm">
<authentication>
<properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
</authentication>
</security-realm>
<subsystem xmlns="urn:jboss:domain:remoting:1.1">
<connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm">
<sasl>
<policy>
<no-anonymous value="true"/>
<no-plain-text value="false"/>
<pass-credentials value="true"/>
</policy>
</sasl>
</connector>
</subsystem>
<security-domain name="MYLogin" cache-type="default">
<authentication>
<login-module code="Remoting" flag="optional">
<module-option name="password-stacking" value="useFirstPass"/>
</login-module>
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="sufficient">
<module-option name="dsJndiName" value="java:/jdbc/example"/>
<module-option name="principalsQuery" value="select password from sessionuser where name=?"/>
<module-option name="rolesQuery" value="select role, 'Roles' from sessionrole where name=?"/>
<module-option name="hashAlgorithm" value="SHA-256"/>
<module-option name="hashEncoding" value="base64"/>
</login-module>
</authentication>
</security-domain>
...
EJB is using Security Domain annotation@SecurityDomain
(value = "MYLogin")
Can you please suggest how to configure standalone.xml for remote ejb authentication to work properly using database login module.