background image

Configuring Resource Adapter Security

<< Securing EIS Applications | Authentication Mechanisms >>
<< Securing EIS Applications | Authentication Mechanisms >>

Configuring Resource Adapter Security

javax.resource.cci.ConnectionFactory cxf =
(javax.resource.cci.ConnectionFactory)initctx.lookup(
"java:comp/env/eis/MainframeCxFactory");
// Get a new ConnectionSpec
com.myeis.ConnectionSpecImpl properties = //..
// Invoke factory to obtain a connection
properties.setUserName(
"...");
properties.setPassword(
"...");
javax.resource.cci.Connection cx =
cxf.getConnection(properties);
...
Configuring Resource Adapter Security
A resource adapter is a system-level software component that typically implements network
connectivity to an external resource manager. A resource adapter can extend the functionality
of the Java EE platform either by implementing one of the Java EE standard service APIs (such
as a JDBC driver), or by defining and implementing a resource adapter for a connector to an
external application system. Resource adapters can also provide services that are entirely local,
perhaps interacting with native resources. Resource adapters interface with the Java EE
platform through the Java EE service provider interfaces (Java EE SPI). A resource adapter that
uses the Java EE SPIs to attach to the Java EE platform will be able to work with all Java EE
products.
To configure the security settings for a resource adapter, you need to edit the ra.xml file. Here is
an example of the part of an ra.xml file that configures the following security properties for a
resource adapter:
<authentication-mechanism>
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
<credential-interface>
javax.resource.spi.security.PasswordCredential
</credential-interface>
</authentication-mechanism>
<reauthentication-support>false</reauthentication-support>
Securing EIS Applications
Chapter 29 · Securing Java EE Applications
835