2010 Wls Adsso

45
SAGE Computing Services Consulting and customised training workshops Active Directory Integration AD, WLS & ADF in Harmony (a case study) Ray Tindall Senior Systems Consultant www.sagecomputing.com.au

description

test

Transcript of 2010 Wls Adsso

Page 1: 2010 Wls Adsso

SAGE Computing ServicesConsulting and customised training

workshops

Active Directory Integration

AD, WLS & ADF in Harmony(a case study)

Ray TindallSenior Systems Consultant

www.sagecomputing.com.au

Page 2: 2010 Wls Adsso

Things have changed since 2006

www.sagecomputing.com.au

Active Directory Integration

“OID & AD in Harmony?”WLS

SSO Portal

Page 3: 2010 Wls Adsso

Things have changed since 2006

www.sagecomputing.com.au

Synchronisation of OID & ADAD LDAP Provider

SSO Delegated AuthenticationADF Security

Windows Native Authentication with SSO

Kerberos with WLS

Forms

Page 4: 2010 Wls Adsso

Agenda Overview

Who, What &WhyThe primary Goal

Resources & ReferencesIBM

The Plan & The PathImplementation

How we did it – How you can do it

TestingTroubleshooting & Hints

Wrap upWhere are we now

IBM???

Page 5: 2010 Wls Adsso

Who, What & Why

www.sagecomputing.com.au

Who?

What?The System

Why?The Wishlist

Weblogic Server 10.3.2. ADF 11.1.1.2. Active Directory

on Windows Server 2003(now 2008 R2)

Windows workstationswith IE 7

Seamless & transparent authentication (login) against AD

Authorisation against AD (Groups)

Forms to ADF interoperability Scope to expand

Page 6: 2010 Wls Adsso

The Primary Goal

www.sagecomputing.com.au

Page 7: 2010 Wls Adsso

Resources & References

www.sagecomputing.com.au

Administering the SPNEGO TAI: Tips on using Kerberos service principal namesby Martin Lansche, IBM

Configuring Kerberos with Weblogic Serverby Faisal Khan, SecureZone

Troubleshooting Kerberos issues with Weblogic serverby Faisal Khan, SecureZone

Configuring WLS With MS Active Directoryby Chris Muir, SAGE Computing

Configuring a JDev 11g ADF Security app on standalone WLS against MS Active Directoryby Chris Muir, SAGE Computing

Oracle® Fusion Middleware Securing Oracle WebLogic Server, 11g Release 1 (10.3.1), 6 Configuring Single Sign-On with Microsoft Clients

This “is” 10.3.2 !

Page 8: 2010 Wls Adsso

The Plan & The Path

www.sagecomputing.com.au

Proof of Concept – DEVNew system on new infrastructure

Target Apps – DEVWLS on VM – Snapshots

Risks:Production AD only!Load Balancing – PROD only

Page 9: 2010 Wls Adsso

How to Get There

www.sagecomputing.com.au

Implementation Key ConceptsAD LDAP Provider

Kerberos with WLS

ADF Security

Page 10: 2010 Wls Adsso

How to Get There

www.sagecomputing.com.au

Implementation Task OverviewNetwork & AD preparationWLS AD AuthenticationWLS Host Kerberos configurationWLS Kerberos configurationClients (Browser/s) configuration

Apps (ADF Application) configuration

Test (with your favourite beverage at hand)

Troubleshoot (with your favourite beverage at hand)

Page 11: 2010 Wls Adsso

Environment Specifics

www.sagecomputing.com.au

KDC server: OURKDC(.dtf.wa.gov.au)Windows domain controller serving as Key Distribution CentreMost doco (inc Official) implies to use IP but use DNS instead!

Default AD domain: dtf.wa.gov.au

Kerberos Realm: DTF.WA.GOV.AUUppercase of Domain

WLS AD account: wlskerberosadacc / obscurepwd“User" AD account used for WLS Host & to map Service PrincipalOfficial doco says just use simple machine name

NO! - Bad idea; make it different and make it descriptive

WLS Virtual Host DNS: ourvirtualwls(.dtf.wa.gov.au)URL you will use to access your Web Applications

Also serves as the basis of the Service PrincipalOfficial doco doesn't even mention Virtual Host as consideration

BUT! - Critical for same Domain Windows WLS host*& good idea in other cases anyway.

*The machine name URL will already exist in a Windows Domain, being HOST\machine.dtf.wa.gov.au, as a Service Principal against the Machine Computer account in AD.At runtime Kerberos will derive the basis of the Service Principal from the browser URL.AD will find and default to the HOST\ Service Principal and try to use the “computer” account instead of finding our HTTP\ Service Principal and using our WLS “user” AD account. The credentials in your Keytab will not match the ticket returned by AD.

Bottom line: ignoring the protocol HTTP\, the URL of the Service Principal that will be used to access your Web Applications should exist in AD only once!

*The machine name URL will already exist in a Windows Domain, being HOST\machine.dtf.wa.gov.au, as a Service Principal against the Machine Computer account in AD.At runtime Kerberos will derive the basis of the Service Principal from the browser URL.AD will find and default to the HOST\ Service Principal and try to use the “computer” account instead of finding our HTTP\ Service Principal and using our WLS “user” AD account. The credentials in your Keytab will not match the ticket returned by AD.

Bottom line: ignoring the protocol HTTP\, the URL of the Service Principal that will be used to access your Web Applications should exist in AD only once!

Page 12: 2010 Wls Adsso

Network & AD preparation

www.sagecomputing.com.au

Implementation Steps:

1. Create Virtual Host DNS

2. Create WLS Service AD “user” account

3. Map SPN (Service Principal) with setspn

& generate Keytab with ktab

Linux – use ktpass instead

Page 13: 2010 Wls Adsso

Implementation Steps:

1. Create Virtual Host DNS

2. Create WLS Service AD “user” account

3. Map SPN (Service Principal) with setspn

& generate Keytab with ktab

Linux – use ktpass instead

Page 14: 2010 Wls Adsso

Implementation Steps:

1. Create Virtual Host DNS

2. Create WLS Service AD “user” account

3. Map SPN (Service Principal) with setspn

& generate Keytab with ktab

Linux – use ktpass instead

Not computer

!

Not strictly needed with JDK

1.5+

Page 15: 2010 Wls Adsso

Implementation Steps:

1. Create Virtual Host DNS

2. Create WLS Service AD “user” account

3. Map SPN (Service Principal) with setspn

& generate Keytab with ktab

Linux – use ktpass instead

Must be your user service

account.

Get it right.Not

validated!

Page 16: 2010 Wls Adsso

WLS AD Authentication

www.sagecomputing.com.au

Implementation Steps:

4. Create WLS AD Authentication Provider

WLS LDAPAuthenticator

5. Test Authentication Provider

Configuring a JDev 11g ADF Security app on standalone WLS against MS Active

Directoryby Chris Muir, SAGE Computing

Page 17: 2010 Wls Adsso

Implementation Steps:

4. Create WLS AD Authentication Provider

WLS LDAPAuthenticator

5. Test Authentication Provider

Configuring a JDev 11g ADF Security app on standalone WLS against MS Active

Directoryby Chris Muir, SAGE Computing

Remove!

Remove?

Page 18: 2010 Wls Adsso

Implementation Steps:

4. Create WLS AD Authentication Provider

WLS LDAPAuthenticator

5. Test Authentication Provider

Configuring a JDev 11g ADF Security app on standalone WLS against MS Active

Directoryby Chris Muir, SAGE Computing

Page 19: 2010 Wls Adsso

WLS Host Kerberos configuration

www.sagecomputing.com.au

Implementation Steps:

6. Create krb5.ini

7. Copy Keytab to WLS

for Linux ftp – note this is a binary file

8. Test Host Kerberos with kinit

Go no further if this no worky!

Page 20: 2010 Wls Adsso

Implementation Steps:

6. Create krb5.ini

7. Copy Keytab to WLS

for Linux ftp – note this is a binary file

8. Test Host Kerberos with kinit

Not strictly needed with JDK

1.5+

Case sensitive

Page 21: 2010 Wls Adsso

Implementation Steps:

6. Create krb5.ini

7. Copy Keytab to WLS

for Linux ftp – note this is a binary file

8. Test Host Kerberos with kinit

Page 22: 2010 Wls Adsso

Implementation Steps:

6. Create krb5.ini

7. Copy Keytab to WLS

for Linux ftp – note this is a binary file

8. Test Host Kerberos with kinit

Page 23: 2010 Wls Adsso

WLS Kerberos configuration

www.sagecomputing.com.au

Implementation Steps:

9. Create krb5Login.conf

10.Add WLS Kerberos startup parameters

startWebLogic.cmd

11.Create Identity Assertion Provider

WLS NegotiateIdentityAsserter

Page 24: 2010 Wls Adsso

Implementation Steps:

9. Create krb5Login.conf

10.Add WLS Kerberos startup parameters

startWebLogic.cmd

11.Create Identity Assertion Provider

WLS NegotiateIdentityAsserter

Page 25: 2010 Wls Adsso

Implementation Steps:

9. Create krb5Login.conf

10.Add WLS Kerberos startup parameters

startWebLogic.cmd

11.Create Identity Assertion Provider

WLS NegotiateIdentityAsserter

Page 26: 2010 Wls Adsso

Implementation Steps:

9. Create krb5Login.conf

10.Add WLS Kerberos startup parameters

startWebLogic.cmd

11.Create Identity Assertion Provider

WLS NegotiateIdentityAsserter

Page 27: 2010 Wls Adsso

Client (Browser/s) configuration

www.sagecomputing.com.au

Implementation Steps:

12.Configure Windows Native Authentication

Auto logon for Intranet

IE

Firefox

Page 28: 2010 Wls Adsso

Implementation Steps:

12.Configure Windows Native Authentication

Auto logon for Intranet

IE

Firefox

Page 29: 2010 Wls Adsso

Implementation Steps:

12.Configure Windows Native Authentication

Auto logon for Intranet

IE

Firefox

Page 30: 2010 Wls Adsso

Apps (ADF Application) configuration

www.sagecomputing.com.au

Implementation Steps:

13.Configure ADF Application Security

Run - Configure ADF Security Wizard

Enterprise Roles (AD) Application Roles (ADF)

Web.xml <login-config>

<auth-method>CLIENT-CERT

13 steps; hmmm; is this a sign?

Page 31: 2010 Wls Adsso

Implementation Steps:

13.Configure ADF Application Security

Run - Configure ADF Security Wizard

Enterprise Roles (AD) Application Roles (ADF)

Web.xml <login-config>

<auth-method>CLIENT-CERT

Page 32: 2010 Wls Adsso

Testing

www.sagecomputing.com.au

LDAP Provider

Kinit (with keytab)

Bringing it all together

ADF Application

Transparent login

Wha…?I followed theInstructions!

Page 33: 2010 Wls Adsso

LDAP Provider

Kinit (with keytab)

Bringing it all together

ADF Application

Transparent login

Page 34: 2010 Wls Adsso

Troubleshooting

www.sagecomputing.com.au

When things just don’t go your way!

WLS Security debugWLS log level – standard out

Utilities checks (with verbose debug)Check AD user account

inc SPN mapping

Config fileskrb5.ini krb5Login.conf config.xml

AD LDAP Providerbase DNs, filters, search scopes

Wireshark... – in extreme cases

Page 35: 2010 Wls Adsso

When things just don’t go your way!

WLS Security debugWLS log level – standard out

Utilities checks (with verbose debug)Check AD user account

inc SPN mapping

Config fileskrb5.ini krb5Login.conf config.xml

AD LDAP Providerbase DNs, filters, search scopes

Wireshark... – in extreme cases

+ standard out log level>= notice

Due toCLIENT-CERT,FORM

Page 36: 2010 Wls Adsso

When things just don’t go your way!

WLS Security debugWLS log level – standard out

Utilities checks (with verbose debug)Check AD user account

inc SPN mapping

Config fileskrb5.ini krb5Login.conf config.xml

AD LDAP Providerbase DNs, filters, search scopes

Wireshark... – in extreme cases

Best to have 1 only

Don’t be fooled.Normal!

Success

Page 37: 2010 Wls Adsso

When things just don’t go your way!

WLS Security debugWLS log level – standard out

Utilities checks (with verbose debug)Check AD user account

inc SPN mapping

Config fileskrb5.ini krb5Login.conf config.xml

AD LDAP Providerbase DNs, filters, search scopes

Wireshark... – in extreme cases

Server Admin Pack

SofterraLDAP

Browser

Page 38: 2010 Wls Adsso

When things just don’t go your way!

WLS Security debugWLS log level – standard out

Utilities checks (with verbose debug)Check AD user account

inc SPN mapping

Config fileskrb5.ini krb5Login.conf config.xml

AD LDAP Providerbase DNs, filters, search scopes

Wireshark... – in extreme cases

Case sensitivity

Syntax

Linux?Has this

changed?

No krb5.prior to JDK

6.0Include

prior options

Page 39: 2010 Wls Adsso

When things just don’t go your way!

WLS Security debugWLS log level – standard out

Utilities checks (with verbose debug)Check AD user account

inc SPN mapping

Config fileskrb5.ini krb5Login.conf config.xml

AD LDAP Providerbase DNs, filters, search scopes

Wireshark... – in extreme cases

Page 40: 2010 Wls Adsso

When things just don’t go your way!

WLS Security debugWLS log level – standard out

Utilities checks (with verbose debug)Check AD user account

inc SPN mapping

Config fileskrb5.ini krb5Login.conf config.xml

AD LDAP Providerbase DNs, filters, search scopes

Wireshark... – in extreme cases

Debug = java kinit

Success

Checksum failed! ?

Page 41: 2010 Wls Adsso

Traps

www.sagecomputing.com.au

Naming & Case sensitivityDon’t name AD account same as WLS HostMind case sensitivity & syntax (especially krb5.ini)

Must be only “one” SPN URL in ADldifde to check for duplicates setspn –D to remove bad or duplicate SPNs

Kerberos / WLS can’t find config files (krb5.ini keytab krb5Login.conf)

Know & use default locations for themTry absolute paths where referenced in dependant configTry WLS/Host reboot

Order of WLS Providers

Asserter followed by LDAP Provider then defaults

Use Virtual URL - not host URL

Configure 2nd DNS – not DNS alias

Clear Browser cache/s

Clock Skew - AD, WLS, Client within 2mins

Does host need WA Daylight Saving patch

Note: Does not require

WLS VH definition

Page 42: 2010 Wls Adsso

Hints & Tips

www.sagecomputing.com.au

WLS / Host reboots at critical points

Check full range of options for utilities (kinit ktab klist)

java core of these for verbose debug output

Use CLIENT-CERT only in ADF Security for troubleshootingCLIENT-CERT,FORM may not produce debug message output

Use client local hosts in lieu of no DNS

Also useful to test specific node in Load Balanced scenario

Load Balanced / Proxy scenario - same keytab / setup on each node

DNS/Virtual URL (for SPN) is the URL the LBR/Proxy routes

Performance hits

Mind recursive & deep Group searching

Check & turn off all DEBUG once happy

Multiple technologies – look outside the Oracle box

Linux – ktpass changes AD accountName changes to HTTP/former_name

Mind this for kinit & krb5Login.conf setup

Page 43: 2010 Wls Adsso

www.sagecomputing.com.au

Job Done!Job Done!

““Celebrate”Celebrate”

Page 44: 2010 Wls Adsso

Current Status

www.sagecomputing.com.au

Friends?No Problem!

Proof of Concept – DEV

TEST

UAT

PRODGo Live – coming weekend

Page 45: 2010 Wls Adsso

Thankyou!

Questions?

Presentations are available from our website:www.sagecomputing.com.au

[email protected]

SAGE Computing ServicesConsulting and customised training

workshops

Peace&

Harmony