WorkContext that allows a Work
instance to propagate security related context information from an EIS to an
application server.
This allows an EIS/resource adapter to flow-in security context information and execute a Work instance, and call methods on a MessageEndpoint interface, to effect message inflow, within that Work instance, in the context of an established identity.
A resource adapter indicates to the WorkManager, that a Work instance needs to be run in a specified security execution context by submitting a Work instance that implements WorkContextProvider interface and ensuring that the List of WorkContexts for that Work instance contains an instance of its subclass of Securitytext.
It should be noted however that when a resource adapter flows-in an identity to be used by the application server, the propagated identity may or may not belong to the application server's security domain.
There are therefore, two scenarios while a resource adapter propagates a security identity from an EIS to the application server:
javax.resource.spi.work.WorkContextProvider
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Determines if a deserialized instance of this class is compatible with this class. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getDescription()
Implements javax. WorkContext and any other related debugging information.
|
| public String | getName()
Implements javax. WorkContext.
|
| public abstract void | setupSecurityContext(CallbackHandler
A handler, Subject CallbackHandler provided by the
WorkManager that supports the
Callbacks described aboveA Subject that represents the security identity that needs to
be established as the context for the executionSubject, Subject Work
instance. It is used by the method implementation to store
Principals and credentials that needs to be used as the
security context of the Work instance.A Subject that represents the application server It may be
used by the method implementation as the source of Principals
or credentials to be used to validate a connection to the EIS.
If the Subject is not null, the method implementation may add
additional Principals or credentials (pertaining to the
recipient of the service request) to the Subject. * serviceSubject)The container calls this method to set up the security Context for the
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Determines if a deserialized instance of this class is compatible with this class. | |
| SecurityContext | back to summary |
|---|---|
| public SecurityContext() | |
| getDescription | back to summary |
|---|---|
| public String getDescription() Implements javax. Doc from javax. Get the brief description of the role played by the
| |
| getName | back to summary |
|---|---|
| public String getName() Implements javax. Doc from javax. Get the associated name of the
| |
| setupSecurityContext | back to summary |
|---|---|
| public abstract void setupSecurityContext(CallbackHandler handler, Subject executionSubject, Subject serviceSubject) The container calls this method to set up the security Context for the
The handler argument must not be null, and the argument handler and the
The following
A resource adapter might use the
A resource adapter might use the
A resource adapter might use the The executionSubject argument must be non-null and it must not be read-only. It is expected that this method will populate this executionSubject with principals and credentials that would be flown into the application server. The serviceSubject argument may be null, and when it is not null it must not be read-only. It represents the application server and it may be used by the Work implementation to retrieve Principals and credentials necessary to establish a connection to the EIS (in the cause of mutual-auth like scenarios). If the Subject is not null, the Work implementation may collect the server credentials, as necessary, by using the callback handler passed to them . When this method is called, the method implementation
| |