We have a product with one client, and we implemented the SAML stream for this client, using Spring SAML security , when we act as a service provider and idp are on the client side.
Now we have another client that also wants authentication to be with SAML, and we want the same SP to implement the SAML stream for this client, and the second client will have 2 threads for SAML for the mobile device and one for the other devices using the same IDP. IDPs of two clients are different.
Problem
There are several differences between the two clients, for example, the approval attributes are different, and the action for successful authentication is different, we currently provide our own implementation.
There may also be more changes, such as various bindings, etc.
My question is, what is the best option / best practice to support such a scenario and the possibility of expanding my SP to support more SAML streams with differences in Assertion attributes and other configurations?
When we use Spring SAML, should we use different Spring security context files for each of the SAML flavors?
Are there thread safety issues when using multiple contexts in parallel?