Results 1 to 3 of 3
  1. #1
    rastawarez is offline Member
    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Default <security-role-mapping> mapping role with more groups (JDBC REALM)

    i assigned username to all 3 groups and i ask for role in my web application isUserInRole("FULL") it is true its ok..

    but i am always in role FULL if my username is assigned at least one of them .. its like OR among the <group-name> elements .

    but what i need :::: i need be FULL if username has all groups assigned its mean AND among elements <group-name>


    example this code map role FULL to 3 groups...

    example sun-web.xml

    <security-role-mapping>
    <role-name>FULL</role-name>

    <group-name>CUSTOMER</group-name>
    <group-name>ADMIN</group-name>
    <group-name>MANAGER</group-name>

    </security-role-mapping>

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: <security-role-mapping> mapping role with more groups (JDBC REALM)

    If role FULL has more privileges that than role's provided by the 3 groups individually then I would argue that that implies you ought to have a different group representing those users.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    rastawarez is offline Member
    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Default Re: <security-role-mapping> mapping role with more groups (JDBC REALM)

    yes its true.. the best solution is role FULL has a group example CU_AD_MA or with same name FULL .
    But i want to combine groups for example CUSTOMER can EDIT or WRITE on document type ORDER or INVOICE. so FULL now is combination of groups CUSTOMER, WRITE,ORDER, INVOICE.
    But better way is implemented also some JAAS permissions ...
    I trying to find the best dynamic security solution for web application in j2ee 6 with EJB 3.1 , jsf 2 and some services based on EJB..

    but Thanx a lot

Similar Threads

  1. role of object
    By bhavneetkaur in forum New To Java
    Replies: 7
    Last Post: 11-21-2012, 05:23 AM
  2. English's role in a job as a programmer
    By Blue Solo in forum Jobs Discussion
    Replies: 1
    Last Post: 11-04-2011, 12:52 PM
  3. Custom role in spring security
    By ngoc61 in forum Web Frameworks
    Replies: 1
    Last Post: 08-07-2009, 03:39 AM
  4. RAndom role dice
    By thenewsaw in forum JCreator
    Replies: 1
    Last Post: 02-07-2009, 02:10 AM
  5. Replies: 1
    Last Post: 07-23-2007, 11:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •