T - the PluginConfiguration class for this implementation of
IdentityMappingPluginpublic interface IdentityMappingPlugin<T extends PluginConfiguration> extends DescribesUIConfigurable, ConfigurablePlugin<T>
IdentityMappingPlugin is the runtime instantiation of an Identity Mapping defined in the
Administrative API. It can be used to map the data of an Identity into a form that is expected by the
protected application. The protected application then uses this mapped identity to identify the end-user or
user-agent.
IdentityMappingPlugin must be annotated with the IdentityMapping annotation.
IdentityMappingPlugin should be placed in a
META-INF/services/com.pingidentity.pa.sdk.identitymapping.IdentityMappingPlugin resource file
that is packaged in the jar containing the compiled class for the implementation. This signals to PingAccess that
the class is a valid IdentityMappingPlugin implementation.
com.pingidentity.pa.sdk.plugins
documentation, a IdentityMappingPlugin has the following additional responsibilities:
IdentityMappingPlugin will inspect
Identity attributes for the current request and modify the
request that will be sent to the protected application. The modified request should contain
identity information that can be used by the target Application for identification and authorization. For example, an
IdentityMappingPlugin might translate identity attributes into
headers to be used by the protected application.
Two methods should be implemented in a IdentityMappingPlugin.
The mapIdentity(com.pingidentity.pa.sdk.identity.Identity, com.pingidentity.pa.sdk.http.Request, com.pingidentity.pa.sdk.http.Exchange)
method is called on request where the user has been authenticated. This method should modify the request to provide
any identity information for the target Application.
The mapAnonymousIdentity(com.pingidentity.pa.sdk.http.Request, com.pingidentity.pa.sdk.http.Exchange)
method is called on an anonymous request.
A note about header clobbering: If headers are to be used to pass identity information to the target Application, the configured
headers should always overwrite any headers of the same name that may have come in the original request. This should
happen even in the case of anonymous requests and the configured headers should return empty values. To simplify
header based identity mapping, HeaderIdentityMappingPlugin may be extended
and will handle this behavior.
In order to comply with the PingAccess Agent Protocol, the user subject should be returned to the target Agent in
a header and the vnd-pi-sub header should be set indicating the header name.
The IdentityMappingPlugin will handle this automatically if
Identity.setMappedSubject(java.lang.String) is called within
mapIdentity(com.pingidentity.pa.sdk.identity.Identity, com.pingidentity.pa.sdk.http.Request, com.pingidentity.pa.sdk.http.Exchange),
setting the value to the subject.
com.pingidentity.pa.sdk.plugins| Modifier and Type | Method and Description |
|---|---|
void |
mapAnonymousIdentity(Request request,
Exchange exchange)
Maps the anonymous identity.
|
void |
mapIdentity(Identity identity,
Request request,
Exchange exchange)
Maps the identity by inspecting the identity associated with the request and making modifications to the request
and/or exchange.
|
getConfigurationFieldsconfigure, getConfigurationvoid mapIdentity(Identity identity, Request request, Exchange exchange)
If the subject is configured in the IdentityMapping,
Identity.setMappedSubject(java.lang.String) should be called,
setting the subject value.
NOTE: Modifications to the exchange via Exchange.setRequest(Request), and Exchange.setResponse(Response) will be ignored
identity - the identity of the request (always set)request - the requestexchange - the exchangevoid mapAnonymousIdentity(Request request, Exchange exchange)
If the identity is mapped to request headers, this method should clobbers headers that would be set when an identity was present in the request.
NOTE: Modifications to the exchange via Exchange.setRequest(Request), and Exchange.setResponse(Response) will be ignored
request - the requestexchange - the exchangeCopyright 2023 Ping Identity Corp. All rights reserved.