Hello,
I read some guide to use "Container-Managed Authentication and Authorization" (JAAS) with Glassfish and MySQL.
I use Netbeans 6.
I created an web application with an authentication form. In the mysql database, I stored two table usertable (user, password, email columns) and grouptable (user and groupid columns). I inserted an user: valent with password qwerty and its groupid is editor.
connection Pools name: mysql
JAAS context: jdbcRealm
Realm: JDBC
Database name: tier
JNDI: jdbc/tier
xxxxx
Processing login with credentials of type: class com.sun.enterprise.security.auth.login.PasswordCredential
Logging in user [valent] into realm: JDBC using JAAS module: jdbcRealm
Login module initialized: class com.sun.enterprise.security.auth.login.JDBCLoginModule
JAAS authentication aborted.
SEC5046: Audit: Authentication refused for [valent].
doPasswordLogin fails
javax.security.auth.login.LoginException: Security Exception
[...]
Caused by: java.lang.SecurityException
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:857)
... 35 more
Web login failed: Login failed: javax.security.auth.login.LoginException: Security Exception
xxxxx
In attachment, I put some useful files: domain.xml, sun-web.xml,...
[Message sent by forum member 'helixb' (helixb)]
http://forums.java.net/jive/thread.jspa?messageID=254895