I have tried this:
It works fine for my application but doesn't work for the management console
What am I missing here?
<management>
<security-realms>
<security-realm name="ManagementRealm">
<authentication>
<jaas name="MyLoginModule"/>
</authentication>
</security-realm>
<security-realm name="ApplicationRealm">
<authentication>
<properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
</authentication>
</security-realm>
</security-realms>
<management-interfaces>
<native-interface security-realm="ManagementRealm">
<socket-binding native="management-native"/>
</native-interface>
<http-interface security-realm="ManagementRealm">
<socket-binding http="management-http"/>
</http-interface>
</management-interfaces>
</management>
.....
<subsystem xmlns="urn:jboss:domain:security:1.1">
<security-domains>
<security-domain name="MyLoginModule">
<authentication>
......
</authentication>
</security-domain>