From 99f233f98c1cb3f105b2610e628a793f8571a3af Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Fri, 31 May 2024 13:29:02 -0600 Subject: [PATCH] Update Signature Validator Closes gh-15022 --- .../authentication/OpenSaml4AuthenticationProvider.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/OpenSaml4AuthenticationProvider.java b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/OpenSaml4AuthenticationProvider.java index 2e0f88d28b..f8caeff157 100644 --- a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/OpenSaml4AuthenticationProvider.java +++ b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/OpenSaml4AuthenticationProvider.java @@ -47,6 +47,7 @@ import org.opensaml.core.xml.schema.XSDateTime; import org.opensaml.core.xml.schema.XSInteger; import org.opensaml.core.xml.schema.XSString; import org.opensaml.core.xml.schema.XSURI; +import org.opensaml.saml.common.assertion.AssertionValidationException; import org.opensaml.saml.common.assertion.ValidationContext; import org.opensaml.saml.common.assertion.ValidationResult; import org.opensaml.saml.saml2.assertion.ConditionValidator; @@ -858,6 +859,12 @@ public final class OpenSaml4AuthenticationProvider implements AuthenticationProv static SAML20AssertionValidator createSignatureValidator(SignatureTrustEngine engine) { return new SAML20AssertionValidator(new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), null, engine, validator) { + @Nonnull + @Override + protected ValidationResult validateBasicData(@Nonnull Assertion assertion, @Nonnull ValidationContext context) throws AssertionValidationException { + return ValidationResult.VALID; + } + @Nonnull @Override protected ValidationResult validateConditions(Assertion assertion, ValidationContext context) {