<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 2, 2013 at 11:48 AM, Bruno Oliveira <span dir="ltr">&lt;<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Good morning everyone, I&#39;m planning to include JWS (to add digital<br>
signatures per mobile application)/JWT (to issue a token at each<br>
transaction or session) support on AeroGear and I was looking at OAuth2<br>
bearer token (which make use of JWT/JWS behind the scenes)<br>
implementation from RESTEasy.<br>
<br>
I was reading about how to properly include it and now we have a<br>
decision to make (we because it will affect the way the client side and<br>
security is not an island :). RESTEasy bearer tokens is completely tied<br>
to JBoss<br>
(<a href="http://docs.jboss.org/resteasy/docs/3.0.1.Final/userguide/html/oauth2.html#d4e1446" target="_blank">http://docs.jboss.org/resteasy/docs/3.0.1.Final/userguide/html/oauth2.html#d4e1446</a>)<br>
and I&#39;m not saying it is a bad thing, but with vert.x, TorqueBox,<br>
Nodej...I&#39;m not sure if it&#39;s a good idea.<br></blockquote><div><br></div><div style>Well, one of the thing for the Clients libs is that we want to stay backend agnostic, so yea ... not really a good idea </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
An example of Bearer Token usage extracted from RFC<br>
(<a href="http://tools.ietf.org/html/rfc6750" target="_blank">http://tools.ietf.org/html/rfc6750</a>)<br>
<br>
      HTTP/1.1 200 OK<br>
      Content-Type: application/json;charset=UTF-8<br>
      Cache-Control: no-store<br>
      Pragma: no-cache<br>
<br>
      {<br>
        &quot;access_token&quot;:&quot;mF_9.B5f-4.1JqM&quot;,<br>
        &quot;token_type&quot;:&quot;Bearer&quot;,<br>
        &quot;expires_in&quot;:3600,<br>
        &quot;refresh_token&quot;:&quot;tGzv3JOkF0XG5Qx2TlKWIA&quot;<br>
      }<br>
<br>
Pros: RESTEasy team already did it<br>
Cons: The configuration setup might be hard to newcomers (please look at<br>
the documentation<br>
<a href="http://docs.jboss.org/resteasy/docs/3.0.1.Final/userguide/html/oauth2.html#d4e1446" target="_blank">http://docs.jboss.org/resteasy/docs/3.0.1.Final/userguide/html/oauth2.html#d4e1446</a>),<br>
we will be tied to JBoss.<br></blockquote><div><br></div><div style>See my previous comment </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So, do we have an alternative? Yes. Make use of JWT module only from<br>
RESTEasy and we still can benefit of digital signatures and tokens.<br>
<br>
An example of JWT usage extracted from RFC<br>
(<a href="http://tools.ietf.org/html/draft-jones-json-web-token-10#page-6" target="_blank">http://tools.ietf.org/html/draft-jones-json-web-token-10#page-6</a>)<br>
<br>
{<br>
     &quot;iss&quot;:&quot;joe&quot;,<br>
     &quot;exp&quot;:1300819380,<br>
     &quot;<a href="http://example.com/is_root" target="_blank">http://example.com/is_root</a>&quot;:true<br>
}<br>
<br>
Pros: Flexibility, we have people already doing it<br>
(<a href="https://wiki.mozilla.org/WebAPI/WebPayment" target="_blank">https://wiki.mozilla.org/WebAPI/WebPayment</a>). We will make use of<br>
RESTEasy module and do not reinvent the wheel.<br>
<br>
Cons: The authorization model must be implemented and adapted to our needs<br>
<br></blockquote><div>+1</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So what do you think?<br>
<br>
ps: SAML is not an option for me now.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
abstractj<br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</font></span></blockquote></div><br></div></div>