<div dir="ltr">+1<div>I'll go for AccountManager taking a Store as an injection. Up to the developer to choose the store.</div><div>Preferred scenario is to use EncryptedStore and as explain in Encrypted Data section from offline spec, it does require password input.</div>
<div>Demo app (cookbook) could show the usage of AccountManager with encrypted storage.</div><div>Let's not defined any default. but more a recommended scenario.</div><div><br></div><div>@summerp ok for you to remove creation of memory storage within AccountManager and let the user inject its own store?</div>
<div><br></div><div>++</div><div>Corinne</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 30 May 2014 14:19, Christos Vasilakis <span dir="ltr"><<a href="mailto:cvasilak@gmail.com" target="_blank">cvasilak@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
On May 29, 2014, at 4:18 PM, Bruno Oliveira <<a href="mailto:bruno@abstractj.org">bruno@abstractj.org</a>> wrote:<br>
<br>
> On 2014-05-29, Corinne Krych wrote:<br>
>> Hello all<br>
>><br>
>> It all started in that thread [1] talking about Android OAuth2 PR, but the discussion shifted on account management and storage. I think AccountManager deserves its own thread besides it’s a cross client topic (although implicit grant for pure web app is less a use case) so title is not right. Let’s fork the discussion.<br>
>><br>
>> Main goal of AccountManager is to store all the social access tokens per account. Here is the use case:<br>
>> Some application may have to deal with several OAuth2 providers. For example in ios-cookbook, we have Shoot app which let you upload your photos to Google Drive(should change that to Google+ eventually), Facebook (and soon Instagram). When a user open Shoot for the first time and want to share to facebook, he will be prompted for OAuth2 grant, same thing for Google grant. The second photo will not trigger any grant as we’ve got the tokens. But if a user close the app and reopen it, we need something to store them if we don’t want to prompt again => AccountManager.<br>
>><br>
>> Encrypted or not encrypted?<br>
><br>
> Encrypted, always.<br>
><br>
>> Obviously access token and even more refresh token are sensitive data. Should we store them encrypted or in a secure storage like KeyChain or KeyStore? If we go that path a password is required to encrypt or access keychain, so we need an extra prompt for the user to enter password. For example, we can chage Shoot to require a password at first login to ancrypt/decrypt access token.<br>
><br>
> I think here is where offline specification comes in to place<br>
> (<a href="https://github.com/aerogear/aerogear.org/blob/master/docs/specs/aerogear-security-offline/index.md" target="_blank">https://github.com/aerogear/aerogear.org/blob/master/docs/specs/aerogear-security-offline/index.md</a>). We already discussed the workflow of how to protect sensitive offline data, but if it's missing something, feel free to include. Into this way we can avoid overlappings.<br>
><br>
>> I would leave this decision to the end-use rdeveloper of the app. I would go for a configurable AccountManager, being able to take a store as demo here [2].<br>
>><br>
><br>
> I think it must be encrypted by default and let them disable if<br>
> necessary.<br>
<br>
</div>if not mistaken, the idea is the AccountManager to create a default encrypted store and use that for storing the tokens. If the user for some reason wants to go without an encrypted one, we can have the interface of the AccountManager accept also an instance of an arbitaty Store<?> and utilise this after in.<br>
<br>
am i correct no?<br>
<br>
-<br>
Christos<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
><br>
>> For now proposed API:<br>
>> As explained here [3], use same method signature authz: like for AGAuthorizer. But when use on AccountManager it will create a authzModule and add an account to store tokens.<br>
>><br>
>> What’s next?<br>
>> We need to be able to revoke tokens and remove account from account manager.<br>
>><br>
>> Thoughts?<br>
>> @summers : as you’re the guy behind Account Manager, if you can have a look to iOS PR [2] [3] I would love to hear about your thoughts<br>
>><br>
>> ++<br>
>> Corinne<br>
>> [1] <a href="http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-Android-OAuth2-PR-td7576.html" target="_blank">http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-Android-OAuth2-PR-td7576.html</a><br>
>> [2] <a href="https://github.com/corinnekrych/aerogear-ios-cookbook-1/blob/AGIOS-190.account/Shoot/Shoot/AGShootViewController.m#L45" target="_blank">https://github.com/corinnekrych/aerogear-ios-cookbook-1/blob/AGIOS-190.account/Shoot/Shoot/AGShootViewController.m#L45</a><br>
>> [3] <a href="https://github.com/corinnekrych/aerogear-ios-cookbook-1/blob/AGIOS-190.account/Shoot/Shoot.md#aerogear-account-manager" target="_blank">https://github.com/corinnekrych/aerogear-ios-cookbook-1/blob/AGIOS-190.account/Shoot/Shoot.md#aerogear-account-manager</a><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>
><br>
><br>
> --<br>
><br>
> abstractj<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>
<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>
</div></div></blockquote></div><br></div>