logoalt Hacker News

gbdubs • today at 5:14 AM • 18 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 6 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.

➕ show 3 replies
InsidiousWombat • today at 4:44 PM

Developers are absolutely terrible with APIs like this and will just go the shortest route to get their feature working.

"Don't trust developer" is absolutely the right thing to do here, because developers WILL try to trick user into getting them more access than required

Someone • today at 10:51 AM

> This is a very poorly conceived API

I see it more as a step in the right direction. They could add separate “read only” flags in the future, for example, and add an API for apps to tell this system component to ask the user to give permission for specific directories (time limited already is there, sort-of, it seems, with the option to ask the user each time, which I assume doesn’t mean “on every read or write call”)

Also, AFAIK most user applications never need this. They can have their own store for ‘their stuff’ and standard file dialogs already open up access to files user pick in them.

code_duck • today at 5:01 PM

Your first suggestion, to have the developer specify which folders it needs to access, is already how it works. Hmm... for some reason there is supposed to be a help page called "Control access to files and folders" but it is 404ing right now. Anyhow, I frequently see a newly installed application request access to the Desktop, Downloads, or Documents folders.

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.

Bengalilol • today at 11:07 AM

Letting users choose which directories any app can have access to is a great solution. For users and for devs.

Full access is a non sense.

Before, we had to Terminal it, create a user group, chmod this, chmod that, authorize dirs and sub dirs and let it go.

If I can just click dirs directly, I am happy with it (dev and user here).

Angostura • today at 2:53 PM

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

In this case, Apple has prioritised the safety of its end users, I think the page is well written and the implementation is reasonable

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.

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

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...

➕ show 2 replies
throwawaysoxjje • today at 10:03 AM

Developers having four decades of full disk access has put us in the situation we’re in today.

they can’t be trusted with it.

➕ show 1 reply
eviks • today at 11:52 AM

Given the level of allergy Apple has towards user empowerment and customization, there is no way they'll be able to do anything remotely similar to the usability you describe

everyone • today at 10:42 AM

The security theatre on mac is insane.

ramijames • today at 1:49 PM

The most annoying thing is that a lot of interesting app ideas are simply disallowed on the App Store because of Apple's closed-minded view of what is appropriate.