-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SetContext on Builder interface and GetContext on Biscuit struct. #153
Conversation
What is a "context" in this context? |
"context" is the second field of the block liked it is indicated into the spec:
And the goal is to be able to be equivalent to the java biscuit library (https://github.com/biscuit-auth/biscuit-java/blob/a863cd8c0bd45ad1e36390ce777741e49417da0e/src/main/java/org/biscuitsec/biscuit/token/builder/Biscuit.java#L119) if you're question is "are you talking about a Go std context ?", the answer is no but the context from biscuit specification. |
I did see that field in the IDL before asking the question here, but I'm wondering what a typical value would be for such a "context", who sets it, who consumes it, and why. |
It is intended as a way to embed a payload outside datalog. so something freeform that would not be directly used in the authorization context. It’s a remnant of early biscuit days, meant as some kind of escape hatch. |
It sounds like something we'd like to get rid of, but can't now, because the libraries for other languages allow writing to and reading from this Protocol Buffer message field. This patch makes it more likely that we'll preserve this field for a long while. |
Hello @seh, |
Hello @seh, |
Thank you for the explanation, but as much as I'd like to help, I'm not your intended audience, as I'm merely a contributor here for now, and not a maintainer. I don't have any authority to approve proposed changes within this repository. I expect that you'll need to appeal to @divarvel, who has been handling reviews at least since I started proposing changes here. |
I think that for consistency, reading the context of not just the authority block would be good as well, but definitely not a blocker, given how little |
To be able to set a context and retrieve it form a biscuit.