I am trying to figure out anonymous users (and may...
# spicedb
f
I am trying to figure out anonymous users (and maybe get some advice on how to go about modeling my authz model) I am building a github extension and I am planning on supporting multiple other bots (for gitlab and etc). I am using clerk where this supports multiple different authn providers (for now I am only working on github). This will involve managing relations all in one central spot I want to keep it simple for now since everything is github and want the following access control model Read (anonymous viewing / anyone can view, only authorized people are allowed to view) Write (only authorized people are allowed to write)
Copy code
/** user represents a user that can be granted role(s) */
definition user {}

definition anonymoususer {}

/** document represents a document protected by Authzed. */
definition board {
    /** writer indicates that the user is a writer on the document. */
    relation writer: user

    /** reader indicates that the user is a reader on the document. */
    relation reader: user | anonymoususer:*

    /** edit indicates that the user has permission to edit the document. */
    permission edit = writer

    /**
     * view indicates that the user has permission to view the document, if they
     * are a `reader` *or* have `edit` permission.
     */
    permission view = reader + edit
}
When trying the following thing it complains, not too sure why
board:whiteboard-4444#reader@anonymoususer:1222
For now I don't really ever differentiate between anonymous users but I wanted to keep this functionality in case I wanted to later add it Thanks 🙂