You specify component-managed EIS signon during application development and configure it
during application deployment.
About this task
When you create a Java™ EE application by using a
Rational® or WebSphere® development environment, you are able to select either component-managed or
container-managed EIS signon. Setting the authentication directive in the resource reference of
your application deployment descriptor to Application configures your application for
component-managed EIS signon. Similar steps would be used for other resources and other IDEs.
The following example explains how to verify or change this setting for an EJB Project in a
Rational or WebSphere development environment:
Procedure
-
Set the value of the element to Application.
- In the Java EE perspective, in the Project Explorer
view, expand your EJB project in EJB
Projects.
- Right-click Deployment Descriptor:
your_EJB_project and select .
- In the EJB Deployment Descriptor view, click the References tab,
expand the name of the EJB component used by your application, and select the resource
reference for the EJB. When you select the resource reference for the EJB, fields on the
right side of the EJB Deployment Descriptor view are displayed with values.
- Select Application, if it is not already selected, in the
Authentication field. This field maps to the
<res-auth>
element.
- Close the EJB Deployment Descriptor Editor and click Yes to save
your changes. The following code is added to the deployment descriptor of your EJB
application:
<res-auth>Application</res-auth>
Typically, component-managed signon does not require further configuration because the
security information is provided by the application in the
IMSConnectionSpec object. However, if your application does not provide an
IMSConnectionSpec object, or the user ID is not specified in the
IMSConnectionSpec object that is provided, the IMS TM resource adapter will obtain default security
values from the connection factory that is used by your application.
-
If the application component does not provide a user ID, or the user ID provided is null or
blanks, the default security values is used. The default value is specified in the connection
factory and can be provided in two ways:
- Specify a component-managed authentication alias.
- To use a component-managed authentication alias, you must define a JAAS authentication alias.
- In the Servers view, right-click the server and select Run administrative
console.
- Expand Resources and select Resource Adapters.
- Click the resource adapter you want to modify.
- Under Additional Properties, click J2C Connection
factories.
- Under Related Items, click J2C Authentication Data Entries.
- Above the list of aliases, click New.
- Enter an alias name, your user ID, password, and optional description. Select
OK.
- Select the JAAS authentication alias for the component-managed authentication alias
property of the J2C connection factory that is used by your application. You can select the
JAAS authentication alias when you first create the connection factory, or later by editing
the connection factory. To edit the connection factory:
- In the administrative console for the server, navigate to the connection factory that
you want to modify by selecting .
- In the Component-managed Authentication Alias drop-down list, select the JAAS
authentication alias to be used for component-managed authentication by applications that
use that connection factory.
- Select OK.
The user ID and password that are associated with the component-managed authentication
alias are used to set (or override if applicable) the default values in the custom
properties of the associated connection factory during application server startup.
- Define default values in the connection factory custom properties.
- If you do not assign a valid JAAS authentication alias to the Component-managed
Authentication Alias field of your J2C connection factory, you can assign values for the
userName, password, and groupName fields on the Custom Properties page of your J2C
connection factory.
- To create a connection factory, use the IMSConnectionSpec API to specify connection
properties. Using a component-managed authentication alias is preferred over specifying
values in the custom properties of your J2C connection factory. The component-managed
authentication alias provides greater security for the user ID and password because the user
name and password values of a JAAS authentication alias are visible only to server
administrators.
Results
The process for configuring component-managed signon in the test environment of an IDE
and the process for configuring component-managed signon in a stand-aloneWebSphere Application Server are similar.