title: Configure Okta to Mediate between our SP Application and IdP
body: <p>We are a Service Provider who has SAML enabled our app to allow for IdPs to authenticate users for us. To make sure everyone is on the same page</p>
  
  <ul>
  <li>Identity Provider (IdP) is an application whose job it is to authenticate users</li>
  <li>Service Provider (SP) is an end application which federates identities and authentication to the IdP</li>
  <li>SAML is a protocol allowing IdPs to make trustworthy identity assertions to SPs. We are using SAML 2.0 (<a href="http://en.wikipedia.org/wiki/SAML_2.0" rel="noreferrer">http://en.wikipedia.org/wiki/SAML_2.0</a>)</li>
  </ul>
  
  <p>More information on federated identity here: <a href="http://developer.okta.com/docs/guides/saml_guidance.html" rel="noreferrer">http://developer.okta.com/docs/guides/saml_guidance.html</a> </p>
  
  <p>We are currently only using Okta as an IdP, but have run into a situation where we need to integrate with a separate IdP. We would like to have our app only communicate with Okta and have Okta deal with talking to this separate IdP and validating their assertions. Due to our particular use case, our app knows what underlying IdP should be used, so no need for IdP Discovery.</p>
  
  <p>We would like to configure Okta so that the authentication flow is as follows:</p>
  
  <ol>
  <li><p>Our app redirects the user to an endpoint in Okta indicating to use the underlying IdP for authentication</p></li>
  <li><p>Okta and the underlying IdP do whatever necessary to authenticate the user and validate the authentication</p></li>
  <li><p>Our app gets a single response (via HTTP-POST) to our ACS endpoint authenticating the user, signed by Okta</p></li>
  </ol>
  
  <p>From the end user perspective, they navigate to service-provider.com, are redirected through Okta to underlying-idp.com, perform the necessary authentication, and then are redirected back to service-provider.com. The end user is unaware of the middle Okta layer, with the possible exception of an Okta URL briefly appearing in the browser address bar during redirects.</p>
  
  <p>So far, we have been able to set up Inbound SAML in our Okta instance so that users can be authenticated in Okta via the underlying IdP. We have our app redirect to the endpoint given in the Inbound SAML configuration page with the SAMLRequest, but this brings users to an Okta dashboard since the link is just for authenticating users in Okta, not to authenticate users for a SP using Okta. See our relevant configuration:</p>
  
  <ul>
  <li><a href="http://i.stack.imgur.com/tD9y7.png" rel="noreferrer">Configuration for our app in Okta which allows us to use Okta as a direct IdP</a></li>
  <li><a href="http://i.stack.imgur.com/mGRJy.png" rel="noreferrer">Configuration results of the Inbound SAML. We redirect our SAMLRequest to the Assertion Consumer Service URL given</a></li>
  </ul>
  
  <p>How can we configure Okta so that our use case is possible? Ideally, we would like Okta to serve as a middleman or mediator, checking and passing along SAML requests/assertions. Specifically, we don’t need these users to be authenticated Okta users necessarily; we just need Okta to assert the user is who they say they are based on the underlying IdP’s assertion.</p>