deislabs / rusty-macaroon

A Macaroon implementation in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rusty Macaroon

A Rust implementation of Macaroons loosely based off of the C reference implementation with a focus on the v2 spec.

Examples

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

Current Status

🚨 🚨 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

Other future enhancements

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

Contributing

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

About

A Macaroon implementation in Rust

License:MIT License


Languages

Language:Rust 100.0%