Inthe JDBC realm, the server gets user credentials from a database. The Enterprise Server uses
thedatabase information and the enabled JDBC realm option in the conguration le. For
digestauthentication, a JDBC realm should be created with jdbcDigestRealm as the JAAS
context.
Inthe solaris realm the server gets user credentials from the Solaris operating system. This
realmis supported on the Solaris 9 OS and later. Consult your Solaris documentation for
informationon managing users and groups in the solaris realm.
Acustom realm is any other repository of user credentials, such as a relational database or
third-partycomponent. For more information, see the Admin Console online help.
ToCongure a JDBC Realm for aWeb, EJB Application
TheEnterprise Server enables you to specify a user's credentials in the JDBC realm instead of in
theconnection pool. Using the JDBC realm instead of the connection pool prevents other
applicationsfrom browsing the database tables for the user's credentials. A user's credentials are
theuser's name and password.
Note– By default, storage of passwords as clear text is not supported in the JDBC realm. Under
normalcircumstances, passwords should not be stored as clear text.
Createthe database tables in which to store the users' credentialsfor the realm.
Howto create the database tables depends on the database that you are using.
Addthe users' credentials to the database tables that you createdin Step 1.
Howto add users' credentials to the database tables depends on the database that you are using.
Createa JDBC realm.
Usethe Admin Console GUI for this purpose. For instructions for creating a JDBC realm, see the
onlinehelp for the Admin Console GUI.
Specifythe realm that you created in Step 3 as the realmfor the application.
Tospecify the realm, modify the appropriate deployment descriptor for your application:
Foran enterprise application in an Enterprise Archive(EAR) le, modify the
sun-application.xmlle.
Fora web application in aWeb Application Archive (WAR) le, modify the web.xml le.
Foran enterprise bean in an EJB JAR le, modify the sun-ejb-jar.xml le.
Formore information about how to specify a realm, see “How to Set a Realm for an Application
orModule” in Sun GlassFish Enterprise Server 2.1 Developer’sGuide.
1
2
3
4
UnderstandingUsers,Groups, Roles, and Realms
Chapter9 • Conguring Security 107