user authentication in sap portal and java environments: know

78
User Authentication in SAP Portal and Java Environments: Know Which Options to Pick and How to Wield Them Nicholas Holshouser SAP Labs

Upload: others

Post on 03-Feb-2022

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: User Authentication in SAP Portal and Java Environments: Know

User Authentication in SAP Portal and Java Environments: Know Which Options to Pick and How to Wield Them

Nicholas HolshouserSAP Labs

Page 2: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 2

Contributors

Nicholas HolshouserPlatinum Technical Consultant, SAP Labs

Serge MutsSenior Technical Consultant, SAP Labs

Page 3: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 3

Authentication DemosX.509 Certificate-Based Authentication

Troubleshooting Wrap-up

Header-Based Authentication

SAP NetWeaver Portal Authentication

The User Management Engine

IntroductionWhat We’ll Cover ...

Page 4: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 4

Authentication DemosX.509 Certificate-Based Authentication

Troubleshooting Wrap-up

Header-Based AuthenticationSAP NetWeaver Portal Authentication

The User Management Engine

IntroductionWhat We’ll Cover ...

Page 5: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 5

Learning Objectives

As a result of this session, you will be able to:Understand implementation of login stacks, login modules, and control flags in the SAP J2EE EngineConfigure the authentication methods to suit your security requirementsUnderstand the role of authschemes.xml in leveraging SAP J2EE Engine login stacks for SAP NetWeaver Portal authenticationConfigure your SAP NetWeaver Portal to authenticate users using Header AuthenticationConfigure your SAP NetWeaver Portal to authenticate users using X.509 client certificates

Page 6: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 6

Definitions and Abbreviations

The User Management Engine (UME) provides a centralized user management for all Java applications

It can be configured to work with user management data from multiple data sources

The UME is seamlessly integrated in the J2EE Engine of SAP NetWeaver Application Server Java (SAP NetWeaver AS Java) as itsdefault user store

It can be administrated using the administration tools of SAP NetWeaver AS Java

Page 7: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 7

Definitions and Abbreviations (cont.)

The J2EE Engine implements the Java Authentication and Authorization Service (JAAS) standard to support various authentication methods

This means you can choose the required authentication mechanisms for your applications

Applications running on the J2EE Engine can either use declarative or programmatic authentication

Both types of authentication rely on the same underlying technology, login modules, and login module stacksProgrammatic authentication additionally uses authentication schemes SAP ships login modules and authentication schemes to support various authentication mechanisms

Page 8: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 8

The SAP NetWeaver Portal and Security Services

The SAP NetWeaver Portal is a Java application that runs entirely within the NetWeaver Application Server

As a consequence, SAP NetWeaver Portal can use all the Identity Management and Security services offered by the NetWeaver Application Server (Java), including:

UME Provider ServiceSecurity Provider ServiceKey Storage ServiceSSL Provider ServiceSecure Storage Service

User management in the SAP NetWeaver Portal is provided by the UME service in the J2EE Engine

Authentication is performed by the Security Provider Service

Page 9: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 9

Authentication DemosX.509 Certificate-Based Authentication

Troubleshooting Wrap-up

Header-Based AuthenticationSAP NetWeaver Portal AuthenticationThe User Management EngineWhat We’ll Cover ...

Introduction

Page 10: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 10

The User Management Engine (UME)

The UME provides a comprehensive user store implementation, offering LDAP-enabled directories, RDBMS, and the SAP System as persistence options

The UME also provides initial identity management features by storing other user attributes in addition to technical account information

Source:http://help.sap.com/saphelp_nw04/helpdata/en/57/a21f407b402402e10000000a1550b0/frameset.htm

Page 11: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 11

UME Architecture

Page 12: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 12

User Management Engine

UME runs as a service in the J2EE Engine of the SAP NetWeaver AS Java and is set up as the default user store of the J2EE Engine

Page 13: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 13

UME – Multiple Data Sources

UME can be configured to read and write user-related data from and to multiple data sources, such as:

Lightweight Directory Access Protocol (LDAP) directories The system database of the J2EE Engine, and The ABAP user management of a NetWeaver Application Server

Page 14: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 14

User Administration

The user management administration console enables administrators to perform routine administration tasks such as creating or searching for users and groups, and assigning users and groups to roles

Security settings

You can define a password policy including settings such as minimum and maximum length of passwords, number of failed logons before a user is locked, and so on

Self-service scenarios

UME provides self-service scenarios that allow users to register themselves as new users or to change their own data (address, password, and so on). It is also possible to set up an approval workflow, whereby administrators approve newly registered users.

Page 15: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 15

Authentication DemosX.509 Certificate-Based Authentication

Troubleshooting Wrap-up

Header-Based AuthenticationSAP NetWeaver Portal AuthenticationWhat We’ll Cover ...The User Management Engine

Introduction

Page 16: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 16

Authentication – Basics

SAP NetWeaver Portal authentication verifies the identity of a user who attempts to log in to the portal or to access sensitive portal content

SAP NetWeaver Portal authentication is tightly integrated with J2EE Engine authentication

Page 17: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 17

Authentication – Standard Methods

The standard authentication methods offered by the J2EE Engine are:

Anonymous/guest accessUser ID/password

Form-basedBasic authentication

X.509 digital certificatesSAP Logon TicketsExternal authentication methods

HTTP header variable authenticationSecurity Assertion Markup Language (SAML)Through Java Authentication and Authorization Services (JAAS)

SPNEGO available – Kerberos as of NW04 SPS15 and NW2004s

Page 18: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 18

Authentication Configuration – General

Authentication configuration is done in the J2EE Engine configuration

Responsible J2EE service: “security provider”

JAAS Login modules are bundled in “login module stacks”(policy configurations)

A policy configuration can include one or more login modules with a JAAS control flag attached to each module

In case the SAP NetWeaver Portal is used, references to the policy configurations are maintained in the authentication scheme configuration

Page 19: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 19

Java application

JAAS Pluggable Authentication – Login Stacks and Control Flag Values

FlagLogin Module

RequisiteBasicPassword

SufficientClientCert

SufficientEvaluateLoginTicket

SUFFICIENT – the login module is not required to succeed. If the authentication is successful, control returns to application; otherwise, the authentication proceeds.

OPTIONAL – the login module is not required to succeed. Authentication proceeds down the list if the module has succeeded or has failed.

REQUIRED – the login module is required to succeed. Authentication proceeds down the list of modules if the module has succeeded or has failed.

REQUISITE – the login module is required to succeed. If successful, the authentication proceeds down the list; otherwise, control returns to the application – that is, the authentication does not proceed.

login

Page 20: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 20

Example Login Module Stack – Ticket

com.sap.security.core.server.jaas.EvaluateTicket – Sufficient

BasicPasswordLoginModule – Requisite

com.sap.security.core.server.jaas.CreateTicket – Optional

Overall Authentication:

pass

*

*

pass

fail

pass

pass

pass

fail

pass

fail

pass

fail

fail

*

fail

Page 21: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 21

JAAS Pluggable Authentication – Login Modules

BasicPasswordLoginModule – Performs a JSP logon using basic or form authentication (user name and password)

ClientCertificateLoginModule – Performs a certificate logon to the J2EE Engine

CertPersisterLoginModule – This login module automatically maps certificates provided by the user to his or her user account while logging on the first time

DigestLoginModule – Performs a more advanced form of the basic authentication type. Here the password of the user is digested (encoded).

SAMLLoginModule – Uses a SAML browser/artifact profile

HeaderVariableLoginModule – Reads a user ID from the HTTP header variable and then uses this user ID to authenticate the user

CSILoginModule – login performed using the IIOP service

EvaluateTicketLoginModule – Evaluates SAP Logon Tickets

CreateTicketLoginModule – Creates SAP Logon Tickets after successful logon

The SAP J2EE Engine also enables you to define your own stack of login modules or to create, import, and use your own login modules

Page 22: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 22

Authentication on the SAP J2EE Engine

The J2EE Engine implements the Java Authentication and Authorization Service (JAAS) standard to support various authentication methods

This enables you to choose the required authentication mechanisms for your applications

Applications running on the J2EE Engine can either use declarative or programmatic authentication

Both types of authentication rely on the same underlying technology, login modules and login module stacksProgrammatic authentication additionally uses authentication schemes SAP ships login modules and authentication schemes to support various authentication mechanisms

Page 23: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 23

Authentication

Declarative and Programmatic AuthenticationExplains the difference between declarative (container-based) authentication and programmatic (UME) authentication. The type of authentication that an application uses has consequences for the login module stack it uses and where you configure authentication.

Login Modules and Login Module StacksProvides conceptual and configuration information about login modules and login module stacks. These are part of the Java Authentication and Authorization Services (JAAS) standard. Both declarative and programmatic authentication are based on login modules and login module stacks Login modules define authentication logic. Login module stacks enable you to define a sequence of authentication logic performed for an application.

Page 24: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 24

Authentication (cont.)

Authentication SchemesProvides conceptual and configuration information on authentication schemes that are used in programmatic authentication only

Configuring Authentication MechanismsDescribes how to configure different types of authentication, including basic authentication, authentication with client certificates, authentication using SAML assertions or SAP Logon Tickets

Page 25: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 25

Declarative and Programmatic Authentication

Declarative authentication (also known as container-based authentication):

The Web container (in this case, the J2EE Engine) handles authenticationA component running on the J2EE Engine declares its protected resources and its desired authentication mechanism in its deployment descriptorWhen a protected resource of this component is accessed, the container in which the component runs triggers authentication

Page 26: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 26

Declarative and Programmatic Authentication (cont.)

Programmatic authentication (also known as UME authentication): Components running on the J2EE Engine authenticate directly against the UME using the UME APIThe component explicitly triggers authentication The authentication process then is controlled by the authentication framework

Web Dynpro applications and portal iViews always use programmatic (UME) authentication.

J2EE Web applications can use either declarative or programmaticauthentication, depending on which the developer decides to use.

Page 27: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 27

Integration of Authentication

An iView property defines which authentication scheme the iView uses. The authentication scheme references a login module stack.

Programmatic authentication

Portal iViews

Web Dynpro applications always use the login module stack referenced by default in the authentication schemes file

Programmatic authentication

Web Dynpro applications

This depends on how the application is programmed. Applications can define an authentication scheme in their calls to the API. By default, if they do not define an authentication scheme, these applications use the login module stack referenced by defaultin the authentication schemes file.

Programmatic authentication

J2EE Web applications

Declared in the Web.xml deployment descriptor of the J2EE Web application

Declarative authentication

J2EE Web applications

Where is login module stack defined?Type of Authentication

Application Type

Page 28: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 28

Login Modules and Login Module Stacks

Login ModuleAuthentication on the J2EE Engine is performed using predefined authentication classes, referred to as login modules. A login module contains an implementation Java class that defines the authentication logic. For more information, see Login Modules.

Login Module StackOn the J2EE Engine, you can use or define groups of login modules that contain different authentication logic. Such groups are referred to as login module stacks.

Each login module stack enables you to choose different combinations of authentication for applications you create or for each of the components on the J2EE Engine with applied security restrictions. For more information, see Login Module Stacks.

Page 29: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 29

Login Module Stacks

In the J2EE Engine, you can use or define groups of login modules that contain different authentication logic

Such groups are referred to as login module stacks. Each login module stack enables you to choose different combinations of authentication for the applications you create, or for each of the components on the J2EE Engine.

Page 30: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 30

Authentication Templates

Predefined login module stacks, which are also referred to as authentication templates, on the J2EE Engine:

SAP-J2EE-Engine – this is a default configured login module stack that can be used by everyone

Basic – allows for Basic Authentication, supported by the Web container

Client – allows for client certificate authentication, supported by the Web container

Digest – allows for digest authentication, supported by the Web container

Form – allows for form authentication, supported by the Web container

Ticket – used for creating and verifying logon tickets

Evaluation assertion ticket – used for verifying assertion tickets (tickets used between systems)

Page 31: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 31

Authentication Schemes

Authentication schemes are used in UME authentication onlyPortal iViews and Web Dynpro applications always use authentication schemes J2EE Web applications may use them depending on whether they were programmed to use UME or container-based authentication

Authentication schemes are defined in the authschemes.xml file, which you can change in the config tool

Page 32: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 32

Authentication Schemes (cont.)

An authentication scheme is a definition of what is required for an authentication process. This includes:

The login module stack that is used to determine whether a user is granted access to an applicationThe user interfaces that are used to gather the information required to authenticate a userPriority, allowing authentication schemes to be ordered

Page 33: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 33

Configuring Authentication Mechanisms

The J2EE Engine is shipped with a range of login modules that support the most common authentication mechanisms. In this section, you find out how to use the login modules to set up theauthentication mechanism that you require.

Using Basic Authentication (User ID and Password)By default, the J2EE Engine uses basic authentication for applications that are set up to use basic or form authentication

Using Client Certificates for User AuthenticationUse client certificate authentication for applications that require a higher level of security

Using Security Session IDs for SSO Between ApplicationsBy default, the standard JSESSIONID mechanism is used to exchange the information about the user’s identity between the Web applications when performing SSO

Using Logon Tickets for SSOUse SAP Logon Tickets for SSO in an SAP system environment

Page 34: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 34

Configuring Authentication Mechanisms (cont.)

Using SSO with Resource AdaptersYou can use SSO when working with resource adapters

Using Header Variables or Integrated Windows Authentication for User Authentication

You can use header variable authentication to delegate user authentication to any external product that authenticates the user and returns an authenticated user ID as part of the HTTP header. Integrated Windows authentication is an example of header variable authentication.

Page 35: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 35

Configuring Authentication Mechanisms (cont.)

Using SAML Assertions for SSOUsers can use SAML assertions to access the J2EE Engine. The SAPJ2EE Engine accepts SAML assertions for SSO, but it cannot issue such assertions.

Using Anonymous Logon to Access the PortalAnonymous logon allows users to access the portal in anonymous mode, without providing any form of authentication. This may be required for external portals that allow Internet users to access anonymous content.

Page 36: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 36

Customer Authentication Modules

This release includes individual login modules for user authentication against a local database, LDAP-enabled directory, or the SAP System

Extended configuration options are also provided for configuringapplication-specific authentication schemes

Source:http://help.sap.com/saphelp_nw04/helpdata/en/57/a21f407b402402e10000000a1550b0/frameset.htm

Page 37: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 37

Authentication on the Portal

Authentication provides a way of verifying the user’s identity before he or she is granted access to the portal. Once the user has been authenticated, he or she is issued an SAP Logon Ticket that allows him or her to access all the applications, information, and services in SAP NetWeaver Portal using SSO.

Since many of these applications may contain sensitive data, it is imperative that the user in question can be identified and theiridentity authenticated

In the portal, authentication is defined using authentication schemes that are assigned to iViews. Users log on to the portal with a specific authentication scheme, and this is stored in the user’s logon ticket.

If a user needs to access an iView that requires a stronger authentication scheme, he or she must re-authenticate as specified by the stronger authentication scheme

Page 38: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 38

Authentication DemosX.509 Certificate-Based Authentication

Troubleshooting Wrap-up

Header-Based AuthenticationWhat We’ll Cover ...SAP NetWeaver Portal AuthenticationThe User Management Engine

Introduction

Page 39: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 39

HTTP Header Authentication

ERP

CRM

ESS

EP

Workflow

Internet

...

Access

GroupwareWeb Access Management (WAM) Token

Initiallogon

Authentication Authority (intermediate)

Access

Identity information within HTTP request

Page 40: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 40

Header-Based Authentication

There is one login module that handles bothIntegrated Windows authentication (NTLM and Kerberos)HTTP header variable authentication (for integration of externalWAM products)

Class namecom.sap.security.core.server.jaas.HeaderVariableLoginModule

Configuration in the “Security Provider” service of the J2EE Engine

Login module options (parameters)

truetrueume.configuration.active

<empty>comma separated listDomainfalsetrue/falsewindows_integratedREMOTE_USER<header name>Header

Default ValueValuesName

Page 41: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 41

Header-Based Authentication – High-Level Steps

Initial authentication is done with third-party WAM

After initial authentication, the WAM issues an authentication header

Apache will be used to add a header for authentication to simulate this

Configure the login stack in the J2EE Engine to accept header-based authentication

Add HeaderVariableLoginModule if necessaryAdd HeaderVariableLoginModule to the ticket login stackAdd CreateTicketLoginModule to the ticket login stackTest the header-based authentication

Prerequisites: The UME user ID and header user ID must be identical

Page 42: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 42

Example of Header-Based Authentication Login Stack

Login Modules Flag Options

EvaluateTicket SUFFICIENT {ume.configuration.active=true} HeaderVariable OPTIONAL {ume.configuration.active=true,

Header=<header_name>}

CreateTicket SUFFICIENT {ume.configuration.active=true} BasicPassword REQUISITE {}

CreateTicket OPTIONAL {ume.configuration.active=true}

Page 43: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 43

Security Measures for HeaderVariableLoginModule

Block risk of user impersonation!Be aware of header spoofing

Safeguard J2EE Engine HTTP(S) ports from direct access by usersPrevent opportunity to bypass the proxy for J2EE Engine access

Configure SSL with mutual authentication between the Web server and the J2EE Engine

http://help.sap.com/nw04 – Using SSL with an Intermediary Server

Page 44: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 44

Demo

Header-Based Authentication

Page 45: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 45

Apache Setup

These steps simulate inserting a user ID in the header; this is normally performed by a WAM product

Browse to c:\Program Files\Apache Group\apache2\conf and openhttpd.conf in a text editorVerify that Apache runs under hostname apache (ServerName)Add RequestHeader to httpd.conf (e.g., under ServerSignature section):

RequestHeader add HTTP_USER “AGS350_01”

Add RewriteRules to httpd.conf<IfModule mod_rewrite.c>Rewrite Engine OnRewriteLog logs/rewrite.logRewriteLogLevel 3 (use 0 in production setting)

#EP RulesRewriteRule ^/(irj.*) http://portal:50000/$1?%{QUERY_STRING} [P,L]RewriteRule ^/(logon.*) http://portal:50000/$1?%{QUERY_STRING} [P,L]</IfModule>

Page 46: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 46

Apache Setup (cont.)

Add proxy rules to httpd.conf<IfModule mod_proxy.c>ProxyRequests OffProxyPreserveHost On

ProxyPassReverse /irj http://portal:50000/irjProxyPassReverse /logon http://portal:50000/logon</IfModule>

Save the httpd.conf file and restart Apache

Test proxy by typing http://apache:8080/irj in Internet Explorer (IE)

Verify that the portal login page should come up with http://portal:50000/irj/portal

Page 47: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 47

Adjust Login Module Stack for Header Variables

Add HeaderVariableLoginStack to the Security Store in the Visual Administrator:

Start the Visual Administrator from Start – Programs – SAP J2EE Engine P25 – Visual AdministratorIn the Visual Administrator, choose Security ProviderChoose the User Management tab, click “edit,” and choose Manage Security StoresThe currently active user store and the login modules for that user store are displayedChoose Add-Login ModuleA dialog box appears, prompting you to choose an editor for the login module option. Choose OK.A dialog box appears, prompting you to add a login module

Page 48: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 48

Adjust Login Module Stack for Header Variables (cont.)

Add HeaderVariableLoginStack to the Security Store in the Visual Administrator: (cont.)

Fill in the fields as follows:Class Name com.sap.security.core.server.jaas.HeaderVariableLoginModuleDisplay Name HeaderVariableLoginModuleChoose OK

The HeaderVariableLoginModule now appears in the list of login modules for the active user store

Page 49: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 49

Adjust Login Module Stack for Header Variables (cont.)

Add HeaderVariableLoginModule to Ticket authentication template in the Security Store

In the Visual Administrator, choose Security ProviderChoose Policy Configurations → AuthenticationAdd the login module HeaderVariableLoginModule to the ticket login module stack

Change the parameters of the HeaderVariableLoginModule:Set the options for the HeaderVariableLoginModule as follows:

1. Ume.configuration.active = true2. Header = HTTP_USER

Complete the login stack as displayed on the next slide

Page 50: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 50

Header-Based Authentication Login Stack Exercise

Page 51: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 51

Test Header-Based Authentication

Start HttpWatch in Internet Explorer (icon in tool bar)

Browse to URL http://portal:50000/irj; verify that the basic login formis shown

Verify headers in HttpWatch and clear HttpWatch

Browse to URL http://apache:8080/irj; verify that the login is direct using headers

Check whether the portal URL gets passed back to the client when you click on “User Management”

Open http.conf and change ProxyPreserveHost to “Off.” Restart Apache and retest logging into http://apache:8080/irj with HttpWatch active. Click on User Management and see if the hostnames listed in HttpWatch are consistent.

Consider the security implications for external user access

Page 52: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 52

Authentication DemosX.509 Certificate-Based AuthenticationWhat We’ll Cover ...

Troubleshooting Wrap-up

Header-Based AuthenticationSAP NetWeaver Portal AuthenticationThe User Management Engine

Introduction

Page 53: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 53

Authentication: X.509 Client Certificates

Every user is issued an X.509 certificate

The certificate is used for logging on to the system

The J2EE Engine maps the certificate to a valid user account

Two login modules are used:

1. ClientCertLoginModule – Performs a certificate logon to the J2EE Engine

2. CertPersisterLoginModule – Automatically maps certificates provided by the user to his or her user account while logging on the first time

= AliceAlice

Page 54: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 54

X.509 Client Certificate Authentication – Prerequisites

Users import valid client certificate into the Web browser

The J2EE Engine is configured to support SSL

The public-key certificates belonging to the users exist as files in the file system with either the extension .crt (DER-encoded or Base-64-encoded) or .cert (Base-64-encoded)

The issuing Certificate Authority’s (CA’s) root certificate either exists in the TrustedCAs view in the Key Storage service or is available in the file system as a DER-encoded or Base-64-encoded certificate

UME property ume.logon.allow_cert is set to true

Page 55: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 55

Configuring the J2EE Engine to Accept Client Certificate Authentication – Overview

Key Storage ServiceImport Certificate Authority’s (CA’s) root certificate as a certificate entry in the TrustedCAs view

SSL Provider ServiceRequest or require client certificates for authenticationImport CA root certificate in Trusted Certification Authorities list

Security Provider ServiceAdjust login module stacks to accept client certificates using ClientCertLoginModule and CertPersisterLoginModule

Result: Client certificates can be used to authenticate users. Onfirst logon, the user will be given the option of mapping the user ID to the certificate.

Page 56: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 56

Demo

Certificate Authentication

Page 57: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 57

Client Certificate Authentication – High Level

Check the sheet titled “Last-Minute Tips” provided with this session for details relevant to the exercise

Users import valid client certificate into the Web browserImport the provided client certificate into IE (see “Last-Minute Tips” sheet)

The J2EE Engine is configured to support SSLAlready set up in advance of this session

Page 58: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 58

Client Certificate Authentication – High Level (cont.)

The issuing CA’s root certificate either exists in the TrustedCAs view in the Key Storage service or is available in the file system as a DER-encoded or Base-64-encoded certificate (see “Last-Minute Tips” sheet)

Import the provided CA root certificate into the J2EE Engine

Adjust the login stack to accept X.509 certificatesAdd the CertPersisterLoginModule to the Security Store (detailed in next slide)Add the ClientCertLoginModule and CertPersisterLoginModule to the login stack

UME property ume.login.allow_cert is set to true

Test the logon

Page 59: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 59

Import Valid Client Certificate Into the Web Browser

1. In MS-IE, go to Tools, Internet Options, and select Content tab

2. Click on certificate; on the Personal tab select Import

3. Follow the steps in the wizard to import the Personal Information Exchange file AGS350_01.p12

4. Use rigteched for the password

5. You should get an “Import was successful” message and the certificate will show up in the list; close the window

6. In Internet Options, select the Security tab, and choose “Local intranet” and “Custom Level”

7. Disable the “Don’t prompt for client certificate selection when no certificates or only one certificate exists” option

Page 60: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 60

Import the Root Certificate CA.CRT of the CA Issuing the Client Certificates

Page 61: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 61

Import the Root Certificate CA.CRT of the CA Issuing the Client Certificates – Result

Page 62: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 62

Client Certificate Settings in the SSL Service

Page 63: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 63

Add CertPersisterLoginModule

In the Visual Administrator, choose Security Provider. Choose the User Management tab, switch to change mode, and choose Manage Security Stores.

The currently active user store and the login modules for that user store are displayed. As the CertPersisterLoginModule requires the UME as the user store, you can only perform the following steps if the UME user store is activated.

Choose Add Login Module. A dialog box, prompting you to choose an editor for the login module option, appears. Choose OK.

A dialog box prompting you to add a login module appears

Fill in the fields as follows:Class Name: com.sap.security.core.server.jaas.CertPersisterLoginModuleDisplay Name: CertPersisterLoginModuleChoose OK

CertPersisterLoginModule now appears in the list of login modules for the active user store

Page 64: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 64

Modify Ticket Login Module Stacks for Services That Accept Client Certificate Authentication

Page 65: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 65

Test X.509 Certificate Authentication – Initial Login

In the pop-up window, select certificate AGS350_01

User = AGS350_01, password = abc123

Page 66: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 66

Test X.509 Certificate Authentication –Verify User Mapping

Check user AGS350_01 in the Security Provider Service

Verify that the certificate mapping was successful

Page 67: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 67

Test X.509 Certificate Authentication – Subsequent Login

Open a new browser window with URL https://portal:50001/irj

Now login should be successful

Page 68: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 68

Authentication DemosX.509 Certificate-Based Authentication

Troubleshooting What We’ll Cover ...Wrap-up

Header-Based AuthenticationSap NetWeaver Portal AuthenticationThe User Management Engine

Introduction

Page 69: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 69

Basic Troubleshooting for Authentication

Isolate the error by reviewing the appropriate logsUse the Log Viewer service of the Visual AdministratorCheck default.trc and security logsIncrease logging level using the Log Configurator service

Understand where errors come fromIs the error from an intermediate device or software?

Validate your configurationUse a second set of eyes to review the system configuration and check for errors in the setup before you begin debuggingDocument the setup procedure you used so that you can check it for accuracy and so that it is repeatable if it works properly

SEARCH for SAP Notes to see if your problem is already solved!

Page 70: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 70

Authentication DemosX.509 Certificate-Based Authentication

Troubleshooting Wrap-upWhat We’ll Cover ...

Header-Based AuthenticationSAP NetWeaver Portal AuthenticationThe User Management Engine

Introduction

Page 71: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 71

Resources

For the most recent changes in UME, see SAP Note 720590 User Management Engine (UME) on WAS 6.30 and higher

For information on configuring UME, see UME Configuration. Here you can find information on configuring the data sources that UME uses to read and write user management data, and other configuration options.

For information on administration with UME, see UME User Administration. The UME provides an administration console for performing administrative tasks such as searching for and creating users, groups, and roles.

For reference material on UME, see UME Reference. This includes information on UME properties and configuration files.

For information on UME tools in the portal, see User Administrationand User Management Configuration in thePortal Administration Guide

Page 72: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 72

Resources (cont.)

Public Webwww.sap.comNetWeaver Developer’s Guide: www.sdn.sap.com/sdn/developersguide.sdn*SAP Developer Network: www.sdn.sap.com*SAP Customer Services Network: www.sap.com/services/

Related SAP Education Training Opportunitieshttp://www.sap.com/education/

* Requires login credentials to the SAP Service Marketplace

Page 73: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 73

Resources (cont.)

Related Content from SMPhttp://service.sap.com/NW04*http://service.sap.com/NW2004S*http://service.sap.com/security*(Check under Security in Detail -> Secure User Access -> Authentication and SSO for How-To Guides)

* Requires login credentials to the SAP Service Marketplace

Page 74: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 74

Resources (cont.)

SAP Service Marketplace – Notes720590 User Management Engine (UME) on WAS 6.30 and higher843061 NW04: SSO2 ticket generation and ticket evaluation in Java818947 UME Consistency Check Tool 718383 NW04: Supported UME Data Sources and Change Options701205 Single Sign-On using SAP Logon Tickets 812047 NW04: SSO to J2EE 6.40 fails869852 Central Note for UME Web Dynpro UIs894958 NW04s(700) Central Note for Security 894170 NW04s(700) Central Note for User Management Engine (UME)894446 ECO: Using UME logon application in SAP e-commerce891151 UME and EP 7.0 support in SAP E-Commerce applications757692 Changing the hostname for J2EE Engine 6.40 installation711093 Release Restriction Note for Web AS 6.40

Page 75: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 75

For more information: Access the SAP Developer Network –www.sdn.sap.com

The central hub for the SAP technology community

Everyone can connect, contribute and collaborate- consultants, administrators and developersFocus around SAP NetWeaver and SAP xApps

High quality of technical resourcesArticles, how-to guides, weblogs, collaborative areas, discussion forums and downloads, toolkits and code-samples

A collaboration platform, not a one-way street

SAP experts from customers, partners and SAP

SDN is powered by SAP NetWeaver™Built on the SAP Enterprise PortalFeaturing collaboration capabilities of SAP Knowledge Management

Page 76: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 76

7 Key Points to Take Home

• The User Management Engine (UME) is a core component of the SAP NetWeaver AS Java

• Authentication is highly configurable

• The UME uses JAAS to support multiple authentication methods

• X.509 certificates are the most secure authentication method

• Using SSL is required for X.509 certificates

• Header authentication requires further configuration at the network level to fully secure the Web AS

• Always use the latest SAP Notes and guides whenever you do configuration on the UME

Page 77: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 77

Your Turn!

How to contact me:[email protected]

Questions?

Page 78: User Authentication in SAP Portal and Java Environments: Know

© SAP AG 2006, 78

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, 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, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation.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.

Copyright 2006 SAP AG. All Rights Reserved