Re: [JBoss-user] Problems using DatabaseServerLoginModule

2001-06-12 Thread Scott M Stark

That is correct. It expects a query that maps any existing schema onto
the idealized Principal and Roles tables as described in the JBossSX
docs and the DatabaseServerLoginModule javadoc.
See http://www.jboss.org/documentation/HTML/ch09s17.html



- Original Message - 
From: "Grim Shieldsson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 12, 2001 8:39 AM
Subject: RE: [JBoss-user] Problems using DatabaseServerLoginModule


> I would try using the column names you have.  I have a sneaking
> suspicion that the databaseLoginModule is not looking at names, but
> rather position.  I could be wrong.. it's worth a shot.
> 
> --- Pelle Poluha <[EMAIL PROTECTED]> wrote:
> > I would at least have to change the column names in the table and
> > change the
> > entity bean dealing with that table.
> > 
> > Regards,
> > Pelle
> > 
> > > The roles query should be something like:
> > > select Role,RoleGroup from Roles where username=?
> > > You have:
> > > select rolename Role, 0 RoleGroup from rolemapper where username=?"
> > > The rolename Role and 0 RoleGroup are prolly causing the problem. 
> > I'm
> > > not sure why this would cause a database structure change.
> > 
> > > > 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).
> > > >
> > 
> > 
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> =
> Grim Shieldsson (James A Barrows)
> Acting Chieftain of Clan StormWolf
> Barbarian Freehold Alliance
> Oppurtunity doesn't knock.  It only presents itself after you kick down the door.
> --Kyle Chandler
> 
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35 
> a year!  http://personal.mail.yahoo.com/
> 
> ___
> 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



RE: [JBoss-user] Problems using DatabaseServerLoginModule

2001-06-12 Thread Grim Shieldsson

I would try using the column names you have.  I have a sneaking
suspicion that the databaseLoginModule is not looking at names, but
rather position.  I could be wrong.. it's worth a shot.

--- Pelle Poluha <[EMAIL PROTECTED]> wrote:
> I would at least have to change the column names in the table and
> change the
> entity bean dealing with that table.
> 
> Regards,
> Pelle
> 
> > The roles query should be something like:
> > select Role,RoleGroup from Roles where username=?
> > You have:
> > select rolename Role, 0 RoleGroup from rolemapper where username=?"
> > The rolename Role and 0 RoleGroup are prolly causing the problem. 
> I'm
> > not sure why this would cause a database structure change.
> 
> > > 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).
> > >
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


=
Grim Shieldsson (James A Barrows)
Acting Chieftain of Clan StormWolf
Barbarian Freehold Alliance
Oppurtunity doesn't knock.  It only presents itself after you kick down the door.
--Kyle Chandler

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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



RE: [JBoss-user] Problems using DatabaseServerLoginModule

2001-06-12 Thread Pelle Poluha

It's done and it works perfectly. It seems that you can't label the columns
as I did in the query. The names of the table don't matter though.

Alas:
from: select rolename Role, 0 RoleGroup from rolemapper where username=?
to  : select role, rolegroup from rolemapper where username=?

/Pelle Poluha

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Pelle Poluha
> Sent: den 12 juni 2001 10:50
> To: [EMAIL PROTECTED]
> Subject: RE: [JBoss-user] Problems using DatabaseServerLoginModule
>
>
> I would at least have to change the column names in the table
> and change the
> entity bean dealing with that table.
>
> Regards,
> Pelle
>
> > The roles query should be something like:
> > select Role,RoleGroup from Roles where username=?
> > You have:
> > select rolename Role, 0 RoleGroup from rolemapper where username=?"
> > The rolename Role and 0 RoleGroup are prolly causing the
> problem.  I'm
> > not sure why this would cause a database structure change.
>
> > > 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).
> > >
>
>
> ___
> 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



RE: [JBoss-user] Problems using DatabaseServerLoginModule

2001-06-12 Thread Pelle Poluha

I would at least have to change the column names in the table and change the
entity bean dealing with that table.

Regards,
Pelle

> The roles query should be something like:
> select Role,RoleGroup from Roles where username=?
> You have:
> select rolename Role, 0 RoleGroup from rolemapper where username=?"
> The rolename Role and 0 RoleGroup are prolly causing the problem.  I'm
> not sure why this would cause a database structure change.

> > 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).
> >


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



RE: [JBoss-user] Problems using DatabaseServerLoginModule

2001-06-12 Thread Grim Shieldsson

The roles query should be something like:
select Role,RoleGroup from Roles where username=?
You have:
select rolename Role, 0 RoleGroup from rolemapper where username=?"
The rolename Role and 0 RoleGroup are prolly causing the problem.  I'm
not sure why this would cause a database structure change.  

--- Pelle Poluha <[EMAIL PROTECTED]> wrote:
> 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:
> > 
> > java:/jaas/other
> > false
> > ...
> >
> > 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


=
Grim Shieldsson (James A Barrows)
Acting Chieftain of Clan StormWolf
Barbarian Freehold Alliance
Oppurtunity doesn't knock.  It only presents itself after you kick down the door.
--Kyle Chandler

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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



RE: [JBoss-user] Problems using DatabaseServerLoginModule

2001-06-11 Thread Pelle Poluha

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:
> 
>   java:/jaas/other
>   false
>   ...
>
> 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



RE: [JBoss-user] Problems using DatabaseServerLoginModule

2001-06-11 Thread Andre [EMAIL PROTECTED]

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:

java:/jaas/other
false
...

Any help appreciated.

Regards,
Pelle Poluha

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



Re: [JBoss-user] Problems using DatabaseServerLoginModule

2001-06-11 Thread Grim Shieldsson

At firsty glance the rolename and 0 in front of the column names might
not want to be there.  Everything else looks like what I'm using for
Database Login right now, and it works.  You may be confusing Jboss by
labeling the columns like that.

--- Pelle Poluha <[EMAIL PROTECTED]> wrote:
> 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:
> 
>   java:/jaas/other
>   false
>   ...
> 
> Any help appreciated.
> 
> Regards,
> Pelle Poluha
> 

> ATTACHMENT part 2 application/ms-tnef name=winmail.dat



=
Grim Shieldsson (James A Barrows)
Acting Chieftain of Clan StormWolf
Barbarian Freehold Alliance
Oppurtunity doesn't knock.  It only presents itself after you kick down the door.
--Kyle Chandler

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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



[JBoss-user] Problems using DatabaseServerLoginModule

2001-06-11 Thread Pelle Poluha

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:

java:/jaas/other
false
...

Any help appreciated.

Regards,
Pelle Poluha

 winmail.dat