Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Roles and Preferences
Hi,

I do not know if this is the correct newsgroup to post this, so if it isn't 
, let me know.
I have read a lot about JAAS , autentication and stuf, I have implementend m
y own LoginModule and
CallbackHandler. The goal is to make a non-web j2ee application where users 
have to login before
they can use the application client, but users have a profile of options tha
t the aplication must
take into account. Well, I've implemented a LoginModule that comunicates wit
h the database via the
BusinessDelegate + Facade patterns.
The facade is a Stateless bean with this method

public void Subject login(Map loginData)

if the login is good the subject will be returned with all it's principals a
nd credencials, if not,
an empty subject is returned.

Having said this, my problem is to understand how to map my aplication roles
 to principals in the
JAAS framework. or even if this is the correct way to handle aplication role
s.

My aplication users have a login and password and a profile. This profile , 
among other things
carries preferences about the localization of the user (the locale used to r
ender information such
as text and number formating) and several aplication specific options the us
er may consult at any
time and, in some cases, alter. the user also has roles, he cannot modify or
 even consult them -
Only the adminstrator role can do this - but they are attach to the subject.

Well, my questions:
1)
How to attach a profile to a subject in the JAAS framework. I wonder if I ma
y extend Subject to have
getProfile/setProfile methods, so an autenticated user corresponds with a su
bject that has a profile
object.

2)
About roles. If a user can have many roles in the aplication , and those rol
es can extend one
another like :

If Role A as permission X and role B as permission Y , cole C=A+B will have 
both permissions.

can I map the roles to principals ? and in that case I map permissions to wh
at ? (credencials or
properties inside the principals ? )
More simply, How to I attach application Roles to JAAS subjects ?

Thank you for any help

Report this thread to moderator Post Follow-up to this message
Old Post
SMMT
10-26-04 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Security archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:53 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.