Hitachi

uCosminexus Application Server Security Management Guide


5.4.4 Examples of JAAS configuration file definition

The following are examples of jaas.conf (the JAAS configuration file) definition.

Organization of this subsection

(1) Example of definition using Cosminexus standard login modules

When the following definition is made in the JAAS configuration file, the user ID used when the first-executed WebPasswordLoginModule authenticates the user is registered together with the realm name RealmA in the integrated user management session.

Example03 {
  com.cosminexus.admin.auth.login.WebPasswordLoginModule required
                          // This is to join the session
    com.cosminexus.admin.auth.realm="RealmA"
    com.cosminexus.admin.auth.ldap.r="0"
    com.cosminexus.admin.auth.ldap.w="1"
    ;
  com.cosminexus.admin.auth.login.DelegationLoginModule required
    com.cosminexus.admin.auth.custom.lm="my.login.MyLoginModule"
    my.login.useracctterm="acctTerm"
    ;
};

(2) Example of definition using custom login modules only

When the following definition is made in the JAAS configuration file, the user ID that is in the Principal object set by the first executed MyLoginModule1 commit method (the getName method value) is registered in the integrated user management session. (DelegationLoginModule registers the user ID.)

As com.cosminexus.admin.auth.realm is not specified, a null character (" ") is assigned as the realm name.

Example99 {
  com.cosminexus.admin.auth.login.DelegationLoginModule required
                          // This is to join the session
    com.cosminexus.admin.auth.custom.lm="my.login.MyLoginModule1"
    ;
  com.cosminexus.admin.auth.login.DelegationLoginModule required
    com.cosminexus.admin.auth.custom.lm="my.login.MyLoginModule2"
    ;
};

If MyLoginModule1 does not set the Principal object in the Subject, the user ID in the object set by MyLoginModule2 is registered in the integrated user management session. If MyLoginModule2 also does not set the Principal object, no user ID is registered in the integrated user management session.

For details about jaas.conf, see 14.2.1 jaas.conf (JAAS configuration file).