Reputation: 287
I want to to implement SSO using SAML2. But I don't know how to get it work with a distributed system where each instance is running independently on its own server. The environment consists out of three instances:
The question is what would be the best approach if the frontend calls a guarded backend route? Which sequence of actions can be seen as good practice?
At the moment I have this behaviour in my mind:
But as long as I think about this sequence I realize this couldn't work. Its because the frontend is its own instance and it is independent from the backend. The redirect to the SSO-Page initiated by passport don't work if you have a separated frontend instance. It works if you call the guarded route directly with the browser, because then you have only two communication partners (service provider & identity provider) instead of three. But this is not the case here.
Thanks and regards
Philipp
Upvotes: 5
Views: 11522
Reputation: 658
I've done something similar in a previous job with this logique:
With this logique you'll keep the frontend away from the identity provider and in coherence with the backend.
Upvotes: 3