<div dir="ltr"><div class="gmail_default" style="color:#660000">A better way to keep the complexity of the QR code down would be to encode only a single-use HTTPS URL, which then returns a json blob with all of the needed parameters.  For security reasons, you don't want the password in any plaintext format.  And to protect the URL, it can only be obtained once, after which is is invalidated.  If a new URL is needed because the first attempt didn't work, force the backend to regenerate a new password so that the old one (which might have gotten leaked) is invalid.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 11:14 AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<div><div class="h5"><br>
<br>
On 07/07/16 19:37, Daniel Pocock wrote:<br>
><br>
> Hi all,<br>
><br>
> One of the GSoC students, Pranav[1], has had a focus on Java, Android<br>
> and account provisioning<br>
><br>
> He has already done some work on a library[2] to allow mobile apps to<br>
> quickly deploy accounts from any ITSP<br>
><br>
> One of the next things under discussion is how to make mobile app SIP<br>
> account provisioning with QR codes.<br>
><br>
> Every vendor of deskphones has their own provisioning system, they are<br>
> all quite different.  Some are quite effective, e.g. the way Polycom<br>
> puts certificates in every phone to avoid the risk of exposing<br>
> credentials during provisioning or subsequent updates.<br>
><br>
> Pranav can potentially create:<br>
><br>
> a) a JAR for inclusion in apps like Lumicall and CSipSimple,<br>
> Conversations (XMPP) and Jitsi (on both mobile and desktop)<br>
><br>
> b) a REST service running in Apache Tomcat that interacts with the<br>
> client JAR<br>
><br>
> The question is, how should the workflow be structured?<br>
><br>
> Has anybody seen anything like this already, either for SIP, XMPP or<br>
> other protocols like email accounts?<br>
><br>
> What should be in the QR-code, for example, should it just contain a URL<br>
> or parameters for generating a certificate request?<br>
><br>
> Once the app starts talking to the URL, what data should be exchanged?<br>
><br>
> Does the phone need to prompt the user for any data, e.g.a PIN, or can<br>
> it all be automatic?<br>
><br>
> Once the account is initially set up, how will changes to the settings<br>
> be deployed?  Should the phone periodically poll the REST server and<br>
> accept any changes automatically, or should there be a workflow for the<br>
> user to confirm any changes?<br>
><br>
> I'm thinking that this facility could work for both per-account settings<br>
> and maybe per-phone settings, but in the latter case we need to make<br>
> sure it can deal with conflicts and let the user override anything.<br>
><br>
> Regards,<br>
><br>
> Daniel<br>
><br>
><br>
> 1. <a href="https://wiki.debian.org/SummerOfCode2016/StudentApplications/PranavJain" rel="noreferrer" target="_blank">https://wiki.debian.org/SummerOfCode2016/StudentApplications/PranavJain</a><br>
> 2. <a href="https://github.com/pranavjain/AndroidSIPEnroller" rel="noreferrer" target="_blank">https://github.com/pranavjain/AndroidSIPEnroller</a><br>
</div></div>from the past experience, the providers that build their softphone go<br>
for a https/rest provisioning system, with attributes embedded in the<br>
app. Sometimes, even they push the client certificate signed by their CA.<br>
<br>
For generic sip phone apps, I think zoiper (free version, but not open<br>
source, though) has a qrcode provisioning feature, but never got to try<br>
it myself.<br>
<br>
The thing is that qrcode cannot store lots of info and there are tons of<br>
setting options for each of those sip/xmpp/etc. apps.<br>
<br>
So I think the qrcode reader app for provisioning the phone should<br>
consider dealing with data providing:<br>
<br>
accountid=uniquevalue<br>
option1=value1<br>
...<br>
optionN=valueN<br>
<br>
Where only 'accountid' is a reserved key and needs to be in all qrcodes.<br>
Then there can be only one or many options.<br>
<br>
The provider can have many qrcodes next to their provisioning<br>
instructions on a web page (e.g., to set domain, outbound proxy, ...).<br>
<br>
Introducing all options by hand can be a real pain for mobile devices.<br>
For <a href="http://openrcs.com" rel="noreferrer" target="_blank">openrcs.com</a> (free pure sip service running kamailio), the decision<br>
was to generate the sip passwords by the server and display them (only<br>
on demand and each time generating a new one, when asked to show the<br>
password) via the web portal, in the user account page. Later I added<br>
the display of a qrcode containing the password, just for reading it<br>
with a generic qr code app, to copy&paste in the sip app.<br>
<br>
Getting to stage where many mobile apps will be able to provision<br>
themselves from a well nown qrcode data format would be indeed useful!<br>
<br>
Cheers,<br>
Daniel<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Daniel-Constantin Mierla<br>
<a href="http://www.asipto.com" rel="noreferrer" target="_blank">http://www.asipto.com</a> - <a href="http://www.kamailio.org" rel="noreferrer" target="_blank">http://www.kamailio.org</a><br>
<a href="http://twitter.com/#!/miconda" rel="noreferrer" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">http://www.linkedin.com/in/miconda</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Free-RTC mailing list<br>
<a href="mailto:Free-RTC@lists.fsfe.org">Free-RTC@lists.fsfe.org</a><br>
<a href="https://lists.fsfe.org/mailman/listinfo/free-rtc" rel="noreferrer" target="_blank">https://lists.fsfe.org/mailman/listinfo/free-rtc</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><img alt="Digium logo" src="https://my.digium.com/images/graphics/digium_RGB_signature.gif" width="288" height="50" style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px"><div>Scott Griepentrog<br>Digium, Inc · Software Developer<br>445 Jan Davis Drive NW · Huntsville, AL 35806 · US<br>direct/fax: +1 256 428 6239 · mobile: +1 256 580 6090<br>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> · <a href="http://asterisk.org" target="_blank">http://asterisk.org</a><br></div></div></div>
</div>