Reputation: 1286
I'm trying to add the following security-domain
in the JBOSS AS7 standalone.xml
<security-domain name="form-authentication" cache-type="default">
<authentication>
<login-module code="Database" flag="sufficient">
<module-option name="dsJndiName" value="java:jboss/datasources/MySqlDS"/>
<module-option name="principalsQuery">select password from Users_Authentication where username=?</module-option>
<module-option name="rolesQuery">select rolename, 'Roles' from Users_Roles where username=?</module-option>
</login-module>
</authentication>
</security-domain>
But I'm having the following error: Missing required attribute(s): value
(pointing to the second module-option). I've already tried to put value=""
, but a new error appears pointing to the closing tag </module-option>
.
Upvotes: 1
Views: 94
Reputation: 8467
Try the following principalQuery
and rolesQuery
module-option
descriptors. Actually you need to put the "select .... " in the values part.
<module-option name="principalsQuery" value="select password from Users_Authentication where username=?"/>
<module-option name="rolesQuery" value="select rolename, 'Roles' from Users_Roles where username=?"/>
Upvotes: 1