Spring SAML2 integrate with Azure

xh 20 Reputation points
2023-08-30T02:58:19.0533333+00:00

I created a project with spring SAML2, i'm trying to integrate it with Azure AD, now single sign on flow looks pretty good, but single logout is not work properly.

I debugged the spring SAML2 implementation, it expected a signed SLO response, but actually Azure SLO response is non-signed, i already set sign option to Sign SAML response and assertions Anything else i need to configure to make SLO work? thanks.

Saml2LogoutResponseFilter.java

protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {     
	...     
	Saml2LogoutValidatorResult result = this.logoutResponseValidator.validate(parameters); 
    ... 
}

OpenSamlLogoutResponseValidator.java

private Consumer
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
16,571 questions
0 comments No comments
{count} votes

Accepted answer
  1. Givary-MSFT 19,781 Reputation points Microsoft Employee
    2023-08-31T06:58:50.59+00:00

    @xh I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue:

    User's image

    Resolved by @xh

    According this thread learn.microsoft.com/en-us/answers/questions/1184652/…, i modified spring source code to skip signature verification for SLO response

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. xh 20 Reputation points
    2023-08-30T08:15:00.95+00:00

    According this thread [learn.microsoft.com/en-us/answers/questions/1184652/…](https://learn.microsoft.com/en-us/answers/questions/1184652/invalid-signature-of-saml-logout-response-in-keycl"invalid signature of saml logout response in keycl"), i modified spring source code to skip signature verification for SLO response

    0 comments No comments