Java Reference
In-Depth Information
Setting up your first login module
In the following section, we will demonstrate how to secure an application using the
RealmDirect security domain, which was introduced earlier. The RealmDirect login
module is based on the following two files:
application-users.properties : This contains the list of usernames and
passwords
application-roles.properties : This contains the mapping between the
users and their roles
These files are located in the application server configuration folder and they are updated
each time you add a new user via the add-user.sh/add-user.cmd script. For our
purpose, we will create a new application user named demouser , which belongs to the
role Manager , as shown in the following screenshot:
Once the user is added, the application-users.properties file will contain the
username and the MD5 encoding of the password, shown as follows:
demouser=9e21f32c593ef5248e7d6b2aab28717b
Conversely, the application-roles.properties file will contain the roles gran-
ted to the demouser username once logged in:
demouser=Manager
Search WWH ::




Custom Search