SIM301 Integrating Microsoft Active Directory With The SAP J2EE Engine
SIM301 Integrating Microsoft Active Directory With The SAP J2EE Engine
Integrating Microsoft
Active Directory With
the SAP J2EE Engine
Disclaimer
Dong Pan
SAP America
Michael Sambeth
SAP AG
Wrap-Up
What End Users Want …
Wrap-Up
Connect J2EE Engine to ADS
Connect J2EE Engine to Multiple ADS Domains
LDAP Groups
User ID Resolution and Single Sign-On
Connect J2EE Engine to ADAM
Connect J2EE Engine to ADS via SSL
Maintain a Highly Available LDAP Connection
Determine Your LDAP Structure – Deep Hierarchy
Main characteristic
Users are entries below the group of which they are a member
Disadvantage
Users can only appear at one point in the directory tree and can
therefore only be members of one group and its super groups
DIT has separate branches for user and group data. There are
2 possibilities:
– Each group has an attribute that lists the members of that group
– Each user has an attribute listing the groups of which the user is
a member
Configuration Steps
Define LDAP Connection Properties in UME Data Source Configuration
XML File
Maintain service user password in UME property
ume.ldap.access.additional_password.n (n=1-5)
Limitations
Can connect only up to 5 domains due to performance concerns
LDAP groups cannot span across multiple domains
Pros
Single connection to the whole Active Directory
forest – no limitation on the number of domains
Better search performance, esp. in multi-domain environment
Cons
Global Catalog is always read-only, i.e.,
– No creation of users/groups by J2EE engine
– No password modification by J2EE engine
Only Universal and Global groups are visible
Blocked Groups
Group Administrators, Guests in the LDAP server are not visible by
default: Ume.ldap.blocked_groups=Administrators, Guests
Any unique LDAP attribute of the user account, if it does not exceed 240 characters:
User Principal Name, e.g.. [email protected]
Custom-defined unique attribute, e.g., sapusername
Modify the data source configuration XML file to change the user id resolution method
Map the j_user attribute of the User object to User Principal Name (UPN)
<attribute name="j_user">
<physicalAttribute name="userprincipalname"/>
</attribute>
Problem
SSO with SAP Logon Ticket based on UPN is not accepted by SAP
ABAP backend systems
Solution
Define SAP Reference System, and then define User Mapping for
the SAP Reference System
Problem
SSO with SAP Logon Ticket based on UPN is not accepted by J2EE
backend system whose user store is an SAP ABAP system
Solution
<attribute name="j_user">
<physicalAttribute name=“uid"/>
</attribute>
<attribute name="uniquename">
<physicalAttribute name=“uid"/>
</attribute>
...
<privateSection>
<ume.ldap.access.naming_attribute.uacc>cn</ume.ldap.access.auxiliary_naming_at
tribute.uacc>
<ume.ldap.access.naming_attribute.uacc>cn</ume.ldap.access.auxiliary_naming_at
tribute.uacc>
</privateSection>
Prerequisite
Administrator, Guest and service users should not be stored in LDAP
Restrictions
SSL with Client Certificate Authentication is not supported
Import LDAP Root Certificate into the J2EE engine’s TrustedCAs store
Wrap-Up
SPNego Introduction
DEMO SPNego Setup With Single Domain/Forest
DEMO SPNego Setup With Multiple Domain/Forest
Key Configurations
Common Problems
Kerberos Authentication
Key Distribution
Mutual Authentication
Option Description
useKeyTab=true The login module will get the principal's key from
the keyTab. If keyTab is not set then the module
will locate the keyTab from the krb5 config file
keyTab=/usr/sap/.../ke Path to the keyTab file
ytab
doNotPrompt=true Do not prompt for password if credentials cannot
be obtained from ticketCache or keyTab
storeKey=true Store the principal's key in the Subject's private
credentials.
principal=j2e_f38_pen The name of the principal that should be used
[email protected] when there are credentials for multiple principals
OM in the keyTab
useTicketCache=true Obtain the TGT from the ticket cache
debug = true Output debug messages
KVNO: 1
Key type: 3
Key: 0x3725dcb5b1a139d
KVNO: 1
Key type: 3
Key: 0xa7a268a23d32515d
Î Related Resources
Introduction to Active Directory
http://www.microsoft.com/windowsserver2003/technologies/directory/activedire
ctory/default.mspx
Active Directory Application Mode
http://www.microsoft.com/windowsserver2003/adam/default.mspx
How the Kerberos Version 5 Authentication Protocol Works
http://technet2.microsoft.com/WindowsServer/en/library/4a1daa3e-b45c-44ea-
a0b6-fe8910f92f281033.mspx?mfr=true
HTTP-Based Cross-Platform Authentication via the Negotiate Protocol
http://msdn2.microsoft.com/en-gb/library/ms995329.aspx
Thank You !
Flat Hierarchy
Deep Hierarchy
PRINCIPAL_RELATION_PARENT_ATTRIBUTE memberof
REFERENCE_SYSTEM_USER sapusername
j_user samaccountname
logonalias samaccountname
j_password unicodepwd
PRINCIPAL_RELATION_PARENT_ATTRIBUTE *null*
REFERENCE_SYSTEM_USER sapusername
j_user samaccountname
logonalias samaccountname
j_password unicodepwd
UserAccountControl Description
Attribute
2 (0x2) ACCOUNTDISABLE
ume.ldap.access.msads.control_value=512
By default, created users are locked. To create normal users, set the
following UME properties:
ume.ldap.access.msads.control_attribute=msds-useraccountdisabled
ume.ldap.access.msads.control_value=FALSE
Group-Type Description
Attribute
2 Specifies a group with global scope
ume.ldap.access.msads.grouptype.attribute=none
ume.ldap.access.msads.grouptype.attribute=grouptype
ume.ldap.access.msads.grouptype.attribute=
Parameters Value
ume.persistence.data_source_configuration dataSourceConfiguration_ads
_readonly_db.xml
ume.ldap.access.server_name <LDAP Server Name>
ume.ldap.access.server_port 389/3268
ume.ldap.access.base_path.user DC=company,DC=com
ume.ldap.access.base_path.grup DC=company,DC=com
<privateSection>
...
<ume.ldap.access.server_type>MSADS</ume.ldap.access.server_type>
<ume.ldap.access.server_name>Domain1_Controller</ume.ldap.access.server_na
me>
<ume.ldap.access.server_port>389</ume.ldap.access.server_port>
<ume.ldap.access.user>CN=serviceuser1,CN=Users,DC=Domain1,DC=com</ume.
ldap.access.user>
<ume.ldap.access.password>$ume.ldap.access.additional_password.1</ume.ldap
.access.password>
<ume.ldap.access.base_path.user>USERPATH</ume.ldap.access.base_path.user
>
<ume.ldap.access.base_path.grup>GROUPPATH</ume.ldap.access.base_path.gr
up>
...
</privateSection>
SPNego Tokens
<attribute name="krb5principalname">
<physicalAttribute name="userprincipalname"/>
</attribute>
<attribute name="kpnprefix">
<physicalAttribute name="samaccountname"/>
</attribute>
<attribute name="dn">
<physicalAttribute name="distinguishedname"/>
</attribute>
Section Description
mechTypes The Security Mechanisms supported by the
client, e.g., 1.2.840.113554.1.2.2 for Kerberos V5
reqFlags Token flags
mechToken initial MechToken (Kerberos Ticket)
Section Description
negResult Negotiation Result: accept_completed,
accept_incomplete or rejected
supportedMech A single supported mechanism (Kerberos)
responseToken Response MechToken
ABAP Professional SAP Certified Development Professional - ABAP System Interfaces with SAP NetWeaver 7.0
SAP NetWeaver 7.0
ABAP Associate SAP Certified Development Consultant – ABAP Dev with NetWeaver 2004 SAP NetWeaver 2004
ABAP Associate SAP Certified Development Associate – ABAP with SAP NetWeaver 7.0 SAP NetWeaver 7.0
ADM Professional SAP Certified Technology Professional – NetWeaver 7.0 Platform SAP NetWeaver 7.0
ADM Professional SAP Certified Technology Professional – NetWeaver 7.0 Security SAP NetWeaver 7.0
ADM Associate SAP Certified Technology Associate – SAP Web AS Platform with Oracle SAP NetWeaver 2004
ADM Associate SAP Certified Technology Consultant – NetWeaver 7.0 SysAd with Oracle SAP NetWeaver 7.0
BI Associate Solution Consultant SAP NetWeaver ’04s – SAP BI SAP NetWeaver 7.0
E2E Associate SAP Certified E2E Application Management Expert – Change Control Mgmt SAP NetWeaver 7.0
E2E Associate SAP Certified E2E Application Management Expert – Root Cause Analysis SAP NetWeaver 7.0
Java Professional SAP Certified Development Professional – JAVA with NetWeaver 7.0 SAP NetWeaver 7.0
Java Associate SAP Certified Development Associate – JAVA with NetWeaver 7.0 SAP NetWeaver 7.0
MDM Associate SAP Certified Application Associate – Master Data Management 5.5 (SP04) SAP NetWeaver 2004
SM Associate Solution Consultant SAP Solution Manager 4.0 – Implementation Tools SAP NetWeaver 7.0
SOA Associate SAP Certified Associate Enterprise Architect Enterprise SOA
XI Associate Certification Development Consultant SAP NetWeaver 2004s SAP NetWeaver 7.0
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be
changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, System i, System i5, System p,
System p5, System x, System z, System z9, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, POWER5+, OpenPower and PowerPC are
trademarks or registered trademarks of IBM Corporation.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.
MaxDB is a trademark of MySQL AB, Sweden.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies.
Data contained in this document serves informational purposes only. National product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior
written permission of SAP AG.
This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments,
and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note that this
document is subject to change and may be changed by SAP at any time without notice.
SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, or other items
contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability,
fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This
limitation shall not apply in cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in
these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.