Configuring Kerberos Based SSO in Solaris and Weblogic
Configuring Kerberos Based SSO in Solaris and Weblogic
Configuring Kerberos
based SSO in Solaris and
Weblogic Application
server Environment
Kerberos configuration
Saravana Kumar KKB & Arvind Kumar P
About the authors: Saravana is working as a Staff Software Engineer (QA) for IBM Policy N team under
ECM. You can contact him with your queries at [email protected]. Arvind is working as a Advisory
Software Engineer QA for Atlas team under ECM. Reach out to him at [email protected]
[Abstract: Today many products have support for SSO. Kerberos is most recommended
efficient and secure network accesses across the enterprise. This article provides
information about the configuration of single sign-on (SSO) using Kerberos in Oracle
Solaris and Oracle Web logic server.]
Introduction:
Single sign-on (SSO) allows users to sign in once to the system and login to other
application without any authentication.
2 Machine configuration:
2.1 What is KDC ?
The Kerberos Key Distribution Center (KDC) is a network service that supplies session
tickets and temporary session keys to users and computers within an Active Directory
domain. The KDC runs on each domain controller as part of Active Directory Domain
Services (AD DS).
Machine B
(weblogic.kerb. mycompany.com)
(ad.kerb.mycompany.com)
7
Windows 2008/2012
KDC/
Domain controller
6
Solaris 10
Weblogic
Application server
4
1
3
2
Client.Kerb. mycompany.com
8
5
Client Machine
Windows 8/ 7/vista(Browser)
Machine C
3 Scenario Overview:
This scenario contains 2 major parts:
1. Adding the Solaris machine to Domain controller
2. Configuring Oracle Weblogic server for Kerberos
This scenario requires the following Pre-requisite:
A functioning Microsoft Windows 2008 Active Directory Domain
Including:
A domain controller
A client workstation
Users must be able to log in to the domain.
A working domain controller and at least one client computer in that domain is required.
Using SPNEGO from the domain controller does not work. For more information, you can
find the tutorial How do I install Active Directory on the Windows Server 2008 server at:
http://www.petri.co.il/installing-active-directory-windows-server-2008.htm
4 Steps:
4.1 Machine: KDC- scenario name: Machine A
1. Create a user in Active directory
E.g.: solaris229
Dont select any option except password, it will not expire and user cannot change
password.
Transfer the keytab file to weblogic machine and to the domain bin directory of weblogic.
3. Edit the krb5.conf file and kdc.conf file in /etc/krb5 directory as mentioned
below
Path: /etc/krb5/krb5.conf
Move the krb5.conf file to Weblogic domain bin directory
--------------[libdefaults]
default_realm = KERB.MYCOMPANY.COM
default_tkt_enctypes = rc4-hmac arcfour-hmac-md5
default_tgs_enctypes = rc4-hmac arcfour-hmac-md5
ticket_lifetime = 600
[realms]
KERB. MYCOMPANY.COM = {
kdc = 9.126.145.237:88
admin_server = ad
default_domain = KERB. MYCOMPANY.COM
[appdefaults]
kinit = {
autologin = true
renewable = true
forward = true
encrypt = true
forwardable= true
}
gkadmin = {
help_url = http://docs.sun.com:80/ab2/coll.384.1/SEAM/@AB2PageView/1195
}
Path: /etc/krb5/kdc.conf
----------defaults]
kdc_ports = 88
[realms]
KERB.MYCOMPANY.COM = {
profile = /etc/krb5/krb5.conf
database_name = /var/krb5/principal
admin_keytab = /etc/krb5/krb5.keytab
acl_file = /etc/krb5/kadm5.acl
kadmind_port = 749
max_life = 8h 0m 0s
max_renewable_life = 7d 0h 0m 0s
default_principal_flags = +preauth
}
4. Add below lines in nsswitch.conf
Path : /etc/nsswitch.conf
---------passwd: files ldap winbind
group: files ldap winbind
{
com.sun.security.auth.module.Krb5LoginModule required
principal=<SPN username> useKeyTab=true
keyTab=<path of the key Tab file name> storeKey=true debug=true;
};
7
10
11
12
13
6 Troubleshooting commands
Run the below command in Solaris / Weblogic server machine
bash-3.00$ kinit -V -k -t
<path of the keytab file> <spn name>
Eg:
/export/home/oracle/Oracle/Middleware/user_projects/domains/policyatlas/bin/krb5.keyta
b HTTP/[email protected]
This should result the following message to confirm SON Username is able to authenticate
with KDC and using the key tab file which was generated.
Result:
Authenticated to Kerberos v5
14