<div dir="ltr">Sounds goods ! Just one small question inline&nbsp;<div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 12:59 PM, 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 slackers, moving forward with my attempt to put pants on passphrases. I would like to discuss how the REST API would be with the change, because is better to have feedback instead of work for days and waste some time.<br>

<br>
Register push app:<br>
<br>
- HTTP request<br>
<br>
&nbsp; Remain unchanged<br>
<br>
- HTTP response<br>
<br>
{&quot;id&quot;:&quot;2095ab1a-a569-4ae2-a43c-a86b83041592&rdquo;,<br>
&quot;name&quot;:&quot;MyApp&rdquo;,<br>
&quot;description&quot;:&quot;awesome app&rdquo;,<br>
&quot;pushApplicationID&quot;:&quot;ca99487d-6387-41bd-b393-0ce480977efe&rdquo;,<br>
&quot;masterSecret&quot;:&quot;b315d524-e9f9-4d04-946c-b73278ff29be&rdquo;,<br>
&quot;developer&quot;:&quot;admin&rdquo;,<br>
&quot;androidVariants&quot;:[],<br>
&quot;simplePushVariants&quot;:[],<br>
&ldquo;chromePackagedAppVariants&quot;:[],<br>
&quot;publicKey&quot;:&quot;MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEpsPA31qRWrtiAhnpGBzgwoE435c18gD42y13urb0JSdx4AHQRthhAUFVnu+RqUU8NTp9tGnEEhyBZfbV67arVw==&ldquo;,<br>
&ldquo;nonce&rdquo;:&rdquo;6KbYGZKvTusU+IL3sdY9g==&quot;<br>
&quot;iosvariants&quot;:[]}<br>
<br>
<br>
publicKey: Is the public key created per application and will be optional for developers who do care about security. If for some reason they don&rsquo;t want to encrypt their passphrase or certificate, that&rsquo;s ok.<br>
<br>
nonce:&nbsp;16 bytes non-deterministic used to encrypt the data on the server<br>
<br>
Note: Both would be stored into UPS database (not perfect, but a good start)<br>
<br>
Keep in mind that this is just the initial idea, for example, masterSecret should never return in clear. To the further interactions it will be fixed establishing a key agreement between client and server and encrypt the whole response (only for sensitive data). Yeah, I know, we are protected by SSL, but we shouldn&rsquo;t trust on it.<br>

<br>
<br>
iOS Variant:<br>
<br>
- HTTP request<br>
<br>
&nbsp; Remain unchanged, but now certificate and passphrase can be send encrypted and the server will store it.<br></blockquote><div>Shouldn&#39;t there be a flag in the request telling the cert and passphrase are encrypted or not ? Or maybe the server can detect by itself if it&#39;s encrypted or not .</div>
<div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
- HTTP response<br>
<br>
&nbsp; Remain unchaged<br>
<br>
Sender:<br>
<br>
- HTTP request<br>
<br>
&nbsp; Remain unchanged, but now the server will search for the application ID and retrieve the public key to decrypt application&#39;s passphrase<br>
<br>
- HTTP response<br>
<br>
&nbsp; Remain unchanged<br>
<br>
<br>
AeroGear Clients<br>
<br>
- cURL<br>
<br>
Yesterday I had the amusing experience of dig into the sources of OpenSSL and their documentation, to see how people could encrypt it from the command line. If I recommend that people would remember my name for the eternity in a bad way. Another insane idea was to provide encoders for GPG. The simplest idea, I think, would be provide code for people encrypt their passphrase and certificate, instead of trust in some software.<br>

<br>
- aerogear-unifiedpush-java-client<br>
<br>
No problem to implement it.<br>
<br>
- aerogear-simplepush-java-client<br>
<br>
No problem to implement it.<br>
<br>
- aerogear-simplepush-node-client<br>
<br>
Not so easy, but they do OpenSSL behind the scenes<br>
<br>
- aerogear-unifiedpush-nodejs-client<br>
<br>
Not so easy, but they do OpenSSL behind the scenes<br>
<br>
<br>
So, what do you think? Yay/Nay? I would never use that?<br>
<br>
The goal is to provide secure alternatives to developers, but if the whole process will turn into a pain, I won&rsquo;t move forward.<br>
<br>
<br>
<br>
&nbsp;<br>
<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></blockquote></div><br></div></div>