233 karma · joined June 9, 2015
Zanzibar is a global highly available distributed permissions system used within Google to power application permissions for things like Maps, YouTube, Calendar, Doc/Drive, etc. They wrote about it in a paper[0] that was widely discussed on HN at the time[1].
The service stores relationships between people, other people, and data, in a giant directed graph. There are primitives for querying and processing that graph to make permissions decisions. The majority of the rest of the engineering effort is spent on replicating the data globally and caching permissions decisions regionally and locally, since permissions don't lend themselves very well to sharding or siloing along service boundaries.
For the 5+ explanation, I wrote a little bit about my digestion of the paper and what the important parts are here[2].
[0] https://research.google/pubs/pub48190/
We’re the core team behind Red Hat’s (nee-CoreOS, nee-Quay) Quay[1] image registry, and while building out that product as well as a number of others at CoreOS and Red Hat, we continually ran into challenges with authorization systems that were either inflexible, slow, or wouldn’t scale. We have actually had to cancel features in the past due the limitations in the permissions system.
That’s why we set out to build Authzed.com[2], a hosted, managed permissions platform to put an end to this madness! SpiceDB, the fundamental permissions database and access computation platform, is the central component of that platform. Today, we’re making it available under the permissive Apache 2 license for you to integrate with your own projects! We’re already using SpiceDB to power Authzed.com, but are still looking for feedback about our APIs and service.
As of today, the software already has: Expressive APIs[3] for checking permissions, listing access[4], and powering devtools An architecture faithful to Google's Zanzibar paper[5], including resistance to the New Enemy Problem[6] An intuitive and expressive schema language[7] complete with a playground[8] dev environment A powerful graph engine that supports distributed, parallel evaluation Pluggable storage that supports in-memory, PostgreSQL, and CockroachDB Deep observability with Prometheus metrics, structured logging, and distributed tracing
We will be hanging out in the comments section today, so please leave your feedback, criticisms, or just say hi!
[0]: https://research.google/pubs/pub48190/
[1]: https://www.projectquay.io/
[2]: https://authzed.com/
[3]: https://buf.build/authzed/api
[4]: https://docs.authzed.com/concepts/authz#what-is-acl-filterin...
[5]: https://authzed.com/blog/what-is-zanzibar/
[6]: https://authzed.com/blog/new-enemies/
Except that they charge you for all of the depreciation plus a rental fee. The dealer/manufacturer ends up with an asset that is more valuable than the price they paid for it less the money they've received for it through the terms of the lease.
In the other scenario there is no air in the space station, and as far as I can imagine, the only way to have gotten there with zero velocity would be for someone or something to place you there. Then presumably you could ask that same someone or something for help getting back.
There are some nightmare scenarios involving malevolent robots or rooms so large and velocities so slow that you would die before you made it to the other side that are pretty terrifying to consider.
As far as the differences due to cockroach vs spanner. There are only a few minor ones. Without TrueTime cockroachdb relies on their hybrid logical clocks[2] which at the very least require more storage. The Zanzibar paper talks about separating tuples into separate databases by namespace, and shards [3§3.1.1]. We haven't had to do that yet, but we are far from operating at Google's scale. Finally, cockroachdb's CHANGEFEED API[4] combined with our single tuple table have allowed us to skip storing a separate changelog table (for now).
[1]: https://authzed.com/blog/what-is-zanzibar/
[2]: https://www.cockroachlabs.com/blog/living-without-atomic-clo...
[3]: https://research.google/pubs/pub48190/
[4]: https://www.cockroachlabs.com/docs/v20.2/changefeed-for.html
Full disclosure: I am a co-founder of a company building and hosting a Zanzibar implementation as a service: https://authzed.com
Because we layer in access at the authentication provider layer, we don't really have any impact on the downstream application. It's possible we could do some smart things with oauth scopes in the future!
For the former, I can see that it might be important and informative to show how the various roles and their relationships relate to access, and we should write a blog post soon explaining how we interact with the platform to create ShareWith!
For the latter, we plan to open up the platform to developers as quickly as we can, so stay tuned!
It's likely that Spencer would have something different to say about the matter today.