Skip to content

Authentication when frontend directly makes permission checks to SpiceDB #1589

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

You must be logged in to vote

👋🏻 Out of the box you won't be able to pass a JWT. The only option is a preshared key in OSS SpiceDB.

However, if you are willing to build your own SpiceDB, you could add a gRPC middleware that replaces the preshared key middleware to authenticate with JWTs. You can add any custom logic there.

Now if you plan to use JWT claims to feed into the API request payload (e.g. the subject of a CheckPermission call) that would be more involved, but would require some further customization of SpiceDB code.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jzelinskie
Comment options

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