Thanks but the error I get says the role 'user' is required to invoke
create. And the user 'pelle' has the role 'user' as the MySql table shows.
And everything works just fine as soon as I change to the
UsersRolesLoginModule.

Perhaps there is something wrong with the roles query as Grim Shieldsson
suggested (but then I would have to change the structure of the table which
I'd prefer not to).

Regards,
Pelle Poluha

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Andre
> Vermeulen@i-Commerce
> Sent: den 11 juni 2001 10:36
> To: '[EMAIL PROTECTED]'
> Subject: RE: [JBoss-user] Problems using DatabaseServerLoginModule
>
>
> 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
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to