<div dir="ltr">I think I understand this, but let's check:<div><br></div><div>rest-api (new rest api protected by oauth2 that doesn't want to have to reauthenticate consumers from siteA)</div><div>siteA (original site protected by shib that wants to make ajax calls to the new protected rest-api)</div><div><i>rest-api and siteA are not on the same domain name, thus making the ajax calls CORS.</i></div><div><ol><li>siteA loads and browser negotiates for shib session</li><li>siteA then sends browser to get a 3-legged oauth2 token from rest-api (using google OAUTH2 provider). </li><li>browser is already shib authenticated (and would need to authorize rest-api the first time)</li><li>browser gets sent to the callback url at rest-api</li><li>rest-api stores the token and its expiration in a token store (to validate future calls to protected endpoint)</li><li>browser gets redirected back to siteA with the token as a url parameter (<i>All remaining calls to protected rest-api endpoints by siteA must contain the OUATH2 token in the request header.</i>)</li><li>siteA calls protected rest-api endpoint with OAUTH2 token</li><li>protected rest-api endpoints looks in the token store to see if the provided token is valid and not expired before responding</li><li>cron purges expired token records on a regular basis.</li></ol><div>If that's correct/close, does google's OAUTH2 provider keep hackers from submitting tokens on the callback url, or is that not really an issue?</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div>-Luke</div><div><a value="+17346042271">734.604.2271</a></div></div></div>
<br><div class="gmail_quote">On Wed, May 27, 2015 at 5:00 PM, Liam Hoekenga <span dir="ltr"><<a href="mailto:liamr@umich.edu" target="_blank">liamr@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 27, 2015 at 3:15 PM, Jim Fox <span dir="ltr"><<a href="mailto:fox@washington.edu" target="_blank">fox@washington.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I don't really follow the rest of the message, but that is the technical situation. AJAX calls normally have to happen after the browser has negotiated for a session (by virtue of them having access to the same cookie store when they make the calls to the server).<br>
<br>
</blockquote>
<br></span>
We do this cross-domain ajax using an oauth mechanism.  The original site, where you have a session, sets a token on the app's page.  Your ajax code includes this token in requests to the remote site where it is used for authn.  It's not shib or saml.</blockquote></div><div class="gmail_extra"><br></div>Hi Luke -</div><div class="gmail_extra"><br>We don't currently offer a centralized OAUTH2 provider.  DePriest and I met with the Law School about a month ago, and they've expressed their interest in such a service.</div><div class="gmail_extra"><br></div><div class="gmail_extra">In the meantime, you might be able to use the one provided by the Directory of APIs (<a href="http://developer.it.umich.edu/" target="_blank">http://developer.it.umich.edu/</a>), but I think you'd probably need to put register your APIs with that service (they wouldn't need to be publicly available).</div><div class="gmail_extra"><br></div><div class="gmail_extra">You could also take advantage of the OAUTH2 provider offered via Google (I think this is what you want - <a href="https://developers.google.com/+/api/oauth" target="_blank">https://developers.google.com/+/api/oauth</a>).  Since our google instance is protected using Shibboleth, you'd be using UMich accounts.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra"><br></div><div class="gmail_extra">Liam</div></font></span></div>
</blockquote></div><br></div>