HTML and CSS Reference
In-Depth Information
<security-role-mapping>
<role-name>megaAppUser</role-name>
<group-name>1</group-name>
</security-role-mapping>
<security-role-mapping>
<role-name>megaAppAdmin</role-name>
<group-name>2</group-name>
</security-role-mapping>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>
As shown in the configuration file, role names
megaAppAdmin
and
megaAppUser
are mapped to actual group
names, which are
"2" (Administrator group ID in MegaApp Database)
and
"1"
(
User group ID in MegaApp
Database
).
MegaRealm
is the store of the users and groups for the Mega App application; let's see the mapping between
MEGA_USER
and
USER_GROUP
tables and
MegaRealm
. Table
13-6
shows the configuration of
MegaRealm
.
Table 13-6.
MegaRealm Configuration
Property
Value
Name
MegaRealm
Class Name
com.sun.enterprise.security.ee.auth.realm.jdbc.JDBCRealm
JAAS Context
jdbcRealm
JNDI
jdbc/mega
User Table
MEGA.MEGA_USER
User Name Column
ID
Password Column
PASSWORD
Group Table
MEGA.USER_GROUP
Group Table User Name Column
USER_ID
Group Name Column
GROUP_ID
Password Encryption Algorithm
None
Assign Groups
Database User
Mega
Database Password
Password
Digest Algorithm
None
Encoding
Charset


