<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>
<div>If folks are using modern windows (VS isapi, from a decade&#43; ago) ONE might go look at the owin middleware, that abstracts hosts when doing various provider-based websso and related protocols. One could imagine a shib hander shim set (that would talk to
 their shibd component).</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="font-size:100%">Sent from Samsung tablet</div>
</div>
<br>
<br>
<br>
-------- Original message --------<br>
From: &quot;Cantor, Scott&quot; &lt;cantor.2@osu.edu&gt; <br>
Date: 11/28/2013 4:05 PM (GMT-08:00) <br>
To: Amit Thukral &lt;amit.thukral403@gmail.com&gt; <br>
Cc: dev@shibboleth.net <br>
Subject: Re: Need to integrate Shibboleth SP <br>
<br>
<br>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On 11/27/13, 5:46 AM, &quot;Amit Thukral&quot; &lt;amit.thukral403@gmail.com&gt; wrote:<br>
&gt;<br>
&gt;Following is the current update from the last mail I had sent.<br>
&gt;1) After successful compilation for shibboleth-sp and supporting<br>
&gt;libraries, shibd comes up fine.<br>
<br>
I doubt that you even need shibd in your design. That's a tool for<br>
maintaining state outside of a multi-process web server.<br>
<br>
&gt;2) I have implemented an interface class ShibTargetWaf to work between<br>
&gt;the device's webserver (it is actually a reverse proxy called stm) which<br>
&gt;has an authentication and authorization module say &quot;X&quot; and shibd but the<br>
&gt;interface class is in very nascent<br>
&gt; stage and needs your input to make further progress.<br>
<br>
I can only answer questions with specific answers that don't depend on my<br>
spending time learning your requirements.<br>
<br>
&gt; so its like:<br>
&gt;stm-&gt;X-&gt;ShibTargetWaf-&gt;shibd<br>
<br>
shibd is an implementation detail, it isn't part of the request processing<br>
sequence of any system using the SP software. It is very unlikely that you<br>
need it at all. You should probably set both the InProcess and<br>
OutOfProcess flags when initializing the SPConfig layer and run the entire<br>
system in one process linked to the &quot;full&quot; version of the libraries. No<br>
shibd, no remoting, no extra work.<br>
<br>
&gt;1) could you pls. have a look at the file wafsp.cpp (interface class)<br>
&gt;attached and shibboleth2.xml and let me know what else I need to do ?<br>
<br>
No, I can't. See above. All I can do is answer questions. I cannot read<br>
your code and tell you how to build something I have no resources to work<br>
on.<br>
<br>
&gt;2) There is no RequestMapper registration and invocation yet in interface<br>
&gt;class, following two lines are commented in shib_child_init in wafsp.cc<br>
&gt;<br>
&gt;do i need something similar ? if yes, please guide me how to do it ?<br>
<br>
If you don't need the ability to assign properties to a request based on a<br>
URL, then you don't need anything but a degenerate implementation of the<br>
interface that returns whatever settings you want to apply. The<br>
implementation provided is based on parsing out the request URL and<br>
looking up settings based on pieces of the URL.<br>
<br>
&gt;3) I am planning to follow the g_Sites map way of finding hostname (as is<br>
&gt;done in isapi_shib.c) and initializing the same while constructing<br>
&gt;ShibTargetWaf object. Is it fine ?<br>
&gt; As of now, its hard coded.<br>
<br>
Do you actually care what the hostname is? If you don't need to apply<br>
policy based on URL, you probably don't care. If you do, then you would<br>
need something like that mapping if you don't have an API in your system<br>
to obtain the hostname. I should note that that's really a bug in your API<br>
in that case. All web servers need to provide a means of obtaining the<br>
proper hostname and other parameters. IIS is badly broken in not doing so.<br>
<br>
&gt; 4)&nbsp; who should be doing the redirect to matching IDP,<br>
&gt; the existing authentication and authorization module &quot;X&quot; which already<br>
&gt;does authentications like LDAP, Kerberos, radius etc. and does<br>
&gt;authorization too ?<br>
&gt;OR<br>
&gt;should it be done from ShibTargetWaf&nbsp; ?<br>
<br>
The wrapper class is nothing but a shim between the ServiceProvider class<br>
and the native server. In the SP, it's the ServiceProvider class, and the<br>
handlers that plug into it, that generate redirects and do work. All the<br>
wrapper does is translate the interface methods into native calls.<br>
<br>
&gt;5) once the authentication is done from IDP, the response would be<br>
&gt;ultimately be received on SP's assertion consumer service, and the module<br>
&gt;&quot;X&quot; should call a response handler on &quot;ShibTargetWaf&quot; for further<br>
&gt;processing, am i right here ?<br>
<br>
Yes. The ACS is implemented as a Handler, which is really an abstraction<br>
for anything that happens to need to fully process an HTTP request. It's<br>
no different than what Apache calls a handler or IIS calls an ISAPI<br>
Extension, just a different layer of code. An ACS is just a Handler that<br>
happens to live at a particular URL, and when it gets invoked, it expects<br>
to process a SAML SSO Response from an IdP, and then redirect to a<br>
resource if it's successful.<br>
<br>
I can't tell you exactly how to get the Handlers to run, you would have to<br>
have a way to hook particular URLs and know to dispatch requests for them<br>
to the ServiceProvider::doHandler method.<br>
<br>
&gt;6) if the response assertion has success response, how should I be doing<br>
&gt;session management in module &quot;X&quot;, what will be the session key/id ?<br>
<br>
I don't know that sessions even make sense in your system, but session<br>
management is already done by the SP itself inside its code. It expects to<br>
maintain cookies itself and if you can't use that design, then you have an<br>
absolutely massive amount of redesign work to do. You wouldn't have any<br>
ability to use the SP directly, you would have to change around a lot of<br>
code. It would be a waste of your time IMHO.<br>
<br>
So asking that question is a huge red flag.<br>
<br>
&gt;7) There could be multiple requests we might be sending it to IDP<br>
&gt;asynchronously, so how will I know which response is for which request ?<br>
<br>
The SP doesn't care. It doesn't correlate requests to responses, it treats<br>
each response in isolation, and the only state is in the RelayState it<br>
generates and consumes, and that's mainly to track a resource URL.<br>
<br>
&gt;8) once the session expires on module &quot;X&quot;, will I need to refresh the<br>
&gt;token (e.g. relay-state or something ) ? How is this token refreshed ?<br>
<br>
SP sessions are internal to it, and when they expire, the SP just treats<br>
the request as unauthenticated and does whatever it's configured to do for<br>
that kind of request.<br>
<br>
It does not have a concept of renewing or refreshing anything, and does<br>
not connect a new session to an earlier one.<br>
<br>
-- Scott<br>
<br>
<br>
--<br>
To unsubscribe from this list send an email to dev-unsubscribe@shibboleth.net<br>
</div>
</span></font>
</body>
</html>