Just a few ideas.
Seems like don't have any permissoins set on your create method (Not telling
which role can execute the create method), or change the permissions on the
bean level that all methods use the same role.
helpfull ?
-----Original Message-----
From: Pelle Poluha [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 11, 2001 10:10 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Problems using DatabaseServerLoginModule
Hello!
I'm trying to use the DatabaseServerLoginModule for authentication and role
mapping. Earlier, I used the UsersRolesLoginModule successfully.
As can be seen below (PreparedStatements printed to screen by JBoss), the
authentication goes well but it seems the role mapping fails.
[UserManager] select password from user where username=?
[UserManager] select password from user where username=?
[UserManager] 'pelle'
User 'pelle' authenticated.
[UserManager] select rolename Role, 0 RoleGroup from rolemapper where
username=?
[UserManager] select rolename Role, 0 RoleGroup from rolemapper where
username=?
[UserManager] 'pelle'
[UserManager] Insufficient method permissions, principal=pelle,
method=create, r
equiredRoles=[user]
When I query the database manually, I get the following results:
mysql> select rolename Role, 0 RoleGroup from rolemapper where
username='pelle';
+------+-----------+
| Role | RoleGroup |
+------+-----------+
| boss | 0 |
| user | 0 |
+------+-----------+
The auth.conf looks like this:
other {
org.jboss.security.auth.spi.DatabaseServerLoginModule required
dsJndiName="java:/mySQL"
principalsQuery="select password from user where username=?"
rolesQuery="select rolename Role, 0 RoleGroup from rolemapper where
username=?"
;
};
In standardjboss.xml, I have added the following line:
<jboss>
<security-domain>java:/jaas/other</security-domain>
<secure>false</secure>
...
Any help appreciated.
Regards,
Pelle Poluha
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user