<br><br><div class="gmail_quote">On Tue, Mar 22, 2011 at 2:47 PM, Matt Wringe <span dir="ltr">&lt;<a href="mailto:mwringe@redhat.com">mwringe@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;">
<div><div></div><div class="h5">On Tue, 2011-03-22 at 00:08 +0100, Julien Viet wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Mar 21, 2011 at 2:56 PM, Matt Wringe &lt;<a href="mailto:mwringe@redhat.com">mwringe@redhat.com</a>&gt;<br>
&gt; wrote:<br>
&gt;         Hi,<br>
&gt;<br>
&gt;         For wsrp ws-security we need to pass the username and actual<br>
&gt;         password<br>
&gt;         (not token) between the consumer and producer. We need to do<br>
&gt;         what is<br>
&gt;         currently done with the ClusteredSSOFilter and<br>
&gt;         PortalLoginModule when<br>
&gt;         the clustering exo.profile is enabled.<br>
&gt;<br>
&gt;         What is the current policy for dealing with exo.profiles? I<br>
&gt;         can&#39;t seem<br>
&gt;         to find much info on it other than when to use it for the<br>
&gt;         clustering<br>
&gt;         setup.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; When the server boots it shows the active profiles on the console<br>
&gt; like:<br>
&gt;<br>
&gt;<br>
&gt; Mar 21, 2011 11:57:38 PM org.exoplatform.container.RootContainer<br>
&gt; &lt;init&gt;<br>
&gt; INFO: Active profiles [tomcat]<br>
&gt;<br>
&gt;<br>
&gt; The server determines a profile by itself (tomcat for tomcat, etc...),<br>
&gt; additional profiles are added with the -Dexo.profiles VM argument with<br>
&gt; a comma separated list<br>
&gt;<br>
&gt;<br>
&gt; When you want to activate a part of the configuration you have to<br>
&gt; depend on a profile, here again you can specify a list of profile with<br>
&gt; a comma separated list.<br>
&gt;<br>
&gt;<br>
&gt; You can determine which elements of the configuration accepts a<br>
&gt; profile by looking at<br>
&gt; the <a href="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd" target="_blank">http://www.exoplaform.org/xml/ns/kernel_1_1.xsd</a> schema, normally<br>
&gt; it should answer your needs if you are going to activate some part of<br>
&gt; the server this way.<br>
&gt;<br>
&gt;         Would it be acceptable to create a &#39;sso&#39; or &#39;wsrpsso&#39; profile<br>
&gt;         which<br>
&gt;         would also enable the authenticated credentials propagation in<br>
&gt;         the<br>
&gt;         ClusteringSSOFilter and PortalLoginModule? Or is the profile<br>
&gt;         setup<br>
&gt;         reserved for other tasks?<br>
&gt;<br>
&gt;<br>
&gt; This makes sense to me, although the clustered sso filter is<br>
&gt; configured differently because it&#39;s a servlet filter, it uses<br>
&gt; (unfortunately) programmatic hardcoded profile selection with the<br>
&gt; code: ExoContainer.getProfiles().contains(&quot;cluster&quot;)<br>
&gt;<br>
&gt;<br>
&gt; Also I would like to move this server dependent code to the WCI module<br>
&gt; at some point (I wanted to do it currently in trunk, so this code<br>
&gt; would move to a proper location and could be more easily tested), but<br>
&gt; doing that would need to bring a dependency of this filter onto the<br>
&gt; exo kernel which is something we would like to avoid. Perhaps there is<br>
&gt; something creative than can be done, to keep flexibility and avoid the<br>
&gt; duplication in WSRP.<br>
<br>
</div></div>An option would be to change the code in wci and allow for the retrieval<br>
of the actual password when presented with the username and token.<br></blockquote><div><br></div><div>There is a notion of token store in GateIn itself, I don&#39;t know if it is related or not.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

If we can create a type of password store in wci, then we don&#39;t need to<br>
store the password in the servlet session during the a portal login.<br></blockquote><div><br></div><div>Somehow this already kind of exist with the token store, that stores the password for the login. It is used when someone performs a form login not triggerred by Java EE (i.e 90% of the time).</div>
<div>This token store is used to produce a token that will be used with the browser interactions. Perhaps it would make sense to move it to WCI as well.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

This would be enough for the wsrp ws-security, but I think the<br>
clusteringsso filter would still need to exist.<br></blockquote><div><br></div><div>My concern was about moving this server specific part to the JBoss AS WCI SPI implementation.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
&gt; Actually I don&#39;t know exactly how you plan to use it in WSRP, would it<br>
&gt; be on producer side in the producer war file ?<br>
<br>
</div>Its not on the producer side, its on the consumer side. It basically<br>
works like this:<br>
- a user logs into the consumer portal<br>
- a user goes to access a remote portlet<br>
- the users credentials are sent from the consumer to the producer<br>
- the producer authenticates and verifies the credentials and use that<br>
to make any role based decisions.<br>
<br>
The issue is with retrieving the actual password in the consumer and not<br>
a password token (since the wci token is only valid for the original<br>
server).<br></blockquote><div><br></div><div>So the consumer would use the TokenStore to retrieve the user password to propagate it once a user has established authentication ?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
This is all very similar to how the clustering sso currently works, and<br>
I would like to reuse as much code between the two.<br></blockquote><div><br></div><div>Could you also check the TokenStore ? the TransientTokenStore, I think it is removed from GateIn trunk, but before Alain&#39;s work it was doing something similar.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Using the current implementation if we enable the clustering profile (or<br>
create another profile which only handles the password part and not full<br>
clustering) then we can retrieve the actual password in the consumer in<br>
the same manner as the clustering setup.<br></blockquote><div><br></div><div>I understand that.</div><div><br></div><div>The TransientTokenStore worked this way when a user performs a programmatic login:</div><div><br></div>
<div>1/ store username/password in store and get a token</div><div>2/ perform java EE authent with username and password = token</div><div>3/ during password check, if password is a token, take the real password from the token store and remove the useless token, now the password is the real password</div>
<div>4/ proceed to authent</div><div><br></div><div>this would be similar, except that the token would not be removed from the token store until the user logs out.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5"><br>
&gt;<br>
&gt; Also this code could be stay in GateIn but in a JBoss specific module<br>
&gt; instead. My concern is that any activation of the cluster code in<br>
&gt; tomcat could lead to a class not found exception of<br>
&gt; the org.jboss.web.tomcat.security.login.WebAuthentication class. But<br>
&gt; this is a different concern than the one you are expressing here of<br>
&gt; course.<br>
&gt;<br>
&gt;<br>
&gt;         I would rather not have to duplicate this effort in the wsrp<br>
&gt;         code.<br>
&gt;<br>
&gt;         Thanks,<br>
&gt;<br>
&gt;         Matt Wringe<br>
&gt;<br>
&gt;         _______________________________________________<br>
&gt;         gatein-dev mailing list<br>
&gt;         <a href="mailto:gatein-dev@lists.jboss.org">gatein-dev@lists.jboss.org</a><br>
&gt;         <a href="https://lists.jboss.org/mailman/listinfo/gatein-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/gatein-dev</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
</div></div></blockquote></div><br>