A Rust implementation of Macaroons loosely based off of the C reference implementation with a focus on the v2 spec.
There are currently two fully working examples in the examples directory. To run them, simply execute:
# First party only caveats
$ cargo run --example first_party
# With third party caveats
$ cargo run --example third_party
🚨 🚨 This is very alpha and NOT READY FOR PRODUCTION 🚨 🚨
With that said, here is what is done and not done.
- Create a new macaroon
- Add first-party caveats
- Add third-party caveats
- Validate macaroon with first-party caveats
- Validate macaroon with third-party caveats
- Serialize and deserialize macaroons from JSON
- Serialize and deserialize macaroons using v2 binary format
- Unit tests
As we continue to work on this, we may create a separate crate that also defines common caveat validators (such as checking for expiration of a time). But as of now, we are just trying to get to feature complete
We ❤️ any contributions. Most of us are fairly new to Rust, so any fixes to make things simpler or more idiomatic are also more than welcome. Please open a pull request if you have something you want to contribute