1 Reply Latest reply on Apr 25, 2002 7:24 AM by Jim

    Principal, Role, RoleGroup. A brief explanation.

    Jim Newbie

      Hi,

      I would like to implement a user base (using J2EE declarative security) with the following relationship hierarchy :

      Users:
      user = 100, usergroup = 11;

      UserGroups:
      usergroup = 10, groupname=agent, parentgroup = 5;
      usergroup = 11, groupname=privatesupplier, parentgroup = 5;
      usergroup = 5, groupname=supplier, parentgroup = 1;
      usergroup = 1, groupname=user, parentgroup=0;

      This is so that if I say userInRole(supplier) I know I'm dealing with all users in this group as well as all users in all child groups. Or in other words I need to know whether a user is a descendent of a particular ancestor.

      How could I implement this using principals, roles and rolegroups? I mean how do the three relate?

      Thanks
      Joe

        • 1. Re: Principal, Role, RoleGroup. A brief explanation.
          Jim Newbie

          On the struts mailing list I received some info:

          " .... -I believe that role to group mappings are app server specific, for example in weblogic you can associate a role with a user, list of users and/or group or list of groups in the weblogic.xml config file. From the weblogic console you can specify that a group contains one or more users and/or one or more sub groups. You should be able to do something similar with JBoss (??) ..."

          Is this correct? Is this a JBoss-specific issue?

          Joe