<div dir="ltr">Hey Evan,<div><br></div><div>a few responses inline.</div><div class="gmail_extra"><br><div class="gmail_quote">On 15 September 2017 at 20:06, Evan Shortiss <span dir="ltr"><<a href="mailto:eshortis@redhat.com" target="_blank">eshortis@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Excellent demo - mad bonus points for the Rick reference!<div><br></div><div>Some quick questions if you don't mind?</div><div><ol><li>The UI popup about write access being denied. Is there some underlying code like <i>sdk.service('fh-sync').<wbr>userHasRole('sync_write')</i> that we didn't see for this?</li></ol></div></div></blockquote><div>Looks like guard rules are defined here <a href="https://github.com/aidenkeating/cordova-sync-app/blob/master/src/config/viewGuardRules.ts">https://github.com/aidenkeating/cordova-sync-app/blob/master/src/config/viewGuardRules.ts</a></div><div><br></div><div>and those rules are checked on a few of the pages</div><div><a href="https://github.com/aidenkeating/cordova-sync-app/blob/master/src/pages/account/account.ts#L68-L73">https://github.com/aidenkeating/cordova-sync-app/blob/master/src/pages/account/account.ts#L68-L73</a><br></div><div><a href="https://github.com/aidenkeating/cordova-sync-app/blob/master/src/pages/home/home.ts#L63-L68">https://github.com/aidenkeating/cordova-sync-app/blob/master/src/pages/home/home.ts#L63-L68</a><br></div><div> <a href="https://github.com/aidenkeating/cordova-sync-app/blob/master/src/pages/record/record.ts#L45-L50">https://github.com/aidenkeating/cordova-sync-app/blob/master/src/pages/record/record.ts#L45-L50</a></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><ol><li>When you mentioned sync write the request is denied if the call is made directly to the sync API. Does this mean the sync server receives the request, checks for a token, then processes it? Or, is the request stopped before it reaches the sync server? It appears to be the former, but just clarifying.</li></ol></div></div></blockquote><div>There are 2 places I've found here in fh-sync-server where it protects all endpoints with middleware to check the role against the access token</div><div>and check permissions for processing of pending updates</div><div><a href="https://github.com/feedhenry/fh-sync-server/blob/master/app.js#L111-L152">https://github.com/feedhenry/fh-sync-server/blob/master/app.js#L111-L152</a><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><ol><li>Do we provide a mobile-esque wrapper for the Keycloak SDK or just recommend using the standard keycloak libs?</li></ol></div></div></blockquote><div>Looks like there's a lightweight wrapper for the Cordova example.</div><div><a href="https://github.com/aidenkeating/cordova-sync-app/blob/master/src/services/keycloak.service.ts">https://github.com/aidenkeating/cordova-sync-app/blob/master/src/services/keycloak.service.ts</a><br></div><div><br></div><div>The server uses the keycloak-connect module.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div><div><br></div></div></div><div class="gmail_extra"><div><div class="gmail-h5"><br><div class="gmail_quote">On Fri, Sep 15, 2017 at 6:27 AM, Pavel Sturc <span dir="ltr"><<a href="mailto:psturc@redhat.com" target="_blank">psturc@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">This is really great and funny demo, thanks for that Aiden!</div><div class="gmail_extra"><div><div class="gmail-m_3235109376023365426h5"><br><div class="gmail_quote">On Fri, Sep 15, 2017 at 2:29 PM, John Frizelle <span dir="ltr"><<a href="mailto:jfrizell@redhat.com" target="_blank">jfrizell@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Really excellent demo Aiden :-)<div><br></div><div>This is really starting to come together nicely.</div><div><br></div><div>Can you add a link to the client app source code to the You Tube description?</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail-m_3235109376023365426m_-5299367730243736332m_7185541201379449562gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><font color="#999999">--</font></div><div><div style="font-size:small"><font color="#999999">John Frizelle</font></div><div style="font-size:small"><font color="#999999">Chief Architect, Red Hat Mobile<br></font><span style="font-family:Helvetica,Verdana,sans-serif"><font color="#999999">Consulting Engineer</font></span><font color="#999999"><br><br></font><div><span style="font-size:12.8px;color:rgb(153,153,153)">mobile:</span><span style="font-size:12.8px;color:rgb(153,153,153)"> </span><span style="font-size:12.8px;color:rgb(153,153,153)"><font face="Tahoma, Arial, Helvetica, sans-serif"><b><a href="tel://+353872901644" target="_blank">+353 87 290 1644</a></b></font></span><br></div><div style="font-size:12.8px"><span style="font-family:Tahoma,Arial,Helvetica,sans-serif;color:rgb(153,153,153);font-size:12.8px">twitter:</span><b style="font-family:Tahoma,Arial,Helvetica,sans-serif;color:rgb(153,153,153);font-size:12.8px"> @johnfriz</b><br></div><font color="#999999" style="font-size:12.8px"></font><div><font color="#999999">skype: <font face="Tahoma, Arial, Helvetica, sans-serif"><b>john_frizelle</b></font></font></div><div><span style="color:rgb(153,153,153);font-size:12.8px">mail: </span><font color="#999999" style="color:rgb(17,85,204);font-size:12.8px"><b><a href="mailto:jfrizell@redhat.com" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">jfrizell@redhat.com</a></b></font></div><div><font color="#999999" style="color:rgb(17,85,204);font-size:12.8px"><br></font></div><div><br></div><div><img src="cid:1deff70600823b9ebf187fa9e94df6ff10966d4e@zimbra"><font color="#999999" style="color:rgb(17,85,204);font-size:12.8px"><br></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_3235109376023365426m_-5299367730243736332h5">
<br><div class="gmail_quote">On 15 September 2017 at 10:42, Aiden Keating <span dir="ltr"><<a href="mailto:akeating@redhat.com" target="_blank">akeating@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hey everyone,<div><br></div><div>We've recorded a demo about the work we've been doing recently on the Mobile Control Panel (MCP). The main focus of the demo is service integrations, namely integrating keycloak with a sync server in order to protect the server. Along with this we also show how to integrate an app with an external service. You can view the demo here:</div><div><br></div><div><a href="https://www.youtube.com/watch?v=Vekxyn4_-xY&feature=youtu.be" target="_blank">https://www.youtube.com/watch?<wbr>v=Vekxyn4_-xY&feature=youtu.be</a><br></div><div><br></div><div>A few afterthoughts.</div><div><br></div><div>Both the server [1] and client [2] that were used in the demo will pick up on changes in available services.</div><div><br></div><div>For example, when Keycloak is integrated with the sync server a file is created on the server by the MCP. The server checks whether this file exists and will configure Keycloak based on the files contents. If the file does not exist the server will not use Keycloak. This is why the server code did not need to be changed when the Keycloak integration was made. Same with the client.</div><div><br></div><div>There's also a bit more to the integrations screen than we can see in the video. Once an integration is made, for example integrating sync with keycloak, the Mobile Integrations tab for sync will update to tell us how to integrate sync and keycloak together.</div><div><br></div><div>I've included screenshots to show how this tab looks for the sync server before the Keycloak integration [3] and after [4]. The code snippets in this tab will soon be updated to reflect a real example.</div><div><br></div><div>[1] <a href="https://github.com/aidenkeating/cordova-sync-app" target="_blank">https://github.com/aidenke<wbr>ating/cordova-sync-app</a></div><div>[2] <a href="https://github.com/feedhenry/fh-sync-server" target="_blank">https://github.com/feedhen<wbr>ry/fh-sync-server</a></div><div>[3] <a href="https://drive.google.com/open?id=0B4ybL3AxKNXxc3JveVNvRk1fZWc" target="_blank">https://drive.google.com/o<wbr>pen?id=0B4ybL3AxKNXxc3JveVNvRk<wbr>1fZWc</a></div><div>[4] <a href="https://drive.google.com/open?id=0B4ybL3AxKNXxVlVOVzlOdERfcFk" target="_blank">https://drive.google.com/o<wbr>pen?id=0B4ybL3AxKNXxVlVOVzlOdE<wbr>RfcFk</a></div><div><br></div><div>Thanks,</div><div>Aiden</div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="gmail-m_3235109376023365426HOEnZb"><font color="#888888">-- <br><div class="gmail-m_3235109376023365426m_-5299367730243736332gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase"><span>PAVEL</span> <span>STURC</span></p><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:10px;margin:0px 0px 4px;text-transform:uppercase"><span>QUALITY ENGINEER</span></p><p style="font-family:overpass,sans-serif;margin:0px;font-size:10px;color:rgb(153,153,153)"><a href="https://www.redhat.com/en/technologies/mobile/application-platform" style="color:rgb(0,136,206);margin:0px;text-decoration:none" target="_blank">Red Hat <span>Mobile Application Platform</span></a></p><p style="font-family:overpass,sans-serif;margin:0px 0px 6px;font-size:10px;color:rgb(153,153,153)"><span style="margin:0px;padding:0px"><a href="mailto:psturc@redhat.com" style="color:rgb(0,136,206);margin:0px;text-decoration:none" target="_blank">psturc@redhat.com</a>   </span></p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"><img src="https://www.redhat.com/files/brand/email/sig-redhat.png" width="90" height="auto"></a></td></tr></tbody></table></div></div></div></div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="gmail-HOEnZb"><font color="#888888">-- <br><div class="gmail-m_3235109376023365426gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="color:rgb(80,0,80);font-size:12.8px"><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase">EVAN SHORTISS</p><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:10px;margin:0px 0px 4px;text-transform:uppercase">MOBILE PRACTICE ARCHITECT, RED HAT MOBILE</p><span style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"></span><span style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><p style="font-size:10px;margin:0px;color:rgb(153,153,153)">Los Angeles, USA</p></span><span style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"></span><p style="font-family:overpass,sans-serif;margin:0px 0px 6px;font-size:10px;color:rgb(153,153,153)"><span style="margin:0px;padding:0px"><a href="mailto:evan.shortiss@redhat.com" style="color:rgb(0,136,206);margin:0px;text-decoration:none" target="_blank">evan.shortiss@redhat.com</a> </span> M: <a href="tel:+1-781-354-2834" style="color:rgb(0,136,206);font-size:11px;margin:0px" target="_blank">+<wbr>1-781-354-2834</a>    </p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody><tr><td width="100px"><a href="https://red.ht/sig" style="color:rgb(17,85,204)" target="_blank"><img src="https://www.redhat.com/profiles/rh/themes/redhatdotcom/img/logo-red-hat-black.png" width="90" height="auto"></a><br></td></tr></tbody></table></div><div><div style="font-size:12.8px"></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">David Martin<div>Red Hat Mobile</div><div>Twitter: <span style="font-size:12.8px">@irldavem</span></div><div><span style="font-size:12.8px">IRC: @irldavem (feedhenry, mobile-internal)</span></div></div></div></div></div>
</div></div>