Commit Graph

184 Commits

Author SHA1 Message Date
Geoffroy Couprie
6334679466 specify the current format version number 2022-03-22 17:58:46 +01:00
Geoffroy Couprie
1edadab916 revocation ids in samples are now available outside of datalog 2022-03-22 17:33:29 +01:00
Geoffroy Couprie
e30c174774 bump the format version to 3 2022-03-22 17:01:56 +01:00
Clément Delafargue
e08d8e758d
proto: remove now-unused constraints (#101) 2022-03-22 12:41:55 +01:00
Geoffroy Couprie
c8314a73b1
restrict the execution scope to the authority and current block (#99)
* add read, write and time to the default symbol table

remove authority an ambient from the symbol table, as they are not used
anymore

* restrict the execution scope to the authority and current block

previously when evaluating a block, we used facts from the authorizer
and all previous blocks. This changes the execution scope to use only
the authority block, authorizer and the current block, which is a much
safer default and aligns more with expectations.

Execution using all previous blocks will be accessible again in the
future through an option
2022-03-22 11:55:52 +01:00
Geoffroy Couprie
4e1b7fb399
implement concatenation and substring matching for strings (#100) 2022-03-22 09:11:02 +01:00
Clément Delafargue
33cffbab31
spec: general v2 cleanup (#98)
- markdown fixes
- wording fixes
- grammar fixes
- removed v0 and v1 spec
2022-03-21 17:56:44 +01:00
Geoffroy Couprie
f30066559d
update the default symbol table (#96)
this removes unused symbol from the default table and adds more symbols to the list.

to allow for further growth of the default symbol table, we reserve
indexes from 0 to 1023. Any custom symbol defined in tokens or
authorizers must start from 1024
2022-03-21 16:51:34 +01:00
Geoffroy Couprie
098ce26b9f
Merge pull request #92 from divarvel/patch-3
Allow multiple rule bodies in checks and policies
2022-03-09 17:28:49 +01:00
Clément Delafargue
cb12f09c60
Allow multiple rule bodies in checks and policies
The implementations allow having multiple rule bodies (separated with `or`): only one of them needs to match for the check / policy to match.
2022-03-09 10:27:04 +01:00
Geoffroy Couprie
43369593bc
fix link 2022-01-27 19:07:33 +01:00
Geoffroy Couprie
6c8b5bd7e3
Merge pull request #87 from divarvel/patch-2
Update readme
2022-01-22 13:25:32 +01:00
Geoffroy Couprie
fd26ef0863
add the matrix URL 2022-01-22 13:25:04 +01:00
Clément Delafargue
99d6b07e25
Update readme
Now that v2 is done in rust and haskell and biscuitsec.org is live
2022-01-13 21:23:25 +01:00
Geoffroy Couprie
70e6d21c42
Merge pull request #83 from jdtw/patch-1
Fix a few minor typos
2022-01-12 19:02:29 +01:00
Geoffroy Couprie
c04f766119
Merge branch 'master' into patch-1 2022-01-12 19:02:22 +01:00
Geoffroy Couprie
3a200b4170
Merge pull request #77 from biscuit-auth/2.0
[WIP] Biscuit 2.0 specification and samples
2022-01-12 18:55:34 +01:00
Geoffroy Couprie
e8f575ed61 show which policy matched even if some checks failed 2021-12-30 18:04:14 +01:00
Geoffroy Couprie
2d2e03ff09 serialize errors to JSON
implementations will be able to compare the returned errors
2021-12-24 13:15:45 +01:00
Geoffroy Couprie
4dff10995d origin mentions 2021-12-02 21:50:18 +01:00
John Wood
6169fbde0d
Fix a few minor typos 2021-10-31 10:28:42 -07:00
Geoffroy Couprie
cbc7aace72 add an EBNF grammar for Datalog 2021-10-29 22:25:05 +02:00
Geoffroy Couprie
a45093843d add a testcase for characters used in strings and fact names 2021-10-11 23:45:06 +02:00
Geoffroy Couprie
16357ce0fd rename verifier to authorizer 2021-10-05 23:45:38 +02:00
Geoffroy Couprie
a4cddcec8e
Merge pull request #81 from divarvel/clarify-vocabulary
Clarify vocabulary
2021-10-01 17:22:42 +02:00
Clement Delafargue
f628f09525 describe the different kinds of biscuits in the glossary 2021-10-01 17:18:54 +02:00
Geoffroy Couprie
1ced35062e sign the algorithm enum too in the sealed token signature
it does not change anything security wise, but it makes it more
consistent with the rest
2021-09-25 15:19:52 +02:00
Geoffroy Couprie
f38c856c78 the key is now serialized with an enum indicating its algorithm
this will open the way t other urves or algorithms, like P256
2021-09-24 23:37:28 +02:00
Geoffroy Couprie
ecc2cd46e2 sealed token output in README 2021-09-24 22:24:14 +02:00
Geoffroy Couprie
ab8d2a4a73
Merge pull request #80 from divarvel/add-sealed-spec
Add sealed spec
2021-09-24 22:16:08 +02:00
Clement Delafargue
bc3a34b3b9 samples: add sealed token sample 2021-09-24 16:15:27 +02:00
Geoffroy Couprie
6c9f12d4b6 rename ID to Term in the protobuf schema 2021-09-12 15:18:19 +02:00
Geoffroy Couprie
040c204693 use the signature as revocation id 2021-09-09 21:57:10 +02:00
Geoffroy Couprie
6092bd1614 remove symbols
They complicated the Datalog, and the #authority and #ambient symbols
are not needed anymore with the scoped execution
2021-09-09 21:56:02 +02:00
Geoffroy Couprie
deb45ac1db use the block signature as revocation id
it is enough to uniquely identify each block
2021-09-06 22:07:19 +02:00
Geoffroy Couprie
a195fb4a4c remove the symbol type
symbols were a kind of strings with less available operations and some
specific optimizations: they store in index into a symbol table carried
by the token, to reduce size by avoiding repetitions.
They were too confusing for users, and now that #authority and #ambient
are gone, we can remove them completely.
The symbol table was useful though, so now the symbol table is used for
all predicate names and strings
2021-09-06 21:54:32 +02:00
Geoffroy Couprie
a0fd4974e0 display the code provided to the verifier 2021-09-06 17:34:26 +02:00
Geoffroy Couprie
2fa7301ec2 display token content in a more structured way 2021-09-06 12:08:23 +02:00
Geoffroy Couprie
0175a4e3c5 implement scoped rules, remove #authority and #ambient
the scoped execution model ensures that checks and rules only
have access to facts added or generated in the current or previous
blocks. They cannot be affected by facts from later blocks. Verifier
rules, checks and policies are executed in the context of the authority
block

Since this change can prevent check from the authority block and the
verifier from being affected by facts from later block, we can remove
the #authority and #ambient symbols
2021-09-05 23:35:46 +02:00
Geoffroy Couprie
e5ea1c13a1 remove the unique_revocation_id, it is the same as the revocation_id 2021-09-04 13:37:40 +02:00
Geoffroy Couprie
264dbb0aa4 start updating the schema for v2
- remove v0 compatibility
- convert v1 to v2
- remove the index from blocks (now the cryptographisc design guarantees
the order
2021-09-03 21:59:14 +02:00
Geoffroy Couprie
d91e055156 new cryptographic scheme 2021-09-03 18:37:09 +02:00
Geoffroy Couprie
7bd158a3ed JSON testcases results and rewrite of testcases README 2021-09-01 17:27:36 +02:00
Geoffroy Couprie
5e7e01a744 Add samples and advisories for vulnerabilities 0 and 1 2021-05-06 17:36:17 +02:00
Geoffroy Couprie
dc01631bfe show the facts generated by the rule execution 2021-05-06 17:19:02 +02:00
Geoffroy Couprie
840ff1d187 remove duplicate check 2021-05-06 17:18:15 +02:00
Geoffroy Couprie
464ef26d68 audit mentions 2021-04-16 09:41:34 +02:00
Geoffroy Couprie
245ab9e974 merge 1.0 2021-03-11 10:07:08 +01:00
Geoffroy Couprie
822a89eee2
Merge pull request #65 from adeinega/patch-1
Minor typos
2021-03-11 10:03:06 +01:00
Geoffroy Couprie
f3785126d7 add a format to transport verifier state
there are two use cases for this:
- quickly loading verifier policies from a serialized state instead of
manually adding datalog elements one by one through the verifier API.
The policies could even be written in a different system then published
to running instances dynamically
- save the state of a verifier, including ambient data, facts, rules and
checks coming from a token, to later load it into another verifier and inspect
it
2021-03-04 14:21:06 +01:00