biscuit-auth / biscuit-rust

Rust implementation of the Biscuit authorization token
https://www.biscuitsec.org
207 stars 30 forks source link

wip: datalog foreign function interface prototype #228

Open divarvel opened 1 month ago

divarvel commented 1 month ago

This allows using external functions in datalog.

This makes it easy to provide custom logic without extending the spec for every use-case, at the expense of portability: behaviour is no longer guaranteed to be consistent cross languages, and some languages won’t be able to support it at all (for instance JS as of now).

Open questions:

Code coverage should be improved by adding samples

codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #228 will not alter performance

Comparing ffi (99c0718) with v5 (e59f41d)

Summary

✅ 12 untouched benchmarks

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 75.30120% with 82 lines in your changes missing coverage. Please review.

Project coverage is 69.58%. Comparing base (3930767) to head (99c0718). Report is 1 commits behind head on v5.

Files with missing lines Patch % Lines
biscuit-parser/src/builder.rs 0.00% 34 Missing :warning:
biscuit-auth/src/token/builder.rs 86.76% 18 Missing :warning:
biscuit-auth/src/format/convert.rs 74.13% 15 Missing :warning:
biscuit-auth/src/token/authorizer.rs 50.00% 8 Missing :warning:
biscuit-auth/src/datalog/expression.rs 90.90% 4 Missing :warning:
biscuit-auth/examples/testcases.rs 92.85% 2 Missing :warning:
biscuit-auth/src/token/authorizer/snapshot.rs 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## v5 #228 +/- ## ========================================== + Coverage 69.03% 69.58% +0.54% ========================================== Files 25 25 Lines 5926 6154 +228 ========================================== + Hits 4091 4282 +191 - Misses 1835 1872 +37 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.