-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support for biscuit-rust v3.0.0 #3
Comments
I haven't touched this crate in a while, and I'd definitely consider it still under "experimental" status. But I have some free time starting around this Monday, so I could see about revamping it in a few days to work with the latest Biscuit API. I would also welcome ideas on how to best integrate If I recall correctly, I think the larger questions we had with the current prototype were around:
|
to give some context, one of the most prominent changes in biscuit 3.0 is the introduction of datalog macros, along with parameters substitution:
the actual authorizer is meant to be different for each request (because ambient facts will be different), so an authorizer will have to be built at each request (either by cloning an existing authorizer or building one from scratch). based on biscuit middlewares built in other languages (javascript and haskell), as well as based on experience with securing services with macaroons (one of the main inspirations for biscuit)
Based on all this, here is the approach that was used for support on other platforms:
See for instance the current work on the actix middleware: https://github.com/biscuit-auth/biscuit-actix-middleware/blob/main/examples/nominal.rs (for now token extraction, parsing and error responses are hard-coded, and it does not yet handle common authorization logic (common authorization logic can be achieved by the users with regular programming techniques). This structure served me well in production with macaroons for 5 years, and allowed a biscuit deployment in haskell (with the servant web framework) to go through without any modification to the middleware code |
Hi,
Thanks for working on this!
Biscuit-auth maintainer here, thanks for working on a tower integration. Are there plans for bumping the biscuit-auth dependency to 3.0.0 / would you welcome a PR doing that?
I have built biscuit middleware for haskell and JS web frameworks, so I'm starting to get a clear view of how to integrate biscuit with web apps / APIs, maybe we could compare notes?
The text was updated successfully, but these errors were encountered: