logoalt Hacker News

gbdubs • today at 5:14 AM • 9 replies • view on HN

This is a very poorly conceived API. If developers' use cases don't fit cleanly into Apple's (narrow) idea about how a hypothetical app should work, developers will continue to feel like they need to request these expansive permissions. A good filesystem permission API could include any of these which would make users WAY safer and enable developers to request far smaller scopes:

- Allow the developer to specify the common location(s) that they need access to. Rather than having to have the user select the folder they want to grant access to, have the developer say "this app uses data in these 5 folders, do you want to grant that access" - so much clearer, and useful in cases where an app has to integrate with other apps through the filesystem. - Readonly access. Allow an app to read your files but prevent writes or deletes. - Time limited access. Allow some kind of access and allow the user to auto-expire it rather than having to remember it exists. - Allow for negative access (i.e. allow labels or tags on directories to mark them as sensitive and prevent access by default - browsers could do this for their cookie stores, `~/.ssh` could ship with it as a default, etc.)

Apple could have used this opportunity to think through the question of "why do developers ask for filesystem access, and how can we allow legitimate usage through well scoped access controls", but instead they built a bad API that will (I would guess) not actually allow developers to be more judicious or achieve any of the user-safety benefits.

Apple needs to learn to talk to (and listen to) developers.


Replies

geocar • today at 5:55 AM

> This is a very poorly conceived API.

However users are very happy with it.

> developers will continue to feel like they need to request these expansive permissions

And users will continue to seek alternatives, or risk denying said permission.

I don't use any apps that require this permission, and would never use any app that required this permission without an extremely good explanation of why it was needed.

Until that happens, no.

> Allow the developer to specify the common location(s) that they need access to.

Why not just back up: How does the developer know the location. What's common about it?

I'm so not sure they need access to anything yet.

I use Spotify, Slack, Zoom, and WhatsApp: All of them have asked for it, but they all seem to work fine if I deny them access to full-disk access. So I am confident your issue is a non-issue for me and millions of people like me.

I don't have any apps that need this, so I do not want you to blow past this so quickly with the prior that just because you are a developer who has a use case that requires this, it is still my computer and you don't get any time on it while you're asking for this.

> Readonly access. Allow an app to read your files but prevent writes or deletes

Again: Absolutely not. There are no files I want your app to have access to without an explanation.

> Allow for negative access (i.e. allow labels or tags on directories to mark them as sensitive and prevent access by default - browsers could do this for their cookie stores, `~/.ssh` could ship with it as a default, etc.)

I know Linux works this way, and it only ever works for stuff that the integrator ships (i.e. on Red Hat, they are called seLinux labels), so it's not something that independent publishers have ever done, and to my knowledge, despite it being so easy, not one independent developer has ever used them in the way you say, despite such a thing being possible for more than 25 years.

> Apple needs to learn to talk to (and listen to) developers.

That sounds like your opinion. I think developers need to explain better what they actually want and why.

You have what you ask for on other platforms, so I think if your ideas were so right you would have simply ignored Apple, so I think Apple doesn't need to do shit for you, and you have some explaining to do.

➕ show 2 replies
simondotau • today at 5:20 AM

Developers are important, but Apple understands that it must ultimately prioritise non-technical end users as their highest priority. Apple's approach puts control in users' hands rather than allowing developers to define the scope of access. Moving from Full Disk Access to user-selected folders is a significant security improvement, even if the API doesn't accommodate every developer use case.

It's also critical to recognise that data exfiltration is just as serious a risk as data manipulation. Read-only access doesn't prevent data theft, and time-limited access can't undo it.

➕ show 1 reply
comex • today at 5:34 AM

Apple tried the first thing first. That was App Sandbox, and you can grant access to specific folders through the open dialog (or better yet, use the open/save dialog to access individual files so that no broad permissions are needed at all). But nobody adopted App Sandbox unless forced to.

Negative access is what came next, applied to all apps. By default, an unsandboxed program can access everything except specific protected directories, and can request access to those directories too, e.g. Documents, Desktop, Photos, other apps' data.

Full Disk Access is the last resort that turns all of that off. Or, well, was.

It's also the only way to access Messages, which might be why certain AI apps request it.

Jean-Papoulos • today at 8:39 AM

Apple cares about customers, not developpers. Rightly so.

In an perfect world such an API would be great. We don't live there unfortunately

geraneum • today at 8:42 AM

> Rather than having to have the user select the folder they want to grant access to

To the end user a list of directories like ~/Library/Support… is meaningless. This is a misguided approach.

noduerme • today at 5:42 AM

I disagree, because I think the default should be no access, then manually checking those folders and whether there may be something in them that you don't want the app to access. How many git repos contain secrets, that you may want to exclude? If you get a popup saying an app wants access to an entire branch of your filesystem, it shouldn't be easy to approve that with a single click, without granularly checking what's in there beforehand.

Many apps already work this way and request access to a single directory, and the best apps (little snitch, arq) give you fine control over what is accessible for what actions.

techpression • today at 7:36 AM

As a developer, developers have gotten lazy and shouldn’t be who you listen to primarily these days. Ask any of the harness companies if they’d prefer full access to everything by default and they’d say yes, which is a massive red flag in itself. Apple clearly understands we’re currently in a very bad place and need to enable safer operations for the majority. Moving forward I think we’re going to have to rethink the entire concept of file systems as a static thing and abstract it away into something completely virtual when running software.

duskwuff • today at 5:44 AM

> Allow for negative access (i.e. allow labels or tags on directories to mark them as sensitive and prevent access by default

Apple has already taken some (manual) steps in this direction - certain directories under ~/Library/Application Support are inaccessible to other applications without "full disk access". In particular, web browsers and Discord have this protection applied - this is to thwart some common types of session-stealing malware.

https://wojciechregula.blog/post/golden-gate-appdata-protect...