CedarJavaFFI
February 7, 2025 ยท View on GitHub
Bindings to allow calling the core Cedar functions (is_authorized and validate) from Java.
Usage
Build
You can build the code with
cargo build
Note that the main branch expects that the cedar repository is cloned locally in the top-level directory (..). release/x.x.x branches use a version of cedar-policy available on crates.io.
Run
You can test the code with
cargo test
To test methods in interface.rs, the code creates a JVM instance. If you encounter errors indicating that Java cannot be found, verify that the JAVA_HOME environment variable is properly set on your system. For more details about JVM initialization from Rust, see the jni crate documentation.
Typically you will want to use ../CedarJava in your project and won't care about CedarJavaFFI.
Security
See CONTRIBUTING for more information.
License
This project is licensed under the Apache-2.0 License.