-
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 != #142
base: main
Are you sure you want to change the base?
Add != #142
Conversation
Signed-off-by: Mauro Morales <[email protected]>
@lu-zero I saw your post on x, not sure if you're the right person to ping, but maybe you can point me to the right person. Thanks! |
Thanks for your PR! The general idea is good, but since biscuit blocks are versioned, the new operations cannot be directly added, they need to be checked against the block number (ie a block with version=3 cannot contain a != operator, and conversely, serializing a block that contains this operator must have a minimum version of 4). Additionally, the |
@divarvel let me see if I understand correctly, the current implementation is testing against https://github.com/biscuit-auth/biscuit/blob/main/samples/deprecated/v2/samples.json So for adding I'll need a bit of further explanation about what is a block of version 3 and a block version 4 are we talking about the same versions than in the samples, or is this a different kind of version? |
@mauromorales thank you for looking into this!
Biscuit token contain multiple blocks, each one corresponding to one level of attenuation. Each of those blocks holds a version number: https://github.com/biscuit-auth/biscuit/blob/main/schema.proto#L45
In general, we make sure that when generating a block, we use the lowest version number possible (if no new features are used, keep a lower number) so that they could still be validated by older versions. |
this is where we check the version when parsing the token: Lines 64 to 110 in 61386fc
It looks like this implementation does not minimize the version number when serializing though: Lines 115 to 122 in 61386fc
|
Hi, I got referred to your project and I find it quite interesting. Here's my attempt at adding
!=
which seems to be needed for v3. Looking forward to your feedbackrelates to #117