configure principal propagation using logon tickets in net...

27
SAP NetWeaver Demo Configure Principal Propagation using Logon tickets in Net weaver Process Integration 7.1 Applied To : SAP Net Weaver Process Integration 7.1x and higher Topic Area: SOA Middleware Capability: Security Version 1.0 March 2009

Upload: phungnhu

Post on 30-Jan-2018

224 views

Category:

Documents


2 download

TRANSCRIPT

SAP NetWeaverDemo

Configure Principal Propagationusing Logon tickets in Net weaverProcess Integration 7.1

Applied To :

SAP Net Weaver Process Integration 7.1x and higher

Topic Area:SOA Middleware

Capability:Security

Version 1.0

March 2009

Applied To :

SAP Netweaver Process Integration 7.1

SAP Application Server ABAP 7.1

SAP Application Server ABAP 7.0 SP14

Summary :

Single Sign On has been one of the most popular security mechanisms wherever transport levelsecurity is required.This document describes how Principal Propagation can be done for PI 7.1systems.

Author : Neha Khasgiwale

Company : SAP GDC , Gurgaon

Created On : 17 Feb 2009

Author Bio

Neha Khasgiwale is working in SAP GD in SAP PI from 2007-2009.Prior to that she has also workedin IBM from 2005-2006

Table of Contents

1. Business Scenario ..........................................................................................................1

1.1 Introduction...............................................................................................................1

1.2 Scenario Description.................................................................................................2

2. Background Information .................................................................................................3

2.1 Software ...................................................................................................................3

2.1.1 Supported releases.......................................................................................3

3. Configuration Steps in Detail..........................................................................................4

3.1 Enabling Principal Propagation .................................................................................4

3.2 Enabling the Sender .................................................................................................4

3.3 Issue Logon tickets from the sender system..............................................................5

3.4 Configure the System to accept login tickets .............................................................63.5 Install Certificates in Client and Server system ..........................................................7

3.6 Directory Configurations..........................................................................................15

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 1

1. Business Scenario

1.1IntroductionPrincipal propagation means the ability to forward the user context of a message unchanged from thesender to the receiver .This implies that the receiver interface runs under the same identity as thesender. SAP Logon tickets act as a flexible central authentication token used in the SAP world andcan be used for SSO to all SAP products in the back end.

SAP logon tickets provide authentication for various client and server components of the AS ABAPsystem .The user is authenticated using the Logon Ticket as the authentication Token. The user onlyneeds to be authenticated once (for eg: using a valid User and Password) and the system can issuethe Logon ticket to the user. This SAP logon ticket is stored as per session cookie or the clientbrowser .The authenticity and integrity is protected using digital signatures whereas the confidentialityof the token protected through the use of SSL protocol while in the transport. As a third measure theSAP Logon Ticket contains a validity period that can be configured in the security settings of the SAPApplication server.

This security system is highly beneficial in a complex system environment where there are manydifferent types of SAP systems in the system landscape .With the logon ticket the user can entersubsequent system without the need to reenter the user or Password.

For SAP Logon Authentication with client components ( for example , SAP GUI for Windows ) ,usersmust have the same user ID in all of the systems they need to access and their Web Browsers mustaccept cookies.

For server authentication between server components, both the accepting systems and issuing servermust have the synchronized system clocks. The issuing server must process a public and private keypair so that it can digitally sign the Logon Ticket. And the accepting systems must be in the sameDomain Name Server (DNS) domain as the issuing servers and the systems must have the public keycertificate top verify the digital signature of the logon ticket.

It is recommended that you identify one system in your system landscape as the ticket-issuing systembefore you configure other systems to accept tickets from this system. By default, the Personalsecurity Environment (PSE) is used to store the certificates. You can configure the AS ABAP systemto issue log-on tickets by setting profile parameter login/create_sso2_ticket to 2.

In the AS ABAP system needs to accept Logon tickets from a J2EE Engine, then you need to installSAP Cryptographic library and set the same profile parameter on AS ABAP system .In addition youalso need to manually import the J2EE engine public key certificate into the PSE using transactionSTRUST or STRUSTSSO2 (Trust Manager) .Use transaction STRUSTSSO2 to add J2EE Engine’ssystem ID and its Distinguished Name to the access control list .

You would like to use this feature in your SAP Netweaver PI 7.1 system.

Note

SAP Net Weaver PI 7.1 system is referred to as “PI system”, WS provider system as“Provider” and WS consumer system as “Consumer” in the remainder of this document.

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 2

1.2Scenario DescriptionNow lets us configure a test case to understand it better:

Principal propagation means the ability to forward the user context of a message unchanged from thesender to the receiver. It enables the authentication of a message in the receiver system with thesame user that issued the message in the corresponding sender system. Thus, the receiverapplication is virtually part of the sender application, and the permissions and audit functions of thereceiver application can be applied to the original user of the sender application.

Principal Propagation is implemented using authentication via SAP assertion tickets between theinvolved messaging components. Each communication step along the way from the sender to thereceiver requires a separate authentication for each messaging component before the message isexecuted Wherever you want to use an SAP assertion ticket for authentication between a sending anda receiving messaging component, you have to configure a trust relationship between the underlyingapplication servers first.

In the following, we describe the processes when the issuing or accepting server is the SAP J2EEEngine. Note however, depending on the scenario you use, other server components may act as theissuer or acceptor. The entire scenario can be expressed as a two step scenario :

Receiving a Logon Ticket from the SAP J2EE Engine

AS Java client configuration

AS ABAP client configuration

Using the Logon Ticket to Access the SAP J2EE Engine as an Accepting System

AS ABAP server configuration

AS Java server configuration

If an Adapter Engine (SOAP adapter or RFC adapter) is involved, a trust relationship must also beestablished between this Adapter Engine and the Integration Server. Therefore, the Adapter Engine(based on AS Java) and the Integration Server (based on AS ABAP) both act as server [S] and client[C], as shown in the following diagram:

Figure 1: Overview of the process

[S]Adapter Engine[C] [S]IS[C] [S]Adapter Engine[C]

The user that is executing the message equals the user that is to be propagated.

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 3

2. Background InformationThis security guide explains the security features included in SAP Net weaver included in PI andrecommends how to apply these features to protect data through Principal Propagation through SAPLogon Tickets.

2.1SoftwareThis section provides the details of supported releases for the applications (Consumer, IntegrationServer and Provider) and the version details of ABAP service pack, ABAP Kernel and Crypto library.The technology stack of backend can be AS ABAP, AS Java, or external system.

This guide makes the following assumptions:

An ABAP back-end is used at the consumer .

SAP NetWeaver PI 7.1 is installed.

2.1.1 Supported releasesConsumer – AS ABAP 7.0 >= SP14

Integration Server – AS ABAP 7.1 and higher

Provider – AS ABAP 7.0 >= SP14

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 4

3. Configuration Steps in DetailThis chapter covers the configuration steps required in back-end systems and PI system for messageprocessing with Integration Server communication.

3.1 Enabling Principal PropagationGo to sxmb_adm -> Configure Principal Propagation .Then Activate Principal Propagation .This needsto be done on all the systems involved in Principal Propagation- Issuing system (Sender) ,Intermediary system (PI System) , Receiver system .

This executes the report RSXMB_CONFIG_PP. This report creates the type 3 RFCdestination SAPXIPP<clnt>, where <clnt> represents the three-digit client of therespective messaging component. In addition, it generates the system user PIPPUSERwith a random password and the role SAP_XI_APPL_SERV_USER.

Figure 1 : Enable Principal Propagation

3.2 Enabling the SenderIn the sender system maintain a Dialog user on EC6 System with role SAP_XI_APPL_SERV_USER.This user will be propagated from one application to the other.

Enable RFC to Send Logon Tickets:In transaction SM59 enable the RFC to Send SAP Logon tickets.

1. Go to Transaction sm59.

2. Go to Connection Type TCP/IP connections.

3. Enter a short description and go to the tab Logon and Security.

4. Click on the Check box “Send SAP Logon Ticket”

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 5

Figure 2 : RFC connections maintained to send SAP Logon Ticket

This RFC destination would be used when you trigger the Sender RFC .Whenever the RFC istriggered a ticket is issued a Logon ticket is issued

3.3 Issue Logon tickets from the sender system1. Go to RZ11

2. Enter the profile parameter login/create_sso2_ticket= 1 in case of CA certificates andlogin/create_ssso2_ticket= 2 in case of self signed certificates.

3. Enter the Profile Value = 2

You need to create a logon ticket configuration once on the Ticket issuing side , and then on the PIsystem as well .

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 6

Figure 3 : Profile parameter to create logon ticket

Note : The parameters change to default when the server is restarted

3.4 Configure the System to accept login tickets

Goto RZ11 add the parameter login/accept_sso2_ticket = 1 .Click on Change Value.

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 7

Figure 4 : Maintain Profile parameter to accept the ticket

3.5 Install Certificates in Client and Server systemExport the Sender certificate system in AS ABAP client

1. On ABAP Client [C], call transaction STRUST and export the certificate as shown below:

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 8

Figure 5: Export WS Consumer system certificate

2. Choose ‘Binary’ file format as shown below:

Figure 6: Export dialog

You have made the certificate available as a file, which you can later import into the ABAPServer [S] system.

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 9

3. On ABAP Server [S], call transaction STRUSTSSO2 and import the certificate as shownbelow:

Figure 7: Import certificate into ABAP Server [S]

4. Select ‘Binary’ file format and import the client certificate which is saved as file from step 2

5. Click on ‘Add to Certificate List’ button to add this certificate to the list

6. Click on ‘Add to ACL’ button to add the client system to Access Control List of server asshown below:

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 10

Figure 8: Add to ACL

Save the data now and as a result, you will be able to see the ABAP Client [C] system added asan entry to the Access Control List window as given below:

Figure 9: Access Control List window

You need to perform the above steps for every client-server combination as explained in the aboveimportant note for establishing the SSO trust between all systems.

Install the AS Java server certificate

To issue SAP assertion tickets, the AS Java must sign them with a digital signature. For this purpose,a private key must be created together with a certificate containing the public key and imported intothe AS Java keystore.

1. Start the AS Java configuration tool

2. Expand the nodes Configurations cluster_config globals clusternode_configworkernode services

3. Expand the service com.sap.security.core.ume.service and choose the Propertysheetproperties.

Change to edit mode and set the following properties:

i. login.ticket_keyalias = SAPLogonTicketKeypair

ii. login.ticket_keystore = TicketKeystore

iii. login.ticket_client = <unique client>.

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 11

Figure 9: Property adjustment in SAP Login Module

Note

The system ID and client combination must be unique when tickets are accepted by an AS ABAPsystem. Therefore, in a combined ABAP and Java installation, where the system IDs are the same, youmust change the default client for the AS Java (000) to a client that does not exist on the AS ABAPsystem.Here in this case the client has been changed to 007.

4. Use the SAP NetWeaver Administrator and choose Configuration Management SecurityManagement Key Storage

5. Select the TicketKeyStore view and then the SAPLogonTicketKeypaircertificate.

6. In a dual-stack system where the SIDs for both the AS ABAP and the AS Java are the same,you must replace one of the key pairs so that the Distinguished Names are unique.

7. Select a TicketKeystore View.

8. Delete the SAPLogonTicketKeypair and SAPLogonTicketKeypair-cert entries.

9. Create a Key Pair and a Public-Key Certificate with the following properties.

For more information about creating key pairs in a key store view

a. Enter SAPLogonTicketKeypair as the key pair Entry Name.

b. Choose DSA as the algorithm to use.

c. Select the options to store the public key certificate

Enter the Subject Properties in the corresponding fields.

The entries in these fields build a Distinguished Name in the form:

CN=<Common Name>, OU=<Organization Unit Name>, O=<OrganizationName>, L=< Locality Name >, ST=<State/Province>, C=DE

The AS Java uses this public-key certificate to digitally sign logon tickets.

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 12

Figure 10 : Property adjustment in SAP Login Module

d. Go to Import from File and import this certificate to all the ticket accepting systems.

Figure 11: Import certificate from the Ticketkeystore

Configuring the AS Java to Accept Logon Tickets

The AS Java uses EvaluateTicketLoginModule to accept logon tickets for SSO. After receiving thelogon ticket from the user’s Web browser, the AS Java verifies the ticket signature based on the

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 13

established trust relationship with the issuing system. Based on the ticket validity, the AS Javaauthenticates the user.

1. Go to NWA -> Trusted Systems SSO Wizard

There are two ways to add a trusted system 1.) By connecting to the system and requesting itscertificate.2.) By manually uploading the certificate of the system.

2. In the Trusted Systems section, choose Add Trusted System By Querying Trusted System.The System Landscape Directory (SLD) opens automatically and lets you select the systemyou want to add. Select the system and choose OK. The connection details for the selectedsystem are displayed automatically.

3. Enter your user name and password in the provided fields and choose Next.

4. The details about the selected system’s certificate appear. To add the system, choose Finish.If you want to make changes, choose Back.

5. After you complete the wizard the ticket issuing system is shown in the trusted system list .The AS java issues logon tickets that have been issued by the corresponding server.

Figure 12: Add the trusted system

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 14

Figure 13: Final screen of the accepted trusted system

Manual AS Java Configuration for Accepting Logon Tickets

1. Export the ticket-issuing server’s public-key certificate. Note the following:

If the ticket-issuing server is a AS Java or a SAP NetWeaver Enterprise Portal 6.0 SP3 andhigher:

i. Using the Keystore Management functions in the NWA for the ticket-issuing ASJava, select the TicketKeystore view and the SAPLogonTicketKeypair-cert entry.

ii. Choose Export.

iii. Specify a file name. Use the file type X.509 Certificate with the extension .crt andchoose OK.

2. Maintain the logon ticket access control list in the options for the login moduleEvaluateTicketLoginModule (or EvaluateAssertionTicketLoginModule):

a. Using the authentication configuration functions of the NWA, open the configurationoptions for the EvaluateTicketLoginModule (or EvaluateAssertionTicketLoginModule)

b. Make the following entries in the login module configuration options for each ticket-issuing server from which the AS Java should accept logon tickets:

Name Valuetrustedsys<x> <SID>, <Client>

trustediss<x> <Issuer’s_Distinguished_Name>

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 15

trusteddn<x> <System’s_Distinguished_Name>

Distinguished Name of the ticket-issuing system.

ume.configuration.active True

3.6Directory ConfigurationsIn the PI system you need to maintain the configurations on the sender and the receiver side both.After doing all the directory configurations maintain the sender RFC configurations in the sendercommunication and then go to the sender agreement and enable Principal Propagation.

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 16

Sender Communication Channel

Sender Agreement

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 17

Receiver Agreement:

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 18

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 19

Receiver Communication Channel

1.Enter the Adapter Type as SOAP

2.Enter the URL that’s picked up from the WSDL provided in SOAMANAGER of the receiving system .

3.Give the Keystore Entry and the Keystore View

In SOAMANAGER of EC6 system:

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 20

On configuring the end point check the Logon Ticket option under Authentication Mechanism, with noTransport Guarantee.

Results :

1. User PPUSER maintained in all systems for Principal Propagation .Trigger the RFC .Result ID isobtained under ID .

How To Configure SAML Authentication Using PI 7.1 systems

April 2009 21

3. Go to the Runtime workbench Adapter Monitor .The sender RFC shows green signal i.e thesender is successfully authenticated.

4. Go to the PI system in the transaction sxmb_moni :

5. Also as you had activated the principal propagation in the sender and receiver communicationchannel you find that the ppActivated option equals to true.

6. As the sales order has been created and the user name has been propagated from the senderto the receiver you would be able to see that the user has been propagated in the table