Part A: Role vs. RoleGroup
Can someone explain the difference between Role and RoleGroup in jboss DatabaseServerLoginModule ? I am confused by looking at examples in the JBoss 6 Documentation
One area of โโconfusion is that when describing logical tables, the user mapping table for roles has three columns:
Table Principals(PrincipalID text, Password text) Table Roles(PrincipalID text, Role text, RoleGroup text)
But the example they offer uses only two columns:
CREATE TABLE Users(username VARCHAR(64) PRIMARY KEY, passwd VARCHAR(64)) CREATE TABLE UserRoles(username VARCHAR(64), userRoles VARCHAR(32))
Is the two columns a typo or can I use the two column mapping table for the role mapping table that I'm more familiar with, and the query that creates the two columns from the same source column userRoles, and now the roles and role group will now be the same for this application.
BTW - in traditional jdbcRealm authentication in Glassfish 3 and earlier, jBoss3 is simple from one to many relationships, and there is a user_group table where user names are mapped to group names.
Part B: RolesQuery
Is it necessary to revise this request with:
select userRoles, 'Roles' from UserRoles where username=?
:
select userRoles, userRoles as 'Roles' from UserRoles where username=?
To work in the UserRoles table or is it normal as it is?
Part C: Matching web.xml
In web.xml, will I limit resources to userRoles or Roles columns?