Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Handling #371

Closed
3 of 5 tasks
fallaciousreasoning opened this issue May 8, 2019 · 26 comments
Closed
3 of 5 tasks

File Handling #371

fallaciousreasoning opened this issue May 8, 2019 · 26 comments
Assignees
Labels
chromium-high-priority Something that the Chromium team would like the TAG to prioritise Missing: security & privacy review Provenance: Fugu Resolution: satisfied with concerns The TAG is satisfied with this work overall but requires changes Topic: powerful APIs APIs that reach into your life. Venue: WICG

Comments

@fallaciousreasoning
Copy link

fallaciousreasoning commented May 8, 2019

Góðan dag TAG!

I'm requesting a TAG review of:

You should also know that...
The spec isn't written yet, so this is more of an opportunity to review the proposed API.

Further details (optional):

We'd prefer the TAG provide feedback as (please select one):

  • open issues in our GitHub repo for each point of feedback
  • open a single issue in our GitHub repo for the entire review
  • leave review feedback as a comment in this issue and @-notify @fallaciousreasoning @raymeskhoury
@hober hober added Progress: untriaged Missing: security & privacy review Needs spec Progress: pending external feedback The TAG is waiting on response to comments/questions asked by the TAG during the review Review type: CG early review An early review of general direction from a Community Group Topic: powerful APIs APIs that reach into your life. Venue: WICG and removed Progress: untriaged labels May 21, 2019
@hober
Copy link
Contributor

hober commented May 22, 2019

Hi,

Thanks for bringing this review to us. We're trying to require all requests for review to have considered the questions in our security & privacy questionnaire. Please let us know via a comment here when you've run through the security & privacy questionnaire and can share your findings with us.

Currently, your explainer mentions several previous attempts at addressing this use case on the web, but it doesn't consider why the previous attempts failed, nor does it say what makes this new approach more likely to succeed. For instance, registerContentHandler was dropped due to a lack of multi-implementor interest. Why not just resurrect that, since there is now apparently interest from a different vendor from last time?

@kenchris kenchris self-assigned this May 23, 2019
@alice alice self-assigned this May 23, 2019
@dbaron dbaron self-assigned this May 23, 2019
@fallaciousreasoning
Copy link
Author

Updated with a link to the security & privacy questionnaire.

@fallaciousreasoning
Copy link
Author

I’ve expanded the section on why we can’t use registerContentHandler.

See here

@fallaciousreasoning
Copy link
Author

fallaciousreasoning commented Jun 28, 2019

Hey, just wondering if you folks need anything else from us before the review?

@kenchris
Copy link

kenchris commented Sep 11, 2019

The launch event seems to happen in the service worker and be called "launch", but in the explainer you are handling this from the main document with the "load" event. So would both options be supported? and how would that work? Maybe worth adding to the explainer

Also it is probably useful to be able to deal with this in the service worker, for instance, clicking on a calendar url (webcal like) you might not actually want to open that but just show a notification that that calendar has been added.

@dbaron
Copy link
Member

dbaron commented Sep 11, 2019

I'm looking at this with @kenchris in a breakout at the TAG meeting right now.

One thought is that there seem to be a bunch of similarities between handling a file with a given MIME Type (or extension) that's already stored locally, and handling such a file that the user has downloaded from the web. That is, if your app can handle application/atom+xml off the local filesystem, it can probably handle that off of the Web too -- and maybe that should just work automatically without anything substantial needing to be done, if at that point it's the local application handling application/atom+xml. On the other hand, one thing in the past that's led to overuse of registerProtocolHandler is that there are cases where file type handlers want the URL of the resource rather than the current representation of it. In other words, many handlers for application/atom+xml probably want to be able to re-fetch the feed at arbitrary later times rather than being concerned with just the current contents of the feed. Maybe we've already settled on using the hack of registerProtocolHandler with a fake protocol for that -- but it's a pretty unpleasant hack. (That is, webcal is really just http, but the fake protocol was invented to allow certain HTTP resources to be dispatched by-URL (rather than by-representation) to an app that handled calendars.)

At the very least, it seems like perhaps the explainer should talk a little bit more about how this gets used both for already-local files and files coming from the web -- but it would also be interesting if there were a better solution for the "want the URL rather than the representation" problem.

@dbaron
Copy link
Member

dbaron commented Sep 11, 2019

Another question is that of permissions. It seems like at some point the browser probably wants to ask the user for permission as to whether they want this particular installed web application to be able to access a particular file on the native file system. At the very least, it seems like a risk if there's no permission prompt anywhere in the system -- and it it at least seems like it might be easier to explain that stuff to users at use time rather than at registration time (since it's not clear that it's easy to explain to a user what a application/foo file is). This leads me to two thoughts:

  • the dependency on the native file system API might be a barrier to adoption by other browsers -- it might be that other browsers might be interested in implementing something with this set of capabilities but nonetheless aren't willing to implement the native file system api. (I'm not at all sure about this -- just speculating without having given it a lot of thought -- although I think there's a bunch of resistence to the native file system API.)
  • it's a little concerning that there doesn't appear to be asynchronous stuff in the explainer that gives a UA that wants to prompt the user for permission to have an opportunity to do so. Perhaps that's OK because the native file system API is sufficiently asynchronous to give the UA a chance to ask for permission through its API surface -- but it would be good to see examples in the explainer that show at what points a UA might choose to ask the user for permission.

@dbaron
Copy link
Member

dbaron commented Sep 11, 2019

@kenchris also brought up the issue of what happens when multiple web applications register for the same extension and/or MIME type. It seems like many OSes have some sort of chooser model for that (which often have features such as remembering the choice). Will this be able to integrate well with such OS choosers? Or would it be problematic for the browser to register multiple web apps with different names and icons into such a chooser?

@kenchris
Copy link

kenchris commented Oct 2, 2019

@fallaciousreasoning @raymeskhoury the above is more like a discussion and thus not filed as issues on your repo. It would be great if you could have a look!

@raymeskhoury
Copy link

Sorry for the delay! Thanks for having a look and pinging! @mgiuca is actively working on this - Matt, could you take a look with @fallaciousreasoning ?

@mgiuca
Copy link

mgiuca commented Oct 7, 2019

I haven't had a chance yet. Sorry. I'll try to get to it this week and file bugs on the repo for any appropriate issues.

@dbaron
Copy link
Member

dbaron commented Dec 3, 2019

@alice and I just looked at this quickly during the Cupertino face-to-face. It looks like there's stuff happening as of the last few days, and we'd probably like to take another look at the explainer once these additions/clarifications are made. So we'll leave this as pending external feedback for now.

@chrishtr chrishtr reopened this Apr 15, 2022
@evanstade
Copy link

@chrishtr chrishtr added the chromium-high-priority Something that the Chromium team would like the TAG to prioritise label Apr 20, 2022
@torgo torgo assigned hober, cynthia and hadleybeeman and unassigned alice, dbaron and kenchris May 9, 2022
@torgo torgo modified the milestones: 2022-05-09-week, 2022-04-04-week May 9, 2022
@torgo torgo self-assigned this May 9, 2022
@torgo torgo modified the milestones: 2022-05-23-week, 2022-06-06-week Jun 4, 2022
@chrishtr chrishtr removed the Review type: CG early review An early review of general direction from a Community Group label Jun 16, 2022
@rhiaro rhiaro added Resolution: satisfied with concerns The TAG is satisfied with this work overall but requires changes and removed Progress: pending external feedback The TAG is waiting on response to comments/questions asked by the TAG during the review Progress: in progress labels Jul 26, 2022
@rhiaro
Copy link
Contributor

rhiaro commented Jul 26, 2022

We apologize for the delay in getting to this review request. We note that it has shipped in Chromium but that there are so far no other implementations. Please let us know if you expect to progress this along the recommendation track at any point, and if/when other implementer interest emerges.

While the security and privacy questionnaire has responses, there are no security and privacy considerations sections in the spec itself. The responses to the questionnaire indicate how potentially private/sensitive data may be exposed, but there is little discussion of threat models or mitigations. We see this discussed extensively in this document and it would be reassuring to see actionable considerations / tradeoffs for implementers succinctly documented in the specification itself, or at least references to other documents if that's more appropriate.

We will be happy to review further changes and additions in a new review request in future.

@rhiaro rhiaro closed this as completed Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chromium-high-priority Something that the Chromium team would like the TAG to prioritise Missing: security & privacy review Provenance: Fugu Resolution: satisfied with concerns The TAG is satisfied with this work overall but requires changes Topic: powerful APIs APIs that reach into your life. Venue: WICG
Projects
None yet
Development

No branches or pull requests