I have an application workflow like this
(A) User-Agent (browser) <-----> (B) App Server <------> (C) REST service
Suppose the app server (B) is a SAML service provider and user@domain authenticates from the browser (A) to the app server (B) using the Web Browser SSO profile.
How can an application running on (B) authenticate to a REST service (C) as user@domain.com? (Assuming B and C are both SAML SP's on the same IdP.)
If the browser were just making AJAX calls to both B and C, it would be straightforward. But if the REST service is invoked directly from the application, what do you do?
What I'm struggling with: If the application itself is not the SAML SP, but integrated with one (say, using Shibboleth SP and the REMOTE_USER header) your application may never see a SAML assertion. You know the user is logged in and authenticated against an IdP but have no way to get a SAML assertion to hand off to the backend service.
Is there a solution or am I out of luck?