Re: Tomcat Authentication with Realms
- From: "Daniel Rohe" <daniel.rohe@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 20 Jul 2005 21:51:46 +0200
Doesn't provide the realm that feature per default. I thought the Tomcat
documentation states that you have to create two tables for user
authentication and authorization.
Table User with Username and Password where Username is the primary key
and
table User_Role with Username and Rolename where (Username, Rolename) is the
primary key.
When you use your realm and have for example two users Jon and Jane and in
the User_Role table the entries (Jon, Admin), (Jon, User) and (Jane, Guest).
Then you can check for example the Admin role in your servlet with
request.isUserInRole("Admin"). This method returns only true when the
request was made from user Jon. For user Jane the same check will return
false. The check for role User will return also true for user Jon and false
for user Jane.
Kind Regards,
Daniel
<roberto.riggio@xxxxxxxxx> schrieb im Newsbeitrag
news:1121851059.548571.124450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I've successfull configurated tomcat (5.0) to use the realms for
> authenticating user.
>
> Basically I have a set of roles and some security constraints for
> limiting the access to some pages.
>
> In my system the user must choose one role among all the roles
> associated to him in the database.
Why do you restrict the access to specific web pages under one role from a
user that can access these web pages under another role?
>
> I would like to know if this can be done by using the tomat
> authenitication facility.
>
> e.g. by adding a drop list roles in the authentication form.
>
> At the present moment the user choose the role after the login and the
> system mantains a session variable with this role.
>
> Do you have any suggestions???
>
.
- Follow-Ups:
- Re: Tomcat Authentication with Realms
- From: Hamvil
- Re: Tomcat Authentication with Realms
- References:
- Tomcat Authentication with Realms
- From: roberto . riggio
- Tomcat Authentication with Realms
- Prev by Date: Re: Convert double to String - with only 3 decimal places
- Next by Date: Re: Application deployment with Tomcat
- Previous by thread: Re: Tomcat Authentication with Realms
- Next by thread: Re: Tomcat Authentication with Realms
- Index(es):
Relevant Pages
|