Closed Bug 989923 Opened 11 years ago Closed 11 years ago

[Contacts][Refactor] New app to host Contacts DataStore in test apps

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.0 fixed)

RESOLVED FIXED
1.4 S6 (25apr)
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: noemi, Assigned: arcturus)

References

Details

Attachments

(2 files)

Create a new app that will host the Contacts DataStore in test_apps
Blocks: 968098
Assignee: nobody → francisco.jordano
Attached file Pointer to PR 17906
Attachment #8400662 - Flags: review?(jmcf)
Attachment #8400662 - Flags: review?(21)
Comment on attachment 8400662 [details] [review]
Pointer to PR 17906

I have nothing against that as it seems a much nicer way to factorize a big part of the logic. I just want our security folks aware of this as IIUC this DataStore will centralize most of the contacts DataStore of other apps, and expose it as a single DataStore, maybe bypassing some prompts for apps that want to access some DataStore.

For example the Facebook contacts and the Contacts App will be exposed under a single DataStore. An application that access this DataStore will have only one security prompt that will not make clear to the user that the Facebook contacts will be accessible too.

It will be nice if the DataStore prompt that is beeing worked on in bug 942641 will let the application tweak the message displayed to the user to make that clear.
Attachment #8400662 - Flags: review?(stephouillon)
Attachment #8400662 - Flags: review?(ptheriault)
Attachment #8400662 - Flags: review?(21)
Attachment #8400662 - Flags: feedback+
Hi vivien,

the idea of this DS is not store the contact information, but pointers to the original datastores.

For example, if we have a contact merged from FB, mozContacts and Gmail, we will just have one record with 3 fields, each of then pointing to the key on its own DS:

{
  'fbds': 'key_on_fbds',
  'mozcontacts': 'id_in_mozcontacts',
  'gmds': 'key_on_gmds'
}

We are planning to offer a library to read from different DS and offer a single view, but each client will access as many DS as the information that we have for a contacts come from.

With that we want to keep isolated the information on the owner of the information and keep the user the freedom of choice.

Thanks!
Thanks for the heads up Vivien, I'll take a look now.
Hi Jose,

comments addressed, also added the missing build step.
Flags: needinfo?(jmcf)
(In reply to Francisco Jordano [:arcturus] from comment #5)
> Hi Jose,
> 
> comments addressed, also added the missing build step.

left some comments on GH

thanks!
Flags: needinfo?(jmcf)
Comments addressed.

Not really keen on calling it ContactsManager, but so far and until we need to properly using it, don't have a strong opinion against it.
Hi Francisco,

(In reply to Francisco Jordano [:arcturus] from comment #3)
> Hi vivien,
> 
> the idea of this DS is not store the contact information, but pointers to
> the original datastores.
> 
> For example, if we have a contact merged from FB, mozContacts and Gmail, we
> will just have one record with 3 fields, each of then pointing to the key on
> its own DS:
> 
> {
>   'fbds': 'key_on_fbds',
>   'mozcontacts': 'id_in_mozcontacts',
>   'gmds': 'key_on_gmds'
> }

If I install a custom application using this datastore, will I be able to "hide" the content from a specific datastore it is pointing to? 
For example, let's say there is a contact both in FB and mozContacts. I'm assuming the data exposed by each datastore can be different. Can I choose to restrict an app to access the data specifically contained in the FB datastore?
Maybe that's a question related to the way a datastore is meant to be used, I just want to make sure I understand correctly.
> If I install a custom application using this datastore, will I be able to
> "hide" the content from a specific datastore it is pointing to? 
> For example, let's say there is a contact both in FB and mozContacts. I'm
> assuming the data exposed by each datastore can be different. Can I choose
> to restrict an app to access the data specifically contained in the FB
> datastore?
> Maybe that's a question related to the way a datastore is meant to be used,
> I just want to make sure I understand correctly.

Hi Stephanie,

So far datastore is just for certified apps, but we know that is moving to privilege (and we hope it moves soon).

Here is the meta bug for datastore security ux proposal:
https://bugzilla.mozilla.org/show_bug.cgi?id=945797

We will relay on Datastore access (granted or not by the user), this datastore will have something like:

key: 'user_x'
value: ['fb_ds_key_x', 'mozcontacts_ds_key_x']

Then each app needs to query the datastore owner. For doing this a bit simplier we are planning as well work on bug 989927, that will provide a helper library to merge contact, but again this is executed in each app context, so the user will need to grant access to the different DS a contact is mixed from.
Comment on attachment 8400662 [details] [review]
Pointer to PR 17906

thanks Francisco.

There are other pending reviews thus I guess we cannot land it yet, can we?
Attachment #8400662 - Flags: review?(jmcf) → review+
Comment on attachment 8400662 [details] [review]
Pointer to PR 17906

Thanks for the details Francisco.
Attachment #8400662 - Flags: review?(stephouillon) → review+
Just landed this since I got Stéphanie r+, Paul feel free to back out if you see something you dont like,

Landed in commit:

https://github.com/arcturus/gaia/commit/4552b1b8e974e3ce2d47e894100a14fecd737a00
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S6 (25apr)
Reverting since I found a problem with the new dev_apps directory, previous commit included the new config but not the app! (stupid me)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached file New pr updated
Carring over the reviews.

Will merge once travis is green
Now landed correctly:

https://github.com/mozilla-b2g/gaia/commit/73b5d6a8773aa048054119bf5b3ca0d005b5494e
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: