<div dir="ltr">If we make it pluggable do we even need to support non-KC IDPs? End of the day we&#39;re focusing on KC right and users can implement their own for other IDPs.</div><div class="gmail_extra"><br><div class="gmail_quote">On 15 September 2015 at 15:39, Bill Burke <span dir="ltr">&lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yeah, of course it would be pluggable.  I don&#39;t want to force people to use a distributed cache. :)<br>
<br>
Another idea, if we don&#39;t want to ship infinispan with our SAML/OIDC SP is to provide a list of nodes in the adapter config.  When a SSO session is started, store the information in memory.  When logout, query other machines until you find who stores the SSO sesion-&gt;local sessionid mapping.<span class=""><br>
<br>
On 9/15/2015 9:23 AM, Stian Thorgersen wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Oh, I turned things around - I thought it was the SSO session id that<br>
was missing, not the http session id. Ignore everything I&#39;ve said up<br>
until now ;)<br>
<br>
Maybe we could make the SSO Session ID --&gt; HTTP Session ID map pluggable<br>
then? By default it would use the mechanism Marek implemented, but then<br>
we can support other means as well?<br>
<br>
On 15 September 2015 at 15:14, Bill Burke &lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a><br></span><span class="">
&lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;&gt; wrote:<br>
<br>
    no.  The session id sent with the logout request is the SSO session<br>
    id.  The client does not transmit its session id to the IdP.<br>
<br>
    On 9/15/2015 9:04 AM, Stian Thorgersen wrote:<br>
<br>
        Isn&#39;t the http session id part of the standard backchannel log out?<br>
<br>
        On 15 September 2015 at 14:58, Bill Burke &lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a><br>
        &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;<br></span><div><div class="h5">
        &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a> &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;&gt;&gt; wrote:<br>
<br>
             We can do anything we want on the server side, the problem<br>
        is that<br>
             our client adapters, SAML and OIDC, should be able to work with<br>
             non-Keycloak IdPs.<br>
<br>
             On 9/15/2015 7:25 AM, Stian Thorgersen wrote:<br>
<br>
                 Could we store the mapping on the Keycloak side?<br>
        client-id + http<br>
                 session id --&gt; KC session id?<br>
<br>
                 On 14 September 2015 at 22:41, Bill Burke<br>
        &lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a> &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;<br>
                 &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a> &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;&gt;<br>
                 &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a> &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;<br>
        &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a> &lt;mailto:<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;&gt;&gt;&gt; wrote:<br>
<br>
<br>
<br>
                      On 9/14/2015 4:20 PM, Marek Posolda wrote:<br>
                      &gt; On 14/09/15 21:46, Bill Burke wrote:<br>
                      &gt;&gt; The SAML IdP is not required to send back that<br>
        id.  That<br>
                 ID is just<br>
                      &gt;&gt; the ID of the request.<br>
                      &gt; The SAML IdP doesn&#39;t need to send anything back.<br>
        I meant that<br>
                      &gt; HttpSessionID will be send in the ID of<br>
        SAMLRequest from<br>
                 SAML SP to<br>
                      &gt; auth-server . I don&#39;t know if there is any better<br>
                 attribute/element of<br>
                      &gt; AuthnRequest, which can be used to transmit such<br>
        &quot;custom&quot;<br>
                 data.<br>
                      &gt;<br>
<br>
                      SAML logout requests to the SP client contain the<br>
        principal<br>
                 name and/or<br>
                      possibly one *or more* SSO IDs (session indexes).<br>
        New OIDC<br>
                 spec will<br>
                      work similarly.<br>
<br>
                      &gt;&gt;<br>
                      &gt;&gt; A hack I&#39;m thinking of is to create an<br>
        HttpSession that<br>
                 is shared by<br>
                      &gt;&gt; everybody and store this SSO id/username -&gt; to -&gt;<br>
                 HttpSession id map<br>
                      &gt;&gt; there.<br>
                      &gt; That&#39;s good, we can avoid dependency on infinispan.<br>
<br>
                      Ugh, unfortunately, you can&#39;t provide our own<br>
        session id<br>
                 with Undertow&#39;s<br>
                      or Jetty&#39;s sessionmanager interface. :(  So no way<br>
        to hack<br>
                 this except<br>
                      for Tomcat and JbossWeb.<br>
<br>
                      &gt; But still, we will<br>
                      &gt; need the stuff like periodic cleaner thread,<br>
        which will<br>
                 remove expired<br>
                      &gt; items from this HttpSession map. And this solution<br>
                 requires HttpSession<br>
                      &gt; replication if I understand correctly?<br>
                      &gt;<br>
<br>
                      Replication would be required, but all these servlet<br>
                 containers contain<br>
                      session lifecycle listener SPIs, so there is no<br>
        need for<br>
                 reaper threads.<br>
                         But, can&#39;t do it anyways...<br>
<br>
                      &gt; As of now, we don&#39;t require HttpSession<br>
        replication for<br>
                 OIDC. Qe support<br>
                      &gt; the deployments when the application is deployed<br>
        on more<br>
                 &quot;cluster&quot; nodes<br>
                      &gt; behind loadbalancer, but application cluster<br>
        nodes don&#39;t<br>
                 communicate<br>
                      &gt; with each other. In other words, there is no<br>
                 &quot;distributable&quot; in web.xml<br>
                      &gt; . For this case, we have CLIENT_SESSION_HOST<br>
        note, so the<br>
                 OIDC<br>
                      &gt; backchannel request is sent to same cluster node<br>
        from<br>
                 which was<br>
                      &gt; code-to-token request sent earlier.<br>
                      &gt;<br>
<br>
                      Again, not something we can implement in a<br>
                 standard/portable way.<br>
<br>
                      --<br>
                      Bill Burke<br>
                      JBoss, a division of Red Hat<br>
        <a href="http://bill.burkecentral.com" rel="noreferrer" target="_blank">http://bill.burkecentral.com</a><br>
                      _______________________________________________<br>
                      keycloak-dev mailing list<br>
        <a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a>&gt;<br>
                 &lt;mailto:<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><br>
        &lt;mailto:<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a>&gt;&gt;<br>
                 &lt;mailto:<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><br>
        &lt;mailto:<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a>&gt;<br>
                 &lt;mailto:<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a><br>
        &lt;mailto:<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a>&gt;&gt;&gt;<br>
        <a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
<br>
<br>
<br>
             --<br>
             Bill Burke<br>
             JBoss, a division of Red Hat<br>
        <a href="http://bill.burkecentral.com" rel="noreferrer" target="_blank">http://bill.burkecentral.com</a><br>
<br>
<br>
<br>
    --<br>
    Bill Burke<br>
    JBoss, a division of Red Hat<br>
    <a href="http://bill.burkecentral.com" rel="noreferrer" target="_blank">http://bill.burkecentral.com</a><br>
<br>
<br>
</div></div></blockquote><div class="HOEnZb"><div class="h5">
<br>
-- <br>
Bill Burke<br>
JBoss, a division of Red Hat<br>
<a href="http://bill.burkecentral.com" rel="noreferrer" target="_blank">http://bill.burkecentral.com</a><br>
</div></div></blockquote></div><br></div>