use of uk.gov.ida.saml.hub.domain.InboundResponseFromIdp in project verify-hub by alphagov.
the class UnknownMethodAlgorithmLoggerTest method shouldNotReportStrongAlgorithmsInIDPResponse.
@Test
public void shouldNotReportStrongAlgorithmsInIDPResponse() throws Exception {
final InboundResponseFromIdp inboundResponseFromIdp = new InboundResponseFromIdp(ID, IN_RESPONSE_TO, ISSUER_IDP, ISSUE_INSTANT, NOT_ON_OR_AFTER, STATUS, signature, MATCHING_DATASET_ASSERTION, DESTINATION, AUTHN_STATEMENT_ASSERTION);
UnknownMethodAlgorithmLogger.probeResponseForMethodAlgorithm(inboundResponseFromIdp);
verify(mockAppender, times(0)).doAppend(captorLoggingEvent.capture());
}
use of uk.gov.ida.saml.hub.domain.InboundResponseFromIdp in project verify-hub by alphagov.
the class UnknownMethodAlgorithmLoggerTest method shouldReportUnknownSignatureAndDigestAlgorithmsInIDPResponse.
@Test
public void shouldReportUnknownSignatureAndDigestAlgorithmsInIDPResponse() throws Exception {
InboundResponseFromIdp inboundResponseFromIdp = new InboundResponseFromIdp(ID, IN_RESPONSE_TO, ISSUER_IDP, ISSUE_INSTANT, NOT_ON_OR_AFTER, STATUS, signatureWithUnknownSignatureAndDigestAlgorithms, MATCHING_DATASET_ASSERTION, DESTINATION, AUTHN_STATEMENT_ASSERTION);
UnknownMethodAlgorithmLogger.probeResponseForMethodAlgorithm(inboundResponseFromIdp);
verifyLog(mockAppender, captorLoggingEvent, 1, String.format(UnknownMethodAlgorithmLogger.SIGNATURE_AND_DIGEST_ALGORITHMS_MESSAGE, IDP, SIGNATURE_RSA_SHA1_ID, DIGEST_SHA1_ID, Response.DEFAULT_ELEMENT_LOCAL_NAME));
}
Aggregations