Hi there
I'm having problems getting the DatabaseServerLoginModule work properly on
jboss-3.0.0_tomcat-4.0.3, the database is an MS SQL Server 2000.
I've manged to set it up (using the example from the quickstart guide and
what i could find on the web), so that i get a Login prompt and when i
trace the database i can see that the correct sql statements are executed,
but i allways get a:
Apache Tomcat/4.0.3 - HTTP Status 403 - Access to the requested resource
has been denied
response and nothing in the server.log (when given an invalid password i
get a debug log message saying: 'No matching username found in Principals'
which is of course correct, so this part works).
If I change the web.xml to contain:
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
instead of
<auth-constraint>
<role-name>myrole</role-name>
</auth-constraint>
Authentication works, but isUserRole() method allways return false, this
leads me to suspect that something is wrong with the role lookup (i never
figured out what the RoleGroup thing was all about, but from the examples
it did not seem to matter what value it has).
I also tried to setup the UsersRolesLoginModule and that worked as
described and here isUserInRole() works as expected.
The test setup is an unpacked war in the deploy directory ()
The relevant config files are:
web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/protected/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>myrole</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Example Basic Authentication SQL Based</realm-name>
</login-config>
</web-app>
jboss-web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<jboss-web>
<security-domain>java:/jaas/MyLogin</security-domain>
</jboss-web>
login-config.xml (the relevant part, i use the default db table setup)
<application-policy name="MyLogin">
<authentication>
<login-module
code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag="required">
<module-option name="dsJndiName">java:/jdbc/MyDS</module-option>
</login-module>
</authentication>
</application-policy>
I also tried to check www.jboss.org/forums/ but it seems to be down, or
maybe my network is having problems.
Someone please give me a clue, i'm going nuts.
Best regards Jens
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user