Class FSAssertionArtifactHandler
- java.lang.Object
-
- com.sun.identity.federation.services.fednsso.FSAssertionArtifactHandler
-
- Direct Known Subclasses:
FSBrowserArtifactConsumerHandler,FSBrowserPostConsumerHandler,FSLECPConsumerHandler,FSWMLPostConsumerHandler
public class FSAssertionArtifactHandler extends Object
Handler that runs onSPside to receive and processAuthnResponse.
-
-
Field Summary
Fields Modifier and Type Field Description protected AttributeStatement_autoFedStatementprotected static StringANONYMOUS_PRINCIPALprotected FSAttributeMapperattributeMapperprotected ListattrStatementsprotected FSAuthnRequestauthnRequestprotected FSAuthnResponseauthnResponseprotected MapautoFedSearchMapprotected AttributeStatementbootStrapStatementprotected booleandoFederateprotected com.sun.identity.federation.jaxb.entityconfig.BaseConfigTypehostConfigprotected com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorTypehostDescprotected StringhostEntityIdprotected StringhostMetaAliasprotected com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorTypeidpDescriptorprotected StringidpEntityIdprotected static MapidTimeMapprotected StringnameIDPolicyprotected Stringrealmprotected FSRealmAttributeMapperrealmAttributeMapperprotected StringrelayStateprotected jakarta.servlet.http.HttpServletRequestrequestprotected jakarta.servlet.http.HttpServletResponseresponseprotected FSResponsesamlResponseprotected ElementsamlResponseEltprotected ListsecurityAssertionsprotected ObjectssoToken
-
Constructor Summary
Constructors Modifier Constructor Description protectedFSAssertionArtifactHandler()Default constructor.FSAssertionArtifactHandler(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType idpDescriptor, String idpEntityId, boolean doFederate, String nameIDPolicy, String relayState)Constructs aFSAssertionArtifactHandlerobject.FSAssertionArtifactHandler(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType idpDescriptor, String idpEntityId, FSAuthnRequest authnRequest, boolean doFederate, String relayState)Constructs aFSAssertionArtifactHandlerobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intdoAccountFederation(NameIdentifier ni)protected intdoSingleSignOn(NameIdentifier ni, int handleType, NameIdentifier niIdp, Map env)protected booleanforThisServer(Conditions conds)protected ObjectgenerateAnonymousToken(jakarta.servlet.http.HttpServletResponse response)Generates an anonymous token for onetime case.protected intgenerateToken(NameIdentifier ni, int handleType, NameIdentifier niIdp, Map env)StringgetAuthInstant()GetsAuthInstant.FSAuthnRequestgetAuthnRequest()GetsFSAuthnRequestobject.StringgetHostEntityId()Gets hosted SP's Entity ID.protected FSAuthnRequestgetInResponseToRequest(String requestID)protected StringgetProvider(String requestID)StringgetRealm()Gets the realm under which the entity resides.protected booleanisIDPProxyEnabled(String requestID)Checks if the proxying is enabled.voidprocessAuthnResponse(FSAuthnResponse authnResponse)ProcessesFSAuthnResponse.protected voidprocessSAMLRequest()protected voidredirectToResource(String resourceURL)protected voidsendProxyResponse(String requestID)Sends the proxy authentication response to the proxying service provider which has originally requested for the authentication.voidsetAuthnRequest(FSAuthnRequest authnRequest)SetsFSAuthnRequestobject.voidsetHostDescriptor(com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType desc)Sets hosted SP meta descriptor.voidsetHostDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType config)Sets hosted SP extended meta config.voidsetHostEntityId(String entityId)Sets hosted SP entity ID.voidsetMetaAlias(String metaAlias)Sets hosted SP's meta alias.voidsetProviderDescriptor(com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType idpDescriptor)SetsIDPprovider descriptor.voidsetProviderEntityId(String idpEntityId)SetsIDPprovider entity ID.voidsetRealm(String realm)Sets the realm under which the entity resides.protected SubjectvalidateAssertions(List assertions)protected booleanverifyAssertionSignature(FSAssertion assertion)protected booleanverifyResponseStatus(Response resp)
-
-
-
Field Detail
-
request
protected jakarta.servlet.http.HttpServletRequest request
-
response
protected jakarta.servlet.http.HttpServletResponse response
-
idpDescriptor
protected com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType idpDescriptor
-
idpEntityId
protected String idpEntityId
-
authnRequest
protected FSAuthnRequest authnRequest
-
relayState
protected String relayState
-
idTimeMap
protected static Map idTimeMap
-
doFederate
protected boolean doFederate
-
nameIDPolicy
protected String nameIDPolicy
-
bootStrapStatement
protected AttributeStatement bootStrapStatement
-
_autoFedStatement
protected AttributeStatement _autoFedStatement
-
autoFedSearchMap
protected Map autoFedSearchMap
-
securityAssertions
protected List securityAssertions
-
ssoToken
protected Object ssoToken
-
authnResponse
protected FSAuthnResponse authnResponse
-
samlResponseElt
protected Element samlResponseElt
-
attrStatements
protected List attrStatements
-
hostDesc
protected com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType hostDesc
-
hostConfig
protected com.sun.identity.federation.jaxb.entityconfig.BaseConfigType hostConfig
-
realm
protected String realm
-
hostEntityId
protected String hostEntityId
-
hostMetaAlias
protected String hostMetaAlias
-
ANONYMOUS_PRINCIPAL
protected static String ANONYMOUS_PRINCIPAL
-
attributeMapper
protected FSAttributeMapper attributeMapper
-
realmAttributeMapper
protected FSRealmAttributeMapper realmAttributeMapper
-
samlResponse
protected FSResponse samlResponse
-
-
Constructor Detail
-
FSAssertionArtifactHandler
protected FSAssertionArtifactHandler()
Default constructor.
-
FSAssertionArtifactHandler
public FSAssertionArtifactHandler(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType idpDescriptor, String idpEntityId, boolean doFederate, String nameIDPolicy, String relayState)Constructs aFSAssertionArtifactHandlerobject.- Parameters:
request-HttpServletRequestobject.response-HttpServletResponseobjectidpDescriptor-IDPprovider descriptoridpEntityId- entity ID of theIDPdoFederate- a flag indicating if it is a federation requestnameIDPolicy-nameIDPolicyusedrelayState-RelayStateurl
-
FSAssertionArtifactHandler
public FSAssertionArtifactHandler(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType idpDescriptor, String idpEntityId, FSAuthnRequest authnRequest, boolean doFederate, String relayState)Constructs aFSAssertionArtifactHandlerobject.- Parameters:
request-HttpServletRequestobject.response-HttpServletResponseobjectidpDescriptor-IDPprovider descriptoridpEntityId- entity ID of theIDPauthnRequest-FSAuthnRequestfrom soapdoFederate- a flag indicating if it is a federation requestrelayState-RelayStateurl
-
-
Method Detail
-
setHostEntityId
public void setHostEntityId(String entityId)
Sets hosted SP entity ID.- Parameters:
entityId- hosted SP's entity ID to be set
-
setHostDescriptor
public void setHostDescriptor(com.sun.identity.liberty.ws.meta.jaxb.SPDescriptorType desc)
Sets hosted SP meta descriptor.- Parameters:
desc- SP's meta descriptor to be set.- See Also:
getHostEntityId()
-
setHostDescriptorConfig
public void setHostDescriptorConfig(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType config)
Sets hosted SP extended meta config.- Parameters:
config- SP's extended meta to be set.
-
setMetaAlias
public void setMetaAlias(String metaAlias)
Sets hosted SP's meta alias.- Parameters:
metaAlias- SP's meta alias to be set
-
getHostEntityId
public String getHostEntityId()
Gets hosted SP's Entity ID.- Returns:
- hosted entity id.
- See Also:
setHostEntityId(String)
-
getRealm
public String getRealm()
Gets the realm under which the entity resides.- Returns:
- the realm under which the entity resides.
- See Also:
setRealm(String)
-
setRealm
public void setRealm(String realm)
Sets the realm under which the entity resides.- Parameters:
realm- The realm under which the entity resides.- See Also:
getRealm()
-
getAuthnRequest
public FSAuthnRequest getAuthnRequest()
GetsFSAuthnRequestobject.- Returns:
FSAuthnRequestobject- See Also:
setAuthnRequest(FSAuthnRequest)
-
setAuthnRequest
public void setAuthnRequest(FSAuthnRequest authnRequest)
SetsFSAuthnRequestobject.- Parameters:
authnRequest-FSAuthnRequestobject to be set.- See Also:
getAuthnRequest()
-
processAuthnResponse
public void processAuthnResponse(FSAuthnResponse authnResponse)
ProcessesFSAuthnResponse.- Parameters:
authnResponse-FSAuthnResponseobjec to be processed
-
verifyResponseStatus
protected boolean verifyResponseStatus(Response resp)
-
verifyAssertionSignature
protected boolean verifyAssertionSignature(FSAssertion assertion)
-
forThisServer
protected boolean forThisServer(Conditions conds)
-
generateToken
protected int generateToken(NameIdentifier ni, int handleType, NameIdentifier niIdp, Map env)
-
processSAMLRequest
protected void processSAMLRequest()
-
doSingleSignOn
protected int doSingleSignOn(NameIdentifier ni, int handleType, NameIdentifier niIdp, Map env)
-
redirectToResource
protected void redirectToResource(String resourceURL) throws FSException
- Throws:
FSException
-
doAccountFederation
protected int doAccountFederation(NameIdentifier ni)
-
generateAnonymousToken
protected Object generateAnonymousToken(jakarta.servlet.http.HttpServletResponse response) throws SessionException
Generates an anonymous token for onetime case.- Throws:
SessionException
-
getInResponseToRequest
protected FSAuthnRequest getInResponseToRequest(String requestID)
-
setProviderDescriptor
public void setProviderDescriptor(com.sun.identity.liberty.ws.meta.jaxb.IDPDescriptorType idpDescriptor)
SetsIDPprovider descriptor.- Parameters:
idpDescriptor- identity provider descriptor.
-
setProviderEntityId
public void setProviderEntityId(String idpEntityId)
SetsIDPprovider entity ID.- Parameters:
idpEntityId- identity provider entity id.
-
getAuthInstant
public String getAuthInstant()
GetsAuthInstant.- Returns:
AuthInstantin UTC date format.
-
isIDPProxyEnabled
protected boolean isIDPProxyEnabled(String requestID)
Checks if the proxying is enabled. It will be checking if the proxy service provider descriptor is set in the session manager for the specific request ID.- Parameters:
requestID- authentication request id which is created by the proxying IDP to the authenticating IDP.- Returns:
- true if the proxying is enabled.
-
sendProxyResponse
protected void sendProxyResponse(String requestID)
Sends the proxy authentication response to the proxying service provider which has originally requested for the authentication.- Parameters:
requestID- authnRequest id that is sent to the authenticating Identity Provider.
-
-