Class WsTrustIssueValidator
java.lang.Object
swiss.trustbroker.wstrust.validator.WsTrustBaseValidator
swiss.trustbroker.wstrust.validator.WsTrustIssueValidator
- All Implemented Interfaces:
WsTrustValidator
Validator for WS-Trust ISSUE requests.
-
Constructor Summary
ConstructorsConstructorDescriptionWsTrustIssueValidator(swiss.trustbroker.config.TrustBrokerProperties trustBrokerProperties, swiss.trustbroker.homerealmdiscovery.service.RelyingPartySetupService relyingPartySetupService, swiss.trustbroker.script.service.ScriptService scriptService, Clock clock) -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplies(org.opensaml.soap.wstrust.RequestType requestType) Check if this validator applies to the given type.protected booleancorrectAssertionForSignatureValidation(List<org.opensaml.saml.saml2.core.Assertion> singletonListWithAssertion, org.opensaml.soap.wstrust.RequestSecurityToken request, swiss.trustbroker.federation.xmlconfig.ClaimsParty claimsParty, swiss.trustbroker.federation.xmlconfig.RelyingParty relyingParty) Transitional: Called if signature validation fails on the Assertion.protected swiss.trustbroker.federation.xmlconfig.WsTrustBindingvalidate(org.opensaml.soap.wstrust.RequestSecurityToken requestSecurityToken, SoapMessageHeader requestHeader) Perform validation of the RST request.Methods inherited from class swiss.trustbroker.wstrust.validator.WsTrustBaseValidator
enabled, getAllowedSignatureAlgorithms, getClock, getIssuingClaimsParty, getRecipientRelyingParty, getRelyingPartySetupService, getRstRelyingParty, getTrustBrokerProperties, validateAssertion, validateProtocolRestrictions, validateSignature
-
Constructor Details
-
WsTrustIssueValidator
public WsTrustIssueValidator(swiss.trustbroker.config.TrustBrokerProperties trustBrokerProperties, swiss.trustbroker.homerealmdiscovery.service.RelyingPartySetupService relyingPartySetupService, swiss.trustbroker.script.service.ScriptService scriptService, Clock clock)
-
-
Method Details
-
applies
public boolean applies(org.opensaml.soap.wstrust.RequestType requestType) Description copied from interface:WsTrustValidatorCheck if this validator applies to the given type.- Parameters:
requestType-- Returns:
-
getBinding
protected swiss.trustbroker.federation.xmlconfig.WsTrustBinding getBinding()- Specified by:
getBindingin classWsTrustBaseValidator- Returns:
- binding supported by this validator.
-
validate
public WsTrustValidationResult validate(org.opensaml.soap.wstrust.RequestSecurityToken requestSecurityToken, SoapMessageHeader requestHeader) Description copied from interface:WsTrustValidatorPerform validation of the RST request.- Parameters:
requestSecurityToken- requestrequestHeader- stored data from header (not null)- Returns:
- Processed assertion (i.e. headerAssertion or one from the body) plus additional parameters.
-
correctAssertionForSignatureValidation
protected boolean correctAssertionForSignatureValidation(List<org.opensaml.saml.saml2.core.Assertion> singletonListWithAssertion, org.opensaml.soap.wstrust.RequestSecurityToken request, swiss.trustbroker.federation.xmlconfig.ClaimsParty claimsParty, swiss.trustbroker.federation.xmlconfig.RelyingParty relyingParty) Description copied from class:WsTrustBaseValidatorTransitional: Called if signature validation fails on the Assertion.- Overrides:
correctAssertionForSignatureValidationin classWsTrustBaseValidator- Parameters:
singletonListWithAssertion- Modifiable list with exactly one assertion that can be modified or replaced. If the list is empty at the end, the failing validation is accepted - unless a valid signature is required. Else the validation is retried with the assertion. May throw RequestDeniedException.request- passed down from validateAssertionclaimsParty- passed down from validateAssertionrelyingParty- passed down from validateAssertion- Returns:
- false no correction performed (default), true correction performed, check singletonListWithAssertion again
-