[EMAIL PROTECTED] wrote:

> On Thu, Jun 28, 2001 at 03:47:30AM -0700, Konstantin Priblouda wrote:
> 
>>>First, is there an easy explanation of the
>>>difference between groups
>>>and roles?
>>>
>>Role is an permission to do something. If I say, 
>>that role "admin" is required to call this method,
>>only authenticated user holding role "admin" will be
>>allowed to proceed. 
>>
> 
> I understood roles. Sorry for not being clear about that. What I
> didn't get was the significance of groups. The document I read stated
> that roles are on an application level while groups are on an
> application server level - I didn't quite see the purpose of the
> groups.
> 


The reasoning behind many of the layers of indirection in J2EE specdom 
becomes more clear when you remember the various roles that the specs 
discuss. In this case, consider the Enterprise Bean Provider vs. the 
Assembler and Deployer roles.

The provider will write beans that solve certain business problems, but 
doesn't neccessarily know what environment they'll be deployed in. He 
defines a set of Roles that allow him to declaritively define basic 
permissions on the methods of the beans. Suppose he's writing an HR 
application. He may define an 'Administrator' role who can see all 
employees compensation information (not something you want all users to 
do!). There are may also be screens that allow a user to see their own 
vacation days, aniversity date, etc., requiring a normal 'User' role.

Suppose this application is then sold to a company who want to roll it 
out so that salaried employees can access the self-service stuff. 
Suppose that they elect to use application server services to map this 
application's security to their Windows NT domain. The application 
assembler will have to map the roles that the EJBs define to some group 
in that domain. Suppose she maps the 'Administrator' role to the 
existing 'HR' group and creates a new 'Salaried' group to map into the 
'User' role. Now the deployer can take this application (with this 
mapping) and role it out against the appropriate database, etc. and the 
security will match (roughly at least) the needs of the company who 
bought the application.

Also, consider that there may be multiple applications deployed on the 
same server, and that many might define an 'Administrator' role that 
needs to refer to completely different people. For example, a bug 
tracking application running on the same server might define an 
'Administrator' role which provides access to bug assignment funtions. 
Obviously, this can't be mapped to the HR group as above, perhaps it 
would be mapped to an 'IS Managers' group.

hope this has helped,
-danch

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

Reply via email to