Description
A resource adapter can re-authenticate a physical connection (that is, one that already exists in the connection pool under a different security context) to the underlying EIS. A resource adapter performs reauthentication when an application server calls the getConnection method with a security context, passed as a Subject instance, different from the context previously associated with the physical connection.
Requirements
- Reauthentication support: The resource adapter provider must specify whether a resource adapter supports reauthentication of an existing physical connection.
- The matchManagedConnections method in ManagedConnectionFactory may return a matched ManagedConnection instance with the assumption that the ManagedConnection.getConnection method will later switch the security context through reauthentication.
- If reauthentication is successful, the resource adapter has changed the security context of the underlying ManagedConnection instance to that associated with the passed Subject instance.
Detailed description of the reauthentication process is described in section 9.1.9.
Design
Implementation
Test suite
Test client
- Lookup connection factory / connection
- Invoke connection with credential #1
- Invoke connection with credential #2
should lead to success
Resource adapter
- Reauthentication enabled
- Expose simple connection interface
- Configuration: Initially <min-pool-size> and <max-pool-size> should be set to 1
Target system
- Allow a configured number of connections (java.net.Socket)
- Binary protocol
- Header (0 = Auth, 1 = Shutdown)
- Payload
- 0: Subject / CRI
- 1: <nothing>
- Support Subject based security
- Support CRI based security
- implements java.io.Serializable
- Support reauthentication on existing connection
- Be able to run in-VM
- All communication has to go over the Sockets for clean separation between RA and EIS
Option #C and #A described in section 9.1.9 should be tested in that order.
Ideally the entire test suite setup can be included as an example in the user guide.
JDBC
Some databases support reauthentication, so we need to provide a way to enable support in our JDBC resource adapter.
We can also provide plugins for the Open Source databases that supports this.
Links