Skip to content

HTTP Request-Level Authentication with SpiceDB #1526

Answered by vroldanbet
infogulch asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @infogulch,

at authzed we consider this to be a good fit for SpiceDB and in fact are using it internally this way to power some of our services. With SpiceDB's 1.24.0 recent changes to the support slashes in object identifiers, you could easily map resource paths.

You could extract authN information from headers or a JWT, and use it as the subject identifier.

For example, a POST https://example.com/books/3 would turn into a call to SpiceDB's WriteRelationships API writing the tuple books:1#creator@user#johndoe. You could also check if johndoe is allowed to create books by issuing a CheckPermission API call to SpiceDB.

A GET https://example.com/books/3 could be turned into a CheckPermi…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@infogulch
Comment options

@vroldanbet
Comment options

Answer selected by jzelinskie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants