+

Search Tips   |   Advanced Search

The Kerberos configuration file


The Kerberos configuration properties, krb5.ini or krb5.conf files, must be configured on every WAS instance in a cell in order to use the SPNEGO TAI for WAS.

Deprecated feature:

In WAS V6.1, a TAI that uses the SPNEGO to securely negotiate and authenticate HTTP requests for secured resources was introduced. In WAS 7.0, this function is now deprecated. SPNEGO Web authentication has taken its place to provide dynamic reload of the SPNEGO filters and to enable fallback to the application login method. depfeat The default Kerberos configuration file name for Windows is krb5.ini,. For other platforms is the default Kerberos configuration file name is krb5.conf,. The default location for the Kerberos configuration file is shown below:


Table 1. Default locations for Kerberos configuration file

Operating System Default Location
Windows c:\winnt\krb5.ini

If the krb5.ini file is not located in the c:\winnt directory it might be located in c:\windows directory.

Linux /etc/krb5.conf
other UNIX-based /etc/krb5/krb5.conf
z/OS /etc/krb5/krb5.conf
IBM i /QIBM/UserData/OS400/NetworkAuthentication/krb5.conf

If we don't use the default location and Kerberos configuration file name, then we have to update *.krb5ConfigFile properties in the soap.client.prop, ipc.client.props and sas.client.props files.

If the client programmatic login uses the WSKRBLogin module, also set the java.security.krb5.conf JVM property.

For SPNEGO TAI, if we don't use the default location and Kerberos configuration file name, then specify the java.security.krb5.conf JVM property.

The default Kerberos configuration file on Windows is /winnt/krb5.ini and on a distributed environment is /etc/krb5. If we specify another location path, then also specify the java.security.krb5.conf JVM property.

For example, if the krb5.conf file is specified at /IBM/WAS/profiles/AppServer/etc/krb5.conf, then specify -Djava.security.krb5.conf=/IBM/WAS/profiles/AppServer/etc/krb5.conf. The WebSphere runtime code searches for the Kerberos configuration file in the order as follows:

  1. The file referenced by the Java property java.security.krb5.conf

  2. <java.home>/lib/security/krb5.conf

  3. c:\winnt\krb5.ini on Microsoft Windows platforms

  4. /etc/krb5/krb5.conf on UNIX platforms

  5. /etc/krb5.conf on Linuxplatforms.

Use the wsadmin utility to configure the SPNEGO TAI for WAS:

  1. Start WAS.

  2. Start the command-line utility by running the wsadmin command from the APP_ROOT/bin directory.

  3. At the wsadmin prompt...

    $AdminTask createKrbConfigFile You can use the following parameters with this command:


    Table 2. Command parameters

    Option Description
    <krbPath> Required. It provides the fully qualified file system location of the Kerberos configuration (krb5.ini or krb5.conf) file.
    <realm> Required. It provides the Kerberos realm name. The value of this attribute is used by the SPNEGO TAI to form the Kerberos service principal name for each of the hosts specified with the property com.ibm.ws.security.spnego.SPN<id>.hostName.
    <kdcHost> Required. It provides the host name of the Kerberos Key Distribution Center (KDC).
    <kdcPort> This parameter is optional. It provides the port number of the KDC. The default value, if not specified, is 88.
    <dns> Required. It provides the default DNS used to produce a fully qualified host name.
    <keytabPath> Required. It provides the file system location of the Kerberos keytab file.
    <encryption> This parameter is optional. It identifies the list of supported encryption types, separated by a space. The specified value is used for the default_tkt_enctypes and default_tgs_enctypes. The default encryption types, if not specified, are des-cbc-md5 and rc4-hmac.

In the following example, the wsadmin command creates the krb5.ini file in the c:\winnt directory. The default Kerberos keytab file is also in c:\winnt. The actual Kerberos realm name is WSSEC.AUSTIN.IBM.COM and the KDC host name is host1.mpls.setgetweb.com.

wsadmin>$AdminTask createKrbConfigFile {-krbPath  c:\winnt\krb5.ini -realm WSSEC.AUSTIN.IBM.COM -kdcHost host1.mpls.setgetweb.com
 -dns mpls.setgetweb.com -keytabPath c:\winnt\krb5.keytab}

The wsadmin command above creates a krb5.ini file as follows:

[libdefaults]
 default_realm = WSSEC.AUSTIN.IBM.COM
        default_keytab_name = FILE:c:\winnt\krb5.keytab
        default_tkt_enctypes = des-cbc-md5 rc4-hmac
        default_tgs_enctypes = des-cbc-md5 rc4-hmac
[realms]
        WSSEC.AUSTIN.IBM.COM = {
  kdc = host1.mpls.setgetweb.com:88
              default_domain = mpls.setgetweb.com        
}
[domain_realm]
        .mpls.setgetweb.com = WSSEC.AUSTIN.IBM.COM

Kerberos settings, the Kerberos key distribution center (KDC) name, and realm settings for the SPNEGO trust association interceptor (TAI) are provided in the Kerberos configuration file or through java.security.krb5.kdc and java.security.krb5.realm system property files.



 

Related tasks


Set security with scripting