Expected Behavior

Similarly to oauth2-login, it should be possible to configure saml2-login in xml.

We would need something like this

<http>
       <saml2-login authentication-manager-ref="xxxxx" relying-party-registration-repository-ref="xxxxx">
</http>

to be able to configure spring security similarly to what is done with boot. Of course authentication-manager-ref or relying-party-registration-repository-ref would be optional as described in documentation configuring in java with spring-boot.

Current Behavior

Currently we do not know how to configure saml with xml in spring-security without spring-boot

Comment From: marcusdacoregio

Hi @amergey, the support SAML 2.0 Login & Single Logout XML support has been merged into the 5.7.x branch. It would be awesome if you could try the SNAPSHOT version and see if that fits your use case.

You can refer to this sample to help to configure your application.

Comment From: abhishek-bafna-amdhan

@marcusdacoregio It is still unclear how to configure relying-party-registration-repository-ref in xml. This sample says nothing about it

Everything finally comes down to creating RelyingPartyRegistrationRepository bean and passing the registrations to its constructor from the xml seems not possible now.