<div dir="ltr">hi bill,<div><br></div><div>i&#39;ve made the change but principal username still showing random userid. Kindly advise.<br><div><br></div><div><div>&lt;PicketLink xmlns=&quot;urn:picketlink:identity-federation:config:2.1&quot;&gt;</div><div><span class="" style="white-space:pre">        </span>&lt;PicketLinkSP xmlns=&quot;urn:picketlink:identity-federation:config:2.1&quot;</div><div><span class="" style="white-space:pre">                </span>ServerEnvironment=&quot;tomcat&quot; BindingType=&quot;REDIRECT&quot; RelayState=&quot;someURL&quot;&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;IdentityURL&gt;${idp.url::<a href="https://localhost:8443/auth/realms/saml-demo-1/protocol/saml">https://localhost:8443/auth/realms/saml-demo-1/protocol/saml</a>}&lt;/IdentityURL&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;ServiceURL&gt;${EMPLOYEE.url::<a href="http://localhost:8080/employee/test.jsp">http://localhost:8080/employee/test.jsp</a>}</div><div><span class="" style="white-space:pre">                </span>&lt;/ServiceURL&gt;</div><div><span class="" style="white-space:pre">        </span>&lt;/PicketLinkSP&gt;</div><div><span class="" style="white-space:pre">        </span>&lt;Handlers xmlns=&quot;urn:picketlink:identity-federation:handler:config:2.1&quot;&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;Handler</div><div><span class="" style="white-space:pre">                        </span>class=&quot;org.picketlink.identity.federation.web.handlers.saml2.SAML2LogOutHandler&quot; /&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;Handler</div><div><span class="" style="white-space:pre">                        </span>class=&quot;org.picketlink.identity.federation.web.handlers.saml2.SAML2AuthenticationHandler&quot;&gt;</div><div><span class="" style="white-space:pre">                        </span>&lt;Option Key=&quot;NAMEID_FORMAT&quot; Value=&quot;urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress&quot;/&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;/Handler&gt;</div><div><span class="" style="white-space:pre">                </span>&lt;Handler</div><div><span class="" style="white-space:pre">                        </span>class=&quot;org.picketlink.identity.federation.web.handlers.saml2.RolesGenerationHandler&quot; /&gt;</div><div><span class="" style="white-space:pre">        </span>&lt;/Handlers&gt;</div><div>&lt;/PicketLink&gt;</div></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 1, 2015 at 8:20 AM, 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">In picketlink.xml, set the NAMEID_FORMAT desired i.e.:<br>
<br>
        &lt;Handler<br>
<br>
class=&quot;org.picketlink.<u></u>identity.federation.web.<u></u>handlers.saml2.<u></u>SAML2AuthenticationHandler&quot;&gt;<br>
            &lt;Option Key=&quot;NAMEID_FORMAT&quot; Value=&quot;urn:oasis:names:tc:<u></u>SAML:2.0:nameid-format:<u></u>persistent&quot;/&gt;<br>
        &lt;/Handler&gt;<br>
<br>
<br>
urn:oasis:names:tc:SAML:2.0:<u></u>nameid-format:persistent urn:oasis:names:tc:SAML:1.1:<u></u>nameid-format:unspecified urn:oasis:names:tc:SAML:1.1:<u></u>nameid-format:emailAddress<br>
<br>
For persistent, a user attribute is generated:<br>
<br>
saml.persistent.name.id.for.&lt;<u></u>APPLICATION_NAME&gt; = random UUID<span class=""><br>
<br>
<br>
<br>
On 3/31/2015 5:06 PM, Chen Keong Yap wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hi bill,<br>
<br>
Thanks for the reply. For option 1, how can we make the random userid<br>
associated with the keycloak session?<br>
<br>
For option 2, how can we implement this?<br>
<br>
Please share your ideas. Thanks<br>
<br>
On Mar 31, 2015 10:29 PM, &quot;Bill Burke&quot; &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>
    You need to configure PL SP Filter correctly.  PL SP Filter, by default<br>
    asks for the &quot;transient&quot; nameid format which is a temporary randomly<br>
    generated userid that is not stored or associated with the Keycloak<br>
    session.  Other options include:<br>
<br>
    persistent - randomly generated, but associated with the application<br>
    email<br>
    unspecified (which Keycloak will send the username instead).<br>
<br>
<br>
<br>
    On 3/31/2015 7:42 AM, Chen Keong Yap wrote:<br>
     &gt; Hi leornardo,<br>
     &gt;<br>
     &gt; My application is running on websphere app server  and the only<br>
    way to<br>
     &gt; talk to keycloak is to use picketlink spfilter because we are not<br>
     &gt; allowed to use keycloak proxy.<br>
     &gt;<br>
     &gt; On Mar 31, 2015 7:19 PM, &quot;Leonardo Loch Zanivan&quot;<br>
     &gt; &lt;<a href="mailto:leonardo.zanivan@gmail.com" target="_blank">leonardo.zanivan@gmail.com</a> &lt;mailto:<a href="mailto:leonardo.zanivan@gmail.com" target="_blank">leonardo.zanivan@<u></u>gmail.com</a>&gt;<br></span>
    &lt;mailto:<a href="mailto:leonardo.zanivan@gmail.com" target="_blank">leonardo.zanivan@<u></u>gmail.com</a><span class=""><br>
    &lt;mailto:<a href="mailto:leonardo.zanivan@gmail.com" target="_blank">leonardo.zanivan@<u></u>gmail.com</a>&gt;&gt;&gt; wrote:<br>
     &gt;<br>
     &gt;     Chen,<br>
     &gt;<br>
     &gt;     You could set &quot;principal-attribute&quot; in the adapter config<br>
     &gt;     (keycloak.json) as &quot;preferred_username&quot;.<br>
     &gt; <a href="https://issues.jboss.org/browse/KEYCLOAK-810" target="_blank">https://issues.jboss.org/<u></u>browse/KEYCLOAK-810</a><br>
     &gt;<br>
     &gt;     On Tue, Mar 31, 2015 at 7:50 AM Chen Keong Yap<br>
     &gt;     &lt;<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.com</a> &lt;mailto:<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.<u></u>com</a>&gt;<br></span>
    &lt;mailto:<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.<u></u>com</a> &lt;mailto:<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.<u></u>com</a>&gt;&gt;&gt;<span class=""><br>
    wrote:<br>
     &gt;<br>
     &gt;         Hi,<br>
     &gt;<br>
     &gt;         I was using picketlink spfilter for testing and noticed<br>
     &gt;         sessionid is assigned to username. We don&#39;t have this<br>
    problem in<br>
     &gt;         keycloak 1.1.0 beta2 and this issue only<br>
     &gt;         appear starting from keycloak 1.1.0 final and in master<br>
    build.<br>
     &gt;         Kindly advise.<br>
     &gt;<br>
     &gt;         Source :<br>
     &gt;<br>
     &gt;         Principal userPrincipal = (Principal)<br>
     &gt;         session.getAttribute(<u></u>GeneralConstants.PRINCIPAL_ID)<u></u>;<br>
     &gt;         Welcome to the Employee Tool,<br>
    &lt;b&gt;&lt;%=userPrincipal.getName()%<u></u>&gt;&lt;/b&gt;.<br>
     &gt;<br>
     &gt;         Output :<br>
     &gt;<br>
     &gt;         Welcome to the Employee Tool,<br>
     &gt;         G-155d13b0-a69d-4721-8187-<u></u>cd1a16c90f3c.<br>
     &gt;<br>
     &gt;<br>
     &gt;         On Tue, Mar 31, 2015 at 2:33 PM, Stian Thorgersen<br>
     &gt;         &lt;<a href="mailto:stian@redhat.com" target="_blank">stian@redhat.com</a> &lt;mailto:<a href="mailto:stian@redhat.com" target="_blank">stian@redhat.com</a>&gt;<br></span><span class="">
    &lt;mailto:<a href="mailto:stian@redhat.com" target="_blank">stian@redhat.com</a> &lt;mailto:<a href="mailto:stian@redhat.com" target="_blank">stian@redhat.com</a>&gt;&gt;&gt; wrote:<br>
     &gt;<br>
     &gt;             Can you please explain what the problem is? That<br>
    issue is an<br>
     &gt;             enhancement, not a bug.<br>
     &gt;<br>
     &gt;             ----- Original Message -----<br>
     &gt;              &gt; From: &quot;Chen Keong Yap&quot; &lt;<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.com</a><br>
    &lt;mailto:<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.<u></u>com</a>&gt;<br></span><span class="">
     &gt;             &lt;mailto:<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.<u></u>com</a><br>
    &lt;mailto:<a href="mailto:chenkeong.yap@izeno.com" target="_blank">chenkeong.yap@izeno.<u></u>com</a>&gt;&gt;&gt;<br>
     &gt;              &gt; To: <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
    &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a>&gt;<br></span><span class="">
     &gt;             &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a><br>
    &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a>&gt;&gt;<br>
     &gt;              &gt; Sent: Tuesday, 31 March, 2015 8:20:26 AM<br>
     &gt;              &gt; Subject: [keycloak-user] User ID should be used as<br>
    &quot;user<br>
     &gt;             reference&quot; not       username<br>
     &gt;              &gt;<br>
     &gt;              &gt; Hi,<br>
     &gt;              &gt;<br>
     &gt;              &gt; This issue is happened again in the master build.<br>
     &gt;              &gt;<br>
     &gt;              &gt; Can advise which object is causing the issue?<br>
     &gt;              &gt;<br>
     &gt;              &gt; Reference :<br>
     &gt;              &gt;<br>
     &gt;              &gt; <a href="https://issues.jboss.org/browse/KEYCLOAK-284" target="_blank">https://issues.jboss.org/<u></u>browse/KEYCLOAK-284</a><br>
     &gt;              &gt;<br>
     &gt;              &gt;<br>
     &gt;              &gt; ______________________________<u></u>_________________<br>
     &gt;              &gt; keycloak-user mailing list<br>
     &gt;              &gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
    &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a>&gt;<br></span>
     &gt;             &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a><span class=""><br>
    &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a>&gt;&gt;<br>
     &gt;              &gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/keycloak-user</a><br>
     &gt;<br>
     &gt;<br>
     &gt;<br>
     &gt;<br>
     &gt;<br>
     &gt;<br>
     &gt;         ______________________________<u></u>___________________<br>
     &gt;         keycloak-user mailing list<br>
     &gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
    &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a>&gt;<br></span>
    &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a><span class=""><br>
    &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a>&gt;&gt;<br>
     &gt; <a href="https://lists.jboss.org/__mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/__<u></u>mailman/listinfo/keycloak-user</a><br>
     &gt;         &lt;<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/keycloak-user</a><u></u>&gt;<br>
     &gt;<br>
     &gt;<br>
     &gt;<br>
     &gt; ______________________________<u></u>_________________<br>
     &gt; keycloak-user mailing list<br></span>
     &gt; <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a>&gt;<span class=""><br>
     &gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/keycloak-user</a><br>
     &gt;<br>
<br>
    --<br>
    Bill Burke<br>
    JBoss, a division of Red Hat<br>
    <a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a><br>
    ______________________________<u></u>_________________<br>
    keycloak-user mailing list<br></span>
    <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> &lt;mailto:<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.<u></u>jboss.org</a>&gt;<br>
    <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/keycloak-user</a><br>
<br>
</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" target="_blank">http://bill.burkecentral.com</a><br>
</div></div></blockquote></div><br><br clear="all"><div> </div><div class="gmail_signature"><div dir="ltr"><div style="text-align:left"><br></div></div></div>
</div></div></div>