update readme

This commit is contained in:
Paul Zinselmeyer 2023-12-08 16:26:21 +01:00
parent bbf933a68b
commit badeefad47
Signed by: pfzetto
GPG key ID: 4EEF46A5B276E648

View file

@ -1,21 +1,21 @@
This library implements a in-memory relationship-based access control dababase, that was inspired by [Google's Zanzibar](https://research.google/pubs/pub48190/). This library implements a in-memory relationship-based access control dababase, that was inspired by [Google's Zanzibar](https://research.google/pubs/pub48190/).
# Naming # Naming
## `RObject` ## `Object`
A `RObject` is a tuple of the values (`namespace`, `id`). A `Object` is a tuple of the values (`namespace`, `id`).
It represents a object like a user. It represents a object like a user.
Example: (`users`, `alice`). Example: (`users`, `alice`).
## `RSet` ## `Set`
A `RSet` is a tuple of the values (`namespace`, `id`, `permission`). A `Set` is a tuple of the values (`namespace`, `id`, `permission`).
It represents a permission for a `RObject`. It represents a permission for a `Object`.
Example: (`files`, `foo.pdf`, `read`). Example: (`files`, `foo.pdf`, `read`).
# Usage # Usage
The `RelationGraph`-struct contains a graph of all relationships. The `RelationGraph`-struct contains a graph of all relationships.
Relationships can be created between: Relationships can be created between:
- `RObject` and `RSet` => user alice can read the file foo.pdf. - `Object` and `Set` => user alice can read the file foo.pdf.
- `RSet` and `RSet` => everyone who can read the file foo.pdf can read the file bar.pdf. - `Set` and `Set` => everyone who can read the file foo.pdf can read the file bar.pdf.
# Specials # Specials
- The `*`-id is used as a wildcard id to create a virtual relation from this id to every other id in the namespace. - The `*`-id is used as a wildcard id to create a virtual relation from this id to every other id in the namespace.