<div dir="ltr"><div>On Command:<br>curl -H &#39;Accept: application/json&#39; -i -u 162e869a-1f22-4aba-a620-d07edb906df9:110af61f265c04e728f3fc9951afda8c <a href="http://192.168.1.11:8080/hawkular/accounts/personas/current">http://192.168.1.11:8080/hawkular/accounts/personas/current</a><br><br>Response is:<br>HTTP/1.1 403 Forbidden<br>Connection: keep-alive<br>X-Powered-By: Undertow/1<br>Server: WildFly/10<br>Content-Length: 74<br>Content-Type: text/html<br>Date: Mon, 25 Jan 2016 08:47:23 GMT<br><br>&lt;html&gt;&lt;head&gt;&lt;title&gt;Error&lt;/title&gt;&lt;/head&gt;&lt;body&gt;403 - Forbidden&lt;/body&gt;&lt;/html&gt;<br><br></div>but replacing token key and secrete with username and password showing correct results<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 23, 2016 at 9:13 PM, Heiko W.Rupp <span dir="ltr">&lt;<a href="mailto:hrupp@redhat.com" target="_blank">hrupp@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">Anuj, Mazz,<br>
<span class=""><br>
On 23 Jan 2016, at 16:19, John Mazzitelli wrote:<br>
<br>
&gt; Juca - can you take a look and tell me if its a problem in<br>
&gt; accounts/keycloak? Based on my testing I think that&#39;s where the<br>
&gt; problem lies, but I&#39;m not 100% sure.<br>
<br>
</span>Does this work (for a previously created token):<br>
<br>
curl -H &#39;Accept: application/json&#39; -i -u<br>
b3063b1f-640b-4853-81df-47257c01e63e:94edc711ef80c592cb417bfffd9bc496<br>
<a href="http://localhost:8080/hawkular/accounts/personas/current" rel="noreferrer" target="_blank">http://localhost:8080/hawkular/accounts/personas/current</a><br>
<br>
?<br>
<br>
( from<br>
<a href="http://www.hawkular.org/blog/2015/12/16/hawkular-1.0.0.Alpha8-released.html" rel="noreferrer" target="_blank">http://www.hawkular.org/blog/2015/12/16/hawkular-1.0.0.Alpha8-released.html</a><br>
)<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
&gt;<br>
&gt; Just create yourself a token and configure the agent to use it rather<br>
&gt; than username/password and you should be able replicate the problem.<br>
&gt;<br>
&gt; ----- Forwarded Message -----<br>
&gt; From: &quot;Anuj Garg&quot; &lt;<a href="mailto:anuj1708@gmail.com">anuj1708@gmail.com</a>&gt;<br>
&gt; To: &quot;John Mazzitelli&quot; &lt;<a href="mailto:mazz@redhat.com">mazz@redhat.com</a>&gt;, &quot;Discussions around Hawkular<br>
&gt; development&quot; &lt;<a href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a>&gt;<br>
&gt; Sent: Friday, January 22, 2016 10:03:12 PM<br>
&gt; Subject: Re: [Hawkular-dev] agent cannot use security token<br>
&gt;<br>
&gt; It happened to me too yesterday but i was thinking might be I am not<br>
&gt; properly using the tokens coz I am new to it.<br>
&gt; But was following the same procedure.<br>
&gt; On 23 Jan 2016 3:26 am, &quot;John Mazzitelli&quot; &lt;<a href="mailto:mazz@redhat.com">mazz@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; I just tried installing the agent to use securityKey/securitySecret<br>
&gt;&gt; rather<br>
&gt;&gt; than username/password and it failed to authenticate with the server.<br>
&gt;&gt; If I<br>
&gt;&gt; use username/password, it works fine.<br>
&gt;&gt;<br>
&gt;&gt; It isn&#39;t anything with the agent that seems to be the problem because<br>
&gt;&gt; during my testing, I attached to the agent with my debugger and right<br>
&gt;&gt; before I sent the auth message to<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://127.0.0.1:8080/hawkular/accounts/personas/current" rel="noreferrer" target="_blank">http://127.0.0.1:8080/hawkular/accounts/personas/current</a><br>
&gt;&gt;<br>
&gt;&gt; I change the value of the key/secret to &quot;jdoe&quot; and &quot;password&quot; and it<br>
&gt;&gt; works. So there is something on the server-side that doesn&#39;t like the<br>
&gt;&gt; agent<br>
&gt;&gt; passing in the token credentials.<br>
&gt;&gt;<br>
&gt;&gt; Can I ask if anyone else sees the same thing? It&#39;s easy to test:<br>
&gt;&gt;<br>
&gt;&gt; 1) in the UI, create yourself a new token<br>
&gt;&gt; 2) in standalone.xml&#39;s &lt;storage-adapter&gt; element, change the<br>
&gt;&gt; &quot;username&quot;<br>
&gt;&gt; attribute name to be called &quot;securityKey&quot; and set its value to your<br>
&gt;&gt; new<br>
&gt;&gt; token&#39;s key and change the &quot;password&quot; attribute name to be called<br>
&gt;&gt; &quot;securitySecret&quot; and set its value to your new token&#39;s secret.<br>
&gt;&gt; 3) start the agent back up again<br>
&gt;&gt;<br>
&gt;&gt; It should work, but doesn&#39;t for me. I tried it with two different<br>
&gt;&gt; token<br>
&gt;&gt; key/secret pairs, failed both times.<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; hawkular-dev mailing list<br>
&gt;&gt; <a href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/hawkular-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a><br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; hawkular-dev mailing list<br>
&gt; <a href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/hawkular-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a><br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,<br>
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn<br>
Handelsregister: Amtsgericht München HRB 153243<br>
Geschäftsführer: Charles Cachera, Michael Cunningham, Paul Hickey,<br>
Charlie Peters<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
hawkular-dev mailing list<br>
<a href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/hawkular-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a><br>
</div></div></blockquote></div><br></div></div></div>