Skip to content
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

Extra execution restrictions #69

Open
divarvel opened this issue Jul 2, 2021 · 0 comments
Open

Extra execution restrictions #69

divarvel opened this issue Jul 2, 2021 · 0 comments

Comments

@divarvel
Copy link
Collaborator

divarvel commented Jul 2, 2021

Following discussions in #50 and #56, i've added extra (configurable) limitations to the haskell implementation: https://hackage.haskell.org/package/biscuit-haskell-0.1.0.0/docs/Auth-Biscuit-Datalog-Executor.html#t:Limits

  • allowRegexes: arbitrary regexes are a well known DoS vector. While specifying the regular expression features #50 tries to tackle the (ambitious) goal of defining a regex subset that would ensure runtime characteristics, an effective solution is to completely disallow regex computation.
    The haskell impl mitigates a lot of the regex issue with how the timeout is implemented (verification is forked to another green thread), but the rust implementation has a blocking verification, so a redos would not be prevented by the timeout feature.
  • allowBlockFacts: Attenuating a biscuit with anything other than checks is inherently complex and error-prone, the #authority / #ambient restriction can be hard to understand (and was indeed the source of a security issue). A solution is to completely prevent blocks from defining facts or rules. A better solution would be to store this info in the token itself, but as a first step, having a simple way to forbid it in the verification phase should be enough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant