atomicdata-dev / atomic-data-docs

Atomic Data is a specification to make it easier to exchange data.
https://docs.atomicdata.dev
MIT License
17 stars 7 forks source link

Owner / root / server level authorization rights permissions #82

Open joepio opened 2 years ago

joepio commented 2 years ago

Currenlty, I've implemented hierarchy based authorization. It works pretty well, but as an admin, I still can't see everything on the server that I manage. I'm not entirely sure whether this a good or bad thing. For now, at least, it forces me to find better solutions that don't require a brute allowAll / rootPermission setting, but I think at some point I'll want or need a very powerful root permission. There are a couple of ways this could be realized.

Also, having this check can improve performance for many requests, because checking rights is expensive!

Make it a server setting - not an Atomic Data setting

Introduce a Server resource, set a right there

We currently only have Drives. One of the drives is at the root level, which is what is shown when opening atomicdata.dev. Users can create new Drives on that same server. The server itself, though, does not have an identifier. Maybe it should? For this case (root level rights) it kind of makes sense. The drive would no longer be a top-level resource - only servers can be top-level resources. Makes sense, from a technological standpoint. Also, we could use Server resources to find endpoints (which makes more sense then drives, and is cleaner than hard-coding paths).

We could have atomicdata.dev/server, which tells the user: