Show TOC Start of Content Area

Background documentation Declarative and Programmatic Authentication  Locate the document in its SAP Library structure

Applications running on the J2EE Engine have two options for authenticating users:

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

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

·        Programmatic authentication (also known as UME authentication):

Components running on the J2EE Engine authenticate directly against the User Management Engine (UME) using the UME API. The component explicitly triggers authentication and then the authentication process is controlled by the authentication framework.

Both declarative and programmatic authentication use login modules and login module stacks as their underlying technology. Applications that use declarative authentication define which login module stack they use in their deployment descriptor. Programmatic authentication additionally introduces the concept of authentication schemes. Applications that use programmatic authentication are associated with an authentication scheme. The authentication scheme in turn references a login module stack. See also Login Modules and Login Module Stacks and Authentication Schemes.

Integration

Different types of applications use different means of configuring which login module stack is used. The following table provides an overview.

Application Type

Type of Authentication

Where is Login Module Stack defined

J2EE Web applications

Declarative authentication

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

See Configuring Authentication.

J2EE Web applications

Programmatic authentication

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 default in the authentication schemes file.

Web Dynpro applications

Programmatic authentication

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

Portal iViews

Programmatic authentication

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

See Assigning an Authentication Scheme to an iView.

Declarative and programmatic authentication are integrated so that if an application uses programmatic authentication to authenticate its users, the container where it runs on the J2EE Engine is also aware that the users are authenticated. Inversely, if an application uses declarative authentication to authenticate its users, UME is also aware that the users are authenticated. Calls to the APIs of both the container and UME return the authenticated user.

Note

If you wish to change the authentication mechanism used by Web Dynro applications, you have to change the authentication scheme referenced by default in the authentication schemes file. If you change the default authentication scheme, this will also affect any portal iViews and J2EE Web applications that use the default authentication scheme.

 

 

End of Content Area