spring-projects / spring-security-samples

1.46k stars 709 forks source link

Can the saml-extension-federation be used as a service provider / relying party with non-spring java web apps deployed to tomcat? #215

Closed coffeebeantraining closed 2 weeks ago

coffeebeantraining commented 9 months ago

I am trying to determine if I can use the saml-extension-federation as a service provider with existing non-Spring Java web apps where I do not have access to the Java web apps source code. I have java war files that are deployed to a Tomcat container and I was hoping I could just plug the saml-extension-federation into the deployed web app somehow and configure the extension to communicate with Microsoft Entra ID enterprise apps as the IDP. Does anyone know if that is even possible or do i need to look elsewhere for a service provider extension or plugin.
Thanks for any help.

jzheaux commented 2 weeks ago

The saml-extension-federation sample is Boot-based and so your apps would need to be using Boot to leverage that support. And while Spring Security is designed to work without Spring Boot, it would likely require configuring your Java applications to use it.

You could look into deploying a separate Spring Boot web application that acts as a bridge between your Java web apps and the IdP. This would mean that your existing Java web apps would treat this new web app as the IdP and the new web app would federate with Microsoft Entra ID.

I wonder, though, why not simply have the SPs point to Microsoft Entra ID?

Either way, thanks for the question and for reaching out, @coffeebeantraining. I think this would be better suited for StackOverflow and would encourage you to post a question there, link to it here, and we and the rest of the community can help you look into this question.