diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 8f5336f..47a07f3 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -1,53 +1,24 @@ Policy reasoner architecture ============================ -The policy reasoner repository consists of two main parts. A library and a set of -implementations. - -### Library - -The entry point for the library is `src/lib.rs` as per usual. -In these files no particular implementation of a policy reasoner is included, only -the mechanisms on which the concept of a policy reasoner can be implemented. - -### Interface - -The interface for the different reasoners must be the same. Its command line -arguments are defined in `src/bin/implementation/interface.rs`. It could be that a new -reasoner requires more arguments. You can implement another arguments struct, however -make sure the arguments defined in the common interface are supported as other -components of infrastructure may depend on it. - -### Implementations - -As of now there are three different implementations of a policy reasoners in -this repository. The entrypoint for a reasoner can be found in `src/bin/{...}.rs`. -The subsequent libraries that support the implementation, can be placed in the -`implementation` module in `src/bin/implementation/{...}`. - -#### No-Op reasoner - -The most minimal reasoner is called the no_op reasoner, it will always returns the -same verdict. This is not a good policy reasoner, but it can be a minimal -example for futher implementations of new policy reasoners. - -#### Posix reasoner - -There exists a reasoner that uses posix file permissions for access control. As -of now there exists a yaml mapping between file system uids and users with -regards to the policy reasoner, but the idea is to inject multiple ways of -mapping these users to file system uid / gids by means of LDAP/AD for example. -Right now there is no support for linux ACL (facl), but this could be added in -the future. - -#### eFLINT reasoner - -Lastly, there is a reasoner that implements the eFLINT language as a method of -expressing the control policies. This language can be very expressive with -regards to possible policies, but can also be more complicated to set up. - -#### Extra reasonsers - -We are looking for new and different ways of expressing policies. If you have an -idea on an implementation for a policy reasoner, feel free to open an issue and -we can discuss how to go about implementing it. +This project is organised as a collection of crates that implement various aspects of various instantiations of a `policy-reasoner`. They are separate crates instead of feature-gated modules in order to tame the wildy varying dependencies a little. + +The crates doing the actual implementations can be found in the [`lib/`](lib/)-folder. Then, the [`src/`](src/)-folder provides a collection library that dynamically includes the crates based on features. Finally, [`examples/`](examples/) contains various example instantiations of the reasoner for different backends. They aren't (yet) exhaustive in terms of _all_ possible instantiations, but they do serve as an introduction to how to use and install each backend. + +## Libraries +The following libraries are provided by the `policy-reasoner` workspace, grouped by function: +- [_reasoners_](lib/reasoners/) implement the `ReasonerConnector`-trait, which abstracts over specific backends. + - [`eflint-haskell`](lib/reasoners/eflint-haskell) contributes a wrapper around the [eFLINT Haskell implementation](https://gitlab.com/eflint/haskell-implementation). It accepts eFLINT's DSL. + - [`eflint-json`](lib/reasoners/eflint-json) contributes a wrapper around Olaf's [eFLINT GO-implementation](https://github.com/Olaf-Erkemeij/eflint-server/) (or, more precisely, [our fork](https://github.com/BraneFramework/eflint-server-go)). It accepts [eFLINT's JSON specification](https://gitlab.com/eflint/json-specification). + - [`no-op`](lib/reasoners/no-op) contributes a dummy reasoner that blindly accepts anything. It is mostly used for debugging purposes. + - [`posix`](lib/reasoners/posix) contributes a wrapper around Unix's filesystem to use its permissions for deciding dataset access. It is based on the work done by [Daniel Voogsgerd, ](). +- [_resolvers_](lib/resolvers/) implement the `StateResolver`-trait, which is responsible for providing current information about the runtime system to a static policy. + - [`file`](lib/resolvers/file) contributes a resolver that reads the current system state from a file. This one is mostly for debugging, though; usually, systems implement their own resolvers to discover the current state. +- [_loggers_](lib/loggers/) implement the `AuditLogger`-trait, which is triggered with auditable information of specific events in the reasoner and can store it in implementation-specific ways. + - [`file`](lib/loggers/file) contributes an implementation that writes the events to a file. + - [`no-op`](lib/loggers/no-op) contributes a dummy implementation that doesn't write any audit event. This is used for debugging, or in scenarios where no audit trail is desired. + +Then there are also a few miscellaneous, auxillary libraries: +- [`eflint-to-json`](lib/eflint-to-json) contributes a wrapper around Olaf's [eFLINT to eFLINT JSON compiler](https://github.com/Olaf-Erkemeij/eflint-server/) (or more precisely, [our fork](https://github.com/BraneFramework/eflint-server-go)). This allows frontends to also use the eFLINT DSL with the [`eflint-json`](lib/reasoners/eflint-json) backend. +- [`spec`](lib/spec) contributes the core traits of the `policy-reasoner` mentioned above. +- [`workflow`](lib/workflow) contributes a specification of an abstract workflow that can be used to inform the policy to the task at hand. diff --git a/Cargo.lock b/Cargo.lock index e492bf1..3ca7e98 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" @@ -43,9 +43,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.18" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" dependencies = [ "anstyle", "anstyle-parse", @@ -58,3008 +58,1250 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" dependencies = [ "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" dependencies = [ "anstyle", - "once_cell", + "once_cell_polyfill", "windows-sys 0.59.0", ] [[package]] -name = "anyhow" -version = "1.0.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" - -[[package]] -name = "asn1-rs" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60" -dependencies = [ - "asn1-rs-derive", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror 2.0.12", - "time", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.6.0" +name = "async-recursion" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", - "synstructure", + "syn", ] [[package]] -name = "asn1-rs-impl" -version = "0.2.0" +name = "atomic-waker" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] -name = "async-compression" -version = "0.3.15" +name = "autocfg" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" -dependencies = [ - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", -] +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] -name = "async-compression" -version = "0.4.22" +name = "backtrace" +version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a194f9d963d8099596278594b3107448656ba73831c9d8c783e613ce86da64" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", ] [[package]] -name = "async-recursion" -version = "1.1.1" +name = "backtrace-ext" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "backtrace", ] [[package]] -name = "async-stream" -version = "0.3.6" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "async-stream-impl" -version = "0.3.6" +name = "bitflags" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] -name = "async-trait" -version = "0.1.88" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "generic-array", ] [[package]] -name = "atomic-waker" -version = "1.1.2" +name = "bumpalo" +version = "3.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "audit-logger" -version = "0.1.0" -dependencies = [ - "async-trait", - "auth-resolver 0.1.0", - "deliberation 0.1.0", - "enum-debug", - "hex", - "policy 0.1.0", - "serde", - "serde_json", - "state-resolver 0.1.0", - "warp", - "workflow 0.1.0", -] - -[[package]] -name = "audit-logger" -version = "0.1.0" -source = "git+https://github.com/braneframework/policy-reasoner#42261e9751c320914c89cf49641bf7477bd1c313" -dependencies = [ - "async-trait", - "auth-resolver 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "deliberation 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "enum-debug", - "hex", - "policy 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "serde", - "serde_json", - "state-resolver 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "warp", - "workflow 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", -] +checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" [[package]] -name = "auth-resolver" -version = "0.1.0" -dependencies = [ - "async-trait", - "serde", - "warp", -] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] -name = "auth-resolver" -version = "0.1.0" -source = "git+https://github.com/braneframework/policy-reasoner#42261e9751c320914c89cf49641bf7477bd1c313" +name = "cc" +version = "1.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" dependencies = [ - "async-trait", - "serde", - "warp", + "shlex", ] [[package]] -name = "autocfg" -version = "1.4.0" +name = "cfg-if" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] -name = "axum" -version = "0.6.20" +name = "chrono" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ - "async-trait", - "axum-core 0.3.4", - "bitflags 1.3.2", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 0.1.2", - "tower 0.4.13", - "tower-layer", - "tower-service", + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-link", ] [[package]] -name = "axum" -version = "0.7.9" +name = "clap" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" dependencies = [ - "async-trait", - "axum-core 0.4.5", - "bytes", - "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "http-body-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 1.0.2", - "tower 0.5.2", - "tower-layer", - "tower-service", + "clap_builder", + "clap_derive", ] [[package]] -name = "axum-core" -version = "0.3.4" +name = "clap_builder" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", - "tower-layer", - "tower-service", + "anstream", + "anstyle", + "clap_lex", + "strsim", ] [[package]] -name = "axum-core" -version = "0.4.5" +name = "clap_derive" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 1.0.2", - "tower-layer", - "tower-service", + "heck", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "backtrace" -version = "0.3.74" +name = "clap_lex" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] -name = "base16ct" -version = "0.2.0" +name = "colorchoice" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] -name = "base64" -version = "0.13.1" +name = "console" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width 0.2.1", + "windows-sys 0.59.0", +] [[package]] -name = "base64" -version = "0.21.7" +name = "core-foundation" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] -name = "base64" -version = "0.22.1" +name = "core-foundation-sys" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] -name = "base64ct" -version = "1.7.3" +name = "cpufeatures" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] [[package]] -name = "bitflags" -version = "1.3.2" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] [[package]] -name = "bitflags" -version = "2.9.0" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] [[package]] -name = "block-buffer" -version = "0.10.4" +name = "displaydoc" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "generic-array", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "bollard" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ccca1260af6a459d75994ad5acc1651bcabcbdbc41467cc9786519ab854c30" +name = "eflint-haskell-reasoner" +version = "0.1.0" dependencies = [ - "base64 0.22.1", - "bollard-stubs", - "bytes", - "futures-core", - "futures-util", + "error-trace", "hex", - "http 1.1.0", - "http-body-util", - "hyper 1.6.0", - "hyper-named-pipe", - "hyper-util", - "hyperlocal", - "log", - "pin-project-lite", "serde", - "serde_derive", - "serde_json", - "serde_repr", - "serde_urlencoded", - "thiserror 2.0.12", + "sha2", + "share", + "specifications", + "thiserror", "tokio", - "tokio-util", - "tower-service", - "url", - "winapi", + "tracing", ] [[package]] -name = "bollard-stubs" -version = "1.47.1-rc.27.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f179cfbddb6e77a5472703d4b30436bff32929c0aa8a9008ecf23d1d3cdd0da" -dependencies = [ - "serde", - "serde_repr", - "serde_with", -] - -[[package]] -name = "brane-ast" -version = "3.0.0" -source = "git+https://github.com/braneframework/brane#9acf0eda6fd6c13efe0c198801d586e6478efffb" -dependencies = [ - "brane-dsl 3.0.0 (git+https://github.com/braneframework/brane)", - "brane-shr 3.0.0 (git+https://github.com/braneframework/brane)", - "console", - "enum-debug", - "lazy_static", - "log", - "num-traits", - "rand 0.9.0", - "serde", - "serde_json_any_key", - "specifications 3.0.0 (git+https://github.com/braneframework/brane)", - "strum 0.27.1", - "thiserror 2.0.12", - "uuid", -] - -[[package]] -name = "brane-ast" -version = "3.0.0" -source = "git+https://github.com/epi-project/brane#7524309001d9ff347c8063747f2535a474a73565" -dependencies = [ - "brane-dsl 3.0.0 (git+https://github.com/epi-project/brane)", - "brane-shr 3.0.0 (git+https://github.com/epi-project/brane)", - "console", - "enum-debug", - "lazy_static", - "log", - "num-traits", - "rand 0.8.5", - "serde", - "serde_json_any_key", - "specifications 3.0.0 (git+https://github.com/epi-project/brane)", - "strum 0.25.0", - "uuid", -] - -[[package]] -name = "brane-cfg" -version = "3.0.0" -source = "git+https://github.com/braneframework/brane#9acf0eda6fd6c13efe0c198801d586e6478efffb" +name = "eflint-json" +version = "0.1.0" +source = "git+https://gitlab.com/eflint/json-spec-rs.git?branch=incorrect-is-invariant#a77ae8c5050fcbeb36340ec86f353099d6c51182" dependencies = [ - "async-trait", "enum-debug", - "log", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", "serde", - "serde_yml 0.0.10", - "specifications 3.0.0 (git+https://github.com/braneframework/brane)", - "thiserror 2.0.12", - "tokio", - "x509-parser", ] [[package]] -name = "brane-ctl" -version = "3.0.0" -source = "git+https://github.com/braneframework/brane#9acf0eda6fd6c13efe0c198801d586e6478efffb" +name = "eflint-json-reasoner" +version = "0.2.0" dependencies = [ - "base64ct", - "bollard", - "brane-cfg", - "brane-shr 3.0.0 (git+https://github.com/braneframework/brane)", - "brane-tsk", - "clap", - "clap_complete", - "console", - "dialoguer", - "diesel", - "diesel_migrations", - "dirs", - "dotenvy", - "download", - "eflint-to-json 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "enum-debug", + "eflint-json", "error-trace", - "hex-literal", - "human-panic", - "humanlog", - "humantime", - "jsonwebtoken", - "lazy_static", - "log", - "names", - "policy 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "rand 0.9.0", - "reqwest 0.12.15", - "serde", - "serde_json", - "serde_yml 0.0.10", - "shlex", - "specifications 3.0.0 (git+https://github.com/braneframework/brane)", - "srv 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "tempfile", - "thiserror 2.0.12", - "tokio", -] - -[[package]] -name = "brane-dsl" -version = "3.0.0" -source = "git+https://github.com/braneframework/brane#9acf0eda6fd6c13efe0c198801d586e6478efffb" -dependencies = [ - "brane-shr 3.0.0 (git+https://github.com/braneframework/brane)", - "enum-debug", - "log", - "nom", - "nom_locate", - "rand 0.9.0", - "regex", - "serde", - "specifications 3.0.0 (git+https://github.com/braneframework/brane)", - "thiserror 2.0.12", -] - -[[package]] -name = "brane-dsl" -version = "3.0.0" -source = "git+https://github.com/epi-project/brane#7524309001d9ff347c8063747f2535a474a73565" -dependencies = [ - "brane-shr 3.0.0 (git+https://github.com/epi-project/brane)", - "bytes", - "enum-debug", - "log", - "nom", - "nom_locate", - "rand 0.8.5", - "regex", - "semver", - "serde", - "serde_json", - "specifications 3.0.0 (git+https://github.com/epi-project/brane)", - "thiserror 1.0.69", -] - -[[package]] -name = "brane-exe" -version = "3.0.0" -source = "git+https://github.com/braneframework/brane#9acf0eda6fd6c13efe0c198801d586e6478efffb" -dependencies = [ - "async-recursion", - "async-trait", - "base64 0.22.1", - "brane-ast 3.0.0 (git+https://github.com/braneframework/brane)", - "brane-shr 3.0.0 (git+https://github.com/braneframework/brane)", - "console", - "enum-debug", - "futures", - "lazy_static", - "log", - "num-traits", + "reqwest", "serde", "serde_json", - "specifications 3.0.0 (git+https://github.com/braneframework/brane)", - "thiserror 2.0.12", - "tokio", + "share", + "specifications", + "thiserror", + "tracing", ] [[package]] -name = "brane-exe" -version = "3.0.0" -source = "git+https://github.com/epi-project/brane#7524309001d9ff347c8063747f2535a474a73565" +name = "eflint-to-json" +version = "0.2.0" dependencies = [ "async-recursion", - "async-trait", - "base64 0.13.1", - "brane-ast 3.0.0 (git+https://github.com/epi-project/brane)", - "brane-shr 3.0.0 (git+https://github.com/epi-project/brane)", - "console", - "enum-debug", - "futures", - "lazy_static", - "log", - "num-traits", - "serde", - "serde_json", - "specifications 3.0.0 (git+https://github.com/epi-project/brane)", - "tokio", - "uuid", -] - -[[package]] -name = "brane-shr" -version = "3.0.0" -source = "git+https://github.com/braneframework/brane#9acf0eda6fd6c13efe0c198801d586e6478efffb" -dependencies = [ - "async-compression 0.4.22", - "console", - "dialoguer", - "enum-debug", - "fs2", - "hex", - "humanlog", - "indicatif", - "log", - "regex", - "reqwest 0.12.15", - "sha2", - "specifications 3.0.0 (git+https://github.com/braneframework/brane)", - "thiserror 2.0.12", - "tokio", - "tokio-stream", - "tokio-tar", - "url", -] - -[[package]] -name = "brane-shr" -version = "3.0.0" -source = "git+https://github.com/epi-project/brane#7524309001d9ff347c8063747f2535a474a73565" -dependencies = [ - "async-compression 0.3.15", "console", - "dialoguer", - "enum-debug", - "fs2", "futures-util", "hex", - "humanlog", + "hex-literal", "indicatif", - "log", - "num-traits", - "regex", - "reqwest 0.11.27", + "reqwest", "sha2", - "specifications 3.0.0 (git+https://github.com/epi-project/brane)", + "thiserror", "tokio", - "tokio-stream", - "tokio-tar", - "url", + "tracing", ] [[package]] -name = "brane-tsk" -version = "3.0.0" -source = "git+https://github.com/braneframework/brane#9acf0eda6fd6c13efe0c198801d586e6478efffb" -dependencies = [ - "async-trait", - "base64 0.22.1", - "base64ct", - "bollard", - "brane-ast 3.0.0 (git+https://github.com/braneframework/brane)", - "brane-cfg", - "brane-exe 3.0.0 (git+https://github.com/braneframework/brane)", - "brane-shr 3.0.0 (git+https://github.com/braneframework/brane)", - "chrono", - "console", - "dialoguer", - "enum-debug", - "futures-util", - "graphql_client", - "log", - "num-traits", - "parking_lot", - "rand 0.9.0", - "reqwest 0.12.15", - "serde", - "serde_json", - "serde_yml 0.0.10", - "sha2", - "specifications 3.0.0 (git+https://github.com/braneframework/brane)", - "thiserror 2.0.12", - "tokio", - "tokio-tar", - "tokio-util", - "tonic 0.12.3", - "uuid", -] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] -name = "bumpalo" -version = "3.17.0" +name = "encoding_rs" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] [[package]] -name = "bytecount" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" +name = "enum-debug" +version = "1.1.0" +source = "git+https://github.com/Lut99/enum-debug?tag=v1.1.0#f535466915f82861b0a2dc9d4e3a106f04d5ace7" +dependencies = [ + "enum-debug-derive", +] [[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +name = "enum-debug-derive" +version = "1.1.0" +source = "git+https://github.com/Lut99/enum-debug?tag=v1.1.0#f535466915f82861b0a2dc9d4e3a106f04d5ace7" +dependencies = [ + "quote", + "syn", +] [[package]] -name = "bytes" -version = "1.10.1" +name = "equivalent" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] -name = "cc" -version = "1.2.17" +name = "errno" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ - "shlex", + "libc", + "windows-sys 0.59.0", ] [[package]] -name = "cfg-if" -version = "1.0.0" +name = "error-trace" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "a17beb87ca4ef7c5edd18148b494b437b00a019e6f22bf1e557c2f370d24c445" [[package]] -name = "cfg_aliases" -version = "0.2.1" +name = "fastrand" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] -name = "checker-client" -version = "0.1.0" +name = "file-logger" +version = "0.2.0" dependencies = [ - "audit-logger 0.1.0", - "brane-ast 3.0.0 (git+https://github.com/braneframework/brane)", - "brane-shr 3.0.0 (git+https://github.com/braneframework/brane)", "chrono", - "clap", - "console", - "deliberation 0.1.0", - "eflint-json", - "eflint-to-json 0.1.0", "enum-debug", - "error-trace", - "hmac", - "humanlog", - "jwt", - "log", - "names", - "policy 0.1.0", - "rand 0.9.0", - "reqwest 0.12.15", + "serde", "serde_json", - "sha2", - "specifications 3.0.0 (git+https://github.com/braneframework/brane)", - "srv 0.1.0", + "specifications", + "thiserror", + "tokio", + "tracing", ] [[package]] -name = "chrono" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +name = "file-resolver" +version = "0.2.0" dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", "serde", - "wasm-bindgen", - "windows-link", + "serde_json", + "specifications", + "thiserror", + "tokio", + "tracing", ] [[package]] -name = "clap" -version = "4.5.34" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e958897981290da2a852763fe9cdb89cd36977a5d729023127095fa94d95e2ff" -dependencies = [ - "clap_builder", - "clap_derive", -] +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "clap_builder" -version = "4.5.34" +name = "foreign-types" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b0f35019843db2160b5bb19ae09b4e6411ac33fc6a712003c33e03090e2489" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", + "foreign-types-shared", ] [[package]] -name = "clap_complete" -version = "4.5.47" +name = "foreign-types-shared" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06f5378ea264ad4f82bbc826628b5aad714a75abf6ece087e923010eb937fb6" -dependencies = [ - "clap", -] +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] -name = "clap_derive" -version = "4.5.32" +name = "form_urlencoded" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.100", + "percent-encoding", ] [[package]] -name = "clap_lex" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" - -[[package]] -name = "colorchoice" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" - -[[package]] -name = "combine" -version = "4.6.7" +name = "futures-channel" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ - "bytes", - "memchr", + "futures-core", + "futures-sink", ] [[package]] -name = "console" -version = "0.15.11" +name = "futures-core" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" -dependencies = [ - "encode_unicode", - "libc", - "once_cell", - "unicode-width", - "windows-sys 0.59.0", -] +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] -name = "const_format" -version = "0.2.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" -dependencies = [ - "const_format_proc_macros", -] - -[[package]] -name = "const_format_proc_macros" -version = "0.2.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "darling" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.100", -] - -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "data-encoding" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" - -[[package]] -name = "deliberation" -version = "0.1.0" -dependencies = [ - "brane-ast 3.0.0 (git+https://github.com/braneframework/brane)", - "brane-exe 3.0.0 (git+https://github.com/braneframework/brane)", - "clap", - "enum-debug", - "error-trace", - "humanlog", - "log", - "serde", - "serde_json", - "uuid", -] - -[[package]] -name = "deliberation" -version = "0.1.0" -source = "git+https://github.com/braneframework/policy-reasoner#42261e9751c320914c89cf49641bf7477bd1c313" -dependencies = [ - "brane-ast 3.0.0 (git+https://github.com/epi-project/brane)", - "brane-exe 3.0.0 (git+https://github.com/epi-project/brane)", - "enum-debug", - "log", - "serde", - "serde_json", - "uuid", -] - -[[package]] -name = "der-parser" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" -dependencies = [ - "asn1-rs", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - -[[package]] -name = "deranged" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "dialoguer" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" -dependencies = [ - "console", - "shell-words", - "tempfile", - "thiserror 1.0.69", - "zeroize", -] - -[[package]] -name = "diesel" -version = "2.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "470eb10efc8646313634c99bb1593f402a6434cbd86e266770c6e39219adb86a" -dependencies = [ - "chrono", - "diesel_derives", - "libsqlite3-sys", - "r2d2", - "time", -] - -[[package]] -name = "diesel_derives" -version = "2.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a93958254b70bea63b4187ff73d10180599d9d8d177071b7f91e6da4e0c0ad55" -dependencies = [ - "diesel_table_macro_syntax", - "dsl_auto_type", - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "diesel_migrations" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a73ce704bad4231f001bff3314d91dce4aba0770cee8b233991859abc15c1f6" -dependencies = [ - "diesel", - "migrations_internals", - "migrations_macros", -] - -[[package]] -name = "diesel_table_macro_syntax" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" -dependencies = [ - "syn 2.0.100", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "dirs" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.59.0", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "download" -version = "0.1.0" -source = "git+https://github.com/Lut99/download-rs?tag=v0.1.0#ebba70884249fcfcb978eef74c57da16b593ac33" -dependencies = [ - "console", - "hex", - "indicatif", - "reqwest 0.11.27", - "sha2", - "url", -] - -[[package]] -name = "dsl_auto_type" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139ae9aca7527f85f26dd76483eb38533fd84bd571065da1739656ef71c5ff5b" -dependencies = [ - "darling", - "either", - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "eflint-json" -version = "0.1.0" -source = "git+https://gitlab.com/eflint/json-spec-rs.git?branch=incorrect-is-invariant#a77ae8c5050fcbeb36340ec86f353099d6c51182" -dependencies = [ - "console", - "enum-debug", - "lazy_static", - "serde", -] - -[[package]] -name = "eflint-to-json" -version = "0.1.0" -dependencies = [ - "async-recursion", - "console", - "futures-util", - "hex", - "hex-literal", - "indicatif", - "log", - "reqwest 0.12.15", - "sha2", - "tokio", -] - -[[package]] -name = "eflint-to-json" -version = "0.1.0" -source = "git+https://github.com/braneframework/policy-reasoner#42261e9751c320914c89cf49641bf7477bd1c313" -dependencies = [ - "async-recursion", - "console", - "futures-util", - "hex", - "hex-literal", - "indicatif", - "log", - "reqwest 0.12.15", - "sha2", - "tokio", -] - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "encode_unicode" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" - -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "enum-debug" -version = "1.1.0" -source = "git+https://github.com/Lut99/enum-debug?tag=v1.1.0#f535466915f82861b0a2dc9d4e3a106f04d5ace7" -dependencies = [ - "enum-debug-derive", -] - -[[package]] -name = "enum-debug-derive" -version = "1.1.0" -source = "git+https://github.com/Lut99/enum-debug?tag=v1.1.0#f535466915f82861b0a2dc9d4e3a106f04d5ace7" -dependencies = [ - "quote", - "syn 2.0.100", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "error-trace" -version = "3.0.0" -source = "git+https://github.com/Lut99/error-trace-rs?tag=v3.0.0#a026dc304b5bcc40bc68574f21459d2f1b6cad90" - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "filetime" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" -dependencies = [ - "cfg-if", - "libc", - "libredox", - "windows-sys 0.59.0", -] - -[[package]] -name = "flate2" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "r-efi", - "wasi 0.14.2+wasi-0.2.4", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "graphql-introspection-query" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2a4732cf5140bd6c082434494f785a19cfb566ab07d1382c3671f5812fed6d" -dependencies = [ - "serde", -] - -[[package]] -name = "graphql-parser" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a818c0d883d7c0801df27be910917750932be279c7bc82dc541b8769425f409" -dependencies = [ - "combine", - "thiserror 1.0.69", -] - -[[package]] -name = "graphql_client" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50cfdc7f34b7f01909d55c2dcb71d4c13cbcbb4a1605d6c8bd760d654c1144b" -dependencies = [ - "graphql_query_derive", - "serde", - "serde_json", -] - -[[package]] -name = "graphql_client_codegen" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e27ed0c2cf0c0cc52c6bcf3b45c907f433015e580879d14005386251842fb0a" -dependencies = [ - "graphql-introspection-query", - "graphql-parser", - "heck 0.4.1", - "lazy_static", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn 1.0.109", -] - -[[package]] -name = "graphql_query_derive" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83febfa838f898cfa73dfaa7a8eb69ff3409021ac06ee94cfb3d622f6eeb1a97" -dependencies = [ - "graphql_client_codegen", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.8.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http 1.1.0", - "indexmap 2.8.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" - -[[package]] -name = "headers" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" -dependencies = [ - "base64 0.21.7", - "bytes", - "headers-core", - "http 0.2.12", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http 0.2.12", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http 1.1.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" -dependencies = [ - "bytes", - "futures-core", - "http 1.1.0", - "http-body 1.0.1", - "pin-project-lite", -] - -[[package]] -name = "http-serde" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f560b665ad9f1572cfcaf034f7fb84338a7ce945216d64a90fd81f046a3caee" -dependencies = [ - "http 0.2.12", - "serde", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "human-panic" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80b84a66a325082740043a6c28bbea400c129eac0d3a27673a1de971e44bf1f7" -dependencies = [ - "anstream", - "anstyle", - "backtrace", - "os_info", - "serde", - "serde_derive", - "toml", - "uuid", -] - -[[package]] -name = "humanlog" -version = "0.2.0" -source = "git+https://github.com/Lut99/humanlog-rs?tag=v0.2.0#0bceaaeb6426a6c990017c1d3c0aa7f51adbbfa1" -dependencies = [ - "chrono", - "console", - "log", - "parking_lot", -] - -[[package]] -name = "humantime" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" - -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.8", - "http 1.1.0", - "http-body 1.0.1", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-named-pipe" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b7d8abf35697b81a825e386fc151e0d503e8cb5fcb93cc8669c376dfd6f278" -dependencies = [ - "hex", - "hyper 1.6.0", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", - "winapi", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" -dependencies = [ - "futures-util", - "http 1.1.0", - "hyper 1.6.0", - "hyper-util", - "rustls 0.23.25", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", -] - -[[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" -dependencies = [ - "hyper 0.14.32", - "pin-project-lite", - "tokio", - "tokio-io-timeout", -] - -[[package]] -name = "hyper-timeout" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" -dependencies = [ - "hyper 1.6.0", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.32", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.6.0", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "hyper 1.6.0", - "libc", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] - -[[package]] -name = "hyperlocal" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "986c5ce3b994526b3cd75578e62554abd09f0899d6206de48b3e96ab34ccc8c7" -dependencies = [ - "hex", - "http-body-util", - "hyper 1.6.0", - "hyper-util", - "pin-project-lite", - "tokio", - "tower-service", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" - -[[package]] -name = "icu_properties" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" -dependencies = [ - "equivalent", - "hashbrown 0.15.2", - "serde", -] - -[[package]] -name = "indicatif" -version = "0.17.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" -dependencies = [ - "console", - "number_prefix", - "portable-atomic", - "unicode-width", - "web-time", -] - -[[package]] -name = "ipnet" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "jsonwebtoken" -version = "9.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde" -dependencies = [ - "base64 0.22.1", - "js-sys", - "pem", - "ring", - "serde", - "serde_json", - "simple_asn1", -] - -[[package]] -name = "jwt" -version = "0.16.0" +name = "futures-io" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6204285f77fe7d9784db3fdc449ecce1a0114927a51d5a41c4c7a292011c015f" -dependencies = [ - "base64 0.13.1", - "crypto-common", - "digest", - "hmac", - "serde", - "serde_json", - "sha2", -] +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] -name = "key-manager" -version = "0.1.0" +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ - "brane-ctl", - "clap", - "error-trace", - "humanlog", - "humantime", - "jsonwebtoken", - "log", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "lazy_static" -version = "1.5.0" +name = "futures-sink" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] -name = "libc" -version = "0.2.171" +name = "futures-task" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] -name = "libredox" -version = "0.1.3" +name = "futures-util" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ - "bitflags 2.9.0", - "libc", - "redox_syscall 0.5.10", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", ] [[package]] -name = "libsqlite3-sys" -version = "0.31.0" +name = "generic-array" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8935b44e7c13394a179a438e0cebba0fe08fe01b54f152e29a93b5cf993fd4" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "pkg-config", - "vcpkg", + "typenum", + "version_check", ] [[package]] -name = "libyml" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e281a65eeba3d4503a2839252f86374528f9ceafe6fed97c1d3b52e1fb625c1" - -[[package]] -name = "libyml" -version = "0.0.4" +name = "getrandom" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64804cc6a5042d4f05379909ba25b503ec04e2c082151d62122d5dcaa274b961" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] [[package]] -name = "linux-raw-sys" -version = "0.9.3" +name = "getrandom" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] [[package]] -name = "litemap" -version = "0.7.5" +name = "gimli" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] -name = "lock_api" -version = "0.4.12" +name = "h2" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" dependencies = [ - "autocfg", - "scopeguard", - "serde", + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] -name = "log" -version = "0.4.27" +name = "hashbrown" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" [[package]] -name = "matchit" -version = "0.7.3" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] -name = "memchr" -version = "2.7.4" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "migrations_internals" -version = "2.2.0" +name = "hex-literal" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" -dependencies = [ - "serde", - "toml", -] +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] -name = "migrations_macros" -version = "2.2.0" +name = "http" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb161cc72176cb37aa47f1fc520d3ef02263d67d661f44f05d05a079e1237fd" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ - "migrations_internals", - "proc-macro2", - "quote", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "mime" -version = "0.3.17" +name = "http-body" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] [[package]] -name = "mime_guess" -version = "2.0.5" +name = "http-body-util" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ - "mime", - "unicase", + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", ] [[package]] -name = "minimal-lexical" -version = "0.2.1" +name = "httparse" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] -name = "miniz_oxide" -version = "0.8.5" +name = "hyper" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ - "adler2", + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", ] [[package]] -name = "mio" -version = "1.0.3" +name = "hyper-rustls" +version = "0.27.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "03a01595e11bdcec50946522c32dde3fc6914743000a68b93000965f2f02406d" dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", ] [[package]] -name = "multer" -version = "2.1.0" +name = "hyper-tls" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", - "encoding_rs", - "futures-util", - "http 0.2.12", - "httparse", - "log", - "memchr", - "mime", - "spin", - "version_check", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", ] [[package]] -name = "names" -version = "0.1.0" -source = "git+https://github.com/Lut99/names-rs?tag=v0.1.0#6fbb94733dfe526f7e68e374846e3802bac88327" +name = "hyper-util" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc2fdfdbff08affe55bb779f33b053aa1fe5dd5b54c257343c17edfa55711bdb" dependencies = [ - "rand 0.8.5", + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "system-configuration", + "tokio", + "tower-service", + "tracing", + "windows-registry", ] [[package]] -name = "native-tls" -version = "0.2.14" +name = "iana-time-zone" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" dependencies = [ - "libc", + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", + "wasm-bindgen", + "windows-core", ] [[package]] -name = "nested-cli-parser" -version = "0.1.0" +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "unicode-segmentation", + "cc", ] [[package]] -name = "nom" -version = "7.1.3" +name = "icu_collections" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ - "memchr", - "minimal-lexical", + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", ] [[package]] -name = "nom_locate" -version = "4.2.0" +name = "icu_locale_core" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e3c83c053b0713da60c5b8de47fe8e494fe3ece5267b2f23090a07a053ba8f3" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" dependencies = [ - "bytecount", - "memchr", - "nom", + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", ] [[package]] -name = "num-bigint" -version = "0.4.6" +name = "icu_normalizer" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" dependencies = [ - "num-integer", - "num-traits", + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", ] [[package]] -name = "num-conv" -version = "0.1.0" +name = "icu_normalizer_data" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] -name = "num-integer" -version = "0.1.46" +name = "icu_properties" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" dependencies = [ - "num-traits", + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", ] [[package]] -name = "num-traits" -version = "0.2.19" +name = "icu_properties_data" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" [[package]] -name = "number_prefix" -version = "0.4.0" +name = "icu_provider" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] [[package]] -name = "object" -version = "0.36.7" +name = "idna" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "memchr", + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "oid-registry" -version = "0.8.1" +name = "idna_adapter" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ - "asn1-rs", + "icu_normalizer", + "icu_properties", ] [[package]] -name = "once_cell" -version = "1.21.3" +name = "indexmap" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +dependencies = [ + "equivalent", + "hashbrown", +] [[package]] -name = "openssl" -version = "0.10.71" +name = "indicatif" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" dependencies = [ - "bitflags 2.9.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", + "console", + "number_prefix", + "portable-atomic", + "unicode-width 0.2.1", + "web-time", ] [[package]] -name = "openssl-macros" -version = "0.1.1" +name = "indoc" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] +checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" [[package]] -name = "openssl-probe" -version = "0.1.6" +name = "ipnet" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] -name = "openssl-sys" -version = "0.9.106" +name = "iri-string" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", + "memchr", + "serde", ] [[package]] -name = "option-ext" -version = "0.2.0" +name = "is_ci" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" [[package]] -name = "os_info" -version = "3.10.0" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a604e53c24761286860eba4e2c8b23a0161526476b1de520139d69cdb85a6b5" -dependencies = [ - "log", - "serde", - "windows-sys 0.52.0", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] -name = "parking_lot" -version = "0.12.3" +name = "itoa" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] -name = "parking_lot_core" -version = "0.9.10" +name = "js-sys" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.5.10", - "smallvec", - "windows-targets 0.52.6", + "once_cell", + "wasm-bindgen", ] [[package]] -name = "pem" -version = "3.0.5" +name = "lazy_static" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" -dependencies = [ - "base64 0.22.1", - "serde", -] +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] -name = "percent-encoding" -version = "2.3.1" +name = "libc" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] -name = "pin-project" -version = "1.1.10" +name = "linux-raw-sys" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" -dependencies = [ - "pin-project-internal", -] +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] -name = "pin-project-internal" -version = "1.1.10" +name = "litemap" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] -name = "pin-project-lite" -version = "0.2.16" +name = "log" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] -name = "pin-utils" +name = "matchers" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] [[package]] -name = "pkg-config" -version = "0.3.32" +name = "memchr" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] -name = "policy" -version = "0.1.0" +name = "miette" +version = "7.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7" dependencies = [ - "async-trait", - "chrono", - "clap", - "error-trace", - "humanlog", - "log", - "serde", - "serde_json", - "warp", + "backtrace", + "backtrace-ext", + "cfg-if", + "miette-derive", + "owo-colors", + "supports-color", + "supports-hyperlinks", + "supports-unicode", + "terminal_size", + "textwrap", + "unicode-width 0.1.14", ] [[package]] -name = "policy" -version = "0.1.0" -source = "git+https://github.com/braneframework/policy-reasoner#42261e9751c320914c89cf49641bf7477bd1c313" +name = "miette-derive" +version = "7.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b" dependencies = [ - "async-trait", - "chrono", - "log", - "serde", - "serde_json", - "warp", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "policy-builder" -version = "0.1.0" -dependencies = [ - "clap", - "console", - "eflint-to-json 0.1.0", - "error-trace", - "humanlog", - "log", -] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "policy-reasoner" -version = "0.1.0" +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ - "async-trait", - "audit-logger 0.1.0", - "auth-resolver 0.1.0", - "base16ct", - "base64ct", - "brane-cfg", - "brane-shr 3.0.0 (git+https://github.com/braneframework/brane)", - "chrono", - "clap", - "deliberation 0.1.0", - "diesel", - "diesel_migrations", - "dotenvy", - "eflint-json", - "eflint-to-json 0.1.0", - "enum-debug", - "error-trace", - "graphql_client", - "humanlog", - "itertools 0.14.0", - "jsonwebtoken", - "log", - "nested-cli-parser", - "policy 0.1.0", - "reasonerconn 0.1.0", - "reqwest 0.12.15", - "serde", - "serde_json", - "serde_yml 0.0.11", - "sha2", - "specifications 3.0.0 (git+https://github.com/braneframework/brane)", - "srv 0.1.0", - "state-resolver 0.1.0", - "thiserror 2.0.12", - "tokio", - "uuid", - "warp", - "workflow 0.1.0", + "adler2", ] [[package]] -name = "portable-atomic" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" - -[[package]] -name = "powerfmt" -version = "0.2.0" +name = "mio" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] [[package]] -name = "ppv-lite86" -version = "0.2.21" +name = "native-tls" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ - "zerocopy", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] [[package]] -name = "problem_details" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c30ce00f18c85c0a9cfaecb51d7d2bce8ca36f2d7850b009b3ea166f2dca9d" +name = "no-op-logger" +version = "0.2.0" dependencies = [ - "http 0.2.12", - "http-serde", "serde", + "specifications", + "tracing", ] [[package]] -name = "proc-macro2" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +name = "no-op-reasoner" +version = "0.2.0" dependencies = [ - "unicode-ident", + "error-trace", + "serde", + "specifications", + "thiserror", + "tracing", ] [[package]] -name = "prost" -version = "0.12.6" +name = "nu-ansi-term" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ - "bytes", - "prost-derive 0.12.6", + "overload", + "winapi", ] [[package]] -name = "prost" -version = "0.13.5" +name = "num-traits" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "bytes", - "prost-derive 0.13.5", + "autocfg", ] [[package]] -name = "prost-derive" -version = "0.12.6" +name = "number_prefix" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools 0.12.1", - "proc-macro2", - "quote", - "syn 2.0.100", -] +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] -name = "prost-derive" -version = "0.13.5" +name = "object" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ - "anyhow", - "itertools 0.13.0", - "proc-macro2", - "quote", - "syn 2.0.100", + "memchr", ] [[package]] -name = "quinn" -version = "0.11.7" +name = "once_cell" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012" -dependencies = [ - "bytes", - "cfg_aliases", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls 0.23.25", - "socket2", - "thiserror 2.0.12", - "tokio", - "tracing", - "web-time", -] +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] -name = "quinn-proto" -version = "0.11.10" +name = "once_cell_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" -dependencies = [ - "bytes", - "getrandom 0.3.2", - "rand 0.9.0", - "ring", - "rustc-hash", - "rustls 0.23.25", - "rustls-pki-types", - "slab", - "thiserror 2.0.12", - "tinyvec", - "tracing", - "web-time", -] +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" [[package]] -name = "quinn-udp" -version = "0.5.11" +name = "openssl" +version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "541d0f57c6ec747a90738a52741d3221f7960e8ac2f0ff4b1a63680e033b4ab5" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "cfg_aliases", + "bitflags", + "cfg-if", + "foreign-types", "libc", "once_cell", - "socket2", - "tracing", - "windows-sys 0.59.0", + "openssl-macros", + "openssl-sys", ] [[package]] -name = "quote" -version = "1.0.40" +name = "openssl-macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", + "quote", + "syn", ] [[package]] -name = "r-efi" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" - -[[package]] -name = "r2d2" -version = "0.8.10" +name = "openssl-probe" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" -dependencies = [ - "log", - "parking_lot", - "scheduled-thread-pool", -] +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] -name = "rand" -version = "0.8.5" +name = "openssl-sys" +version = "0.9.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" dependencies = [ + "cc", "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "pkg-config", + "vcpkg", ] [[package]] -name = "rand" -version = "0.9.0" +name = "overload" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" -dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.3", - "zerocopy", -] +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "owo-colors" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] +checksum = "26995317201fa17f3656c36716aed4a7c81743a9634ac4c99c0eeda495db0cec" [[package]] -name = "rand_chacha" -version = "0.9.0" +name = "paste" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.3", -] +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] -name = "rand_core" -version = "0.6.4" +name = "percent-encoding" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.15", -] +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] -name = "rand_core" -version = "0.9.3" +name = "pin-project-lite" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom 0.3.2", -] +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] -name = "reasonerconn" +name = "pin-utils" version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "policy-reasoner" +version = "1.0.0" dependencies = [ - "anyhow", - "async-trait", - "audit-logger 0.1.0", "clap", - "eflint-json", - "enum-debug", + "console", + "eflint-haskell-reasoner", + "eflint-json-reasoner", + "eflint-to-json", "error-trace", - "humanlog", - "log", - "policy 0.1.0", - "serde", + "file-logger", + "file-resolver", + "miette", + "no-op-logger", + "no-op-reasoner", + "posix-reasoner", "serde_json", - "state-resolver 0.1.0", + "share", + "shlex", + "specifications", "tokio", - "transform", - "workflow 0.1.0", + "tracing", + "tracing-subscriber", + "workflow", ] [[package]] -name = "reasonerconn" -version = "0.1.0" -source = "git+https://github.com/braneframework/policy-reasoner#42261e9751c320914c89cf49641bf7477bd1c313" +name = "portable-atomic" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" + +[[package]] +name = "posix-reasoner" +version = "0.2.0" dependencies = [ - "anyhow", - "async-trait", - "audit-logger 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "eflint-json", - "enum-debug", - "log", - "policy 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", + "error-trace", "serde", "serde_json", - "state-resolver 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", + "specifications", + "thiserror", "tokio", - "transform", - "workflow 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", + "tracing", + "workflow", ] [[package]] -name = "redox_syscall" -version = "0.3.5" +name = "potential_utf" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" dependencies = [ - "bitflags 1.3.2", + "zerovec", ] [[package]] -name = "redox_syscall" -version = "0.5.10" +name = "proc-macro2" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ - "bitflags 2.9.0", + "unicode-ident", ] [[package]] -name = "redox_users" -version = "0.5.0" +name = "quote" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ - "getrandom 0.2.15", - "libredox", - "thiserror 2.0.12", + "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "regex" version = "1.11.1" @@ -3068,8 +1310,17 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -3080,108 +1331,65 @@ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.5", ] [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] -name = "reqwest" -version = "0.11.27" +name = "regex-syntax" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "hyper-tls 0.5.0", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration 0.5.1", - "tokio", - "tokio-native-tls", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "winreg", -] +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.15" +version = "0.12.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" +checksum = "e98ff6b0dbbe4d5a37318f433d4fc82babd21631f194d370409ceb2e40b2f0b5" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "encoding_rs", "futures-channel", "futures-core", "futures-util", - "h2 0.4.8", - "http 1.1.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-rustls", - "hyper-tls 0.6.0", + "hyper-tls", "hyper-util", "ipnet", "js-sys", "log", "mime", - "mime_guess", "native-tls", "once_cell", "percent-encoding", "pin-project-lite", - "quinn", - "rustls 0.23.25", - "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.2", - "system-configuration 0.6.1", + "sync_wrapper", "tokio", "tokio-native-tls", - "tokio-rustls", "tokio-util", - "tower 0.5.2", + "tower", + "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", - "windows-registry", ] [[package]] @@ -3192,7 +1400,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.16", "libc", "untrusted", "windows-sys 0.52.0", @@ -3200,32 +1408,17 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "2.1.1" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - -[[package]] -name = "rusticata-macros" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" -dependencies = [ - "nom", -] +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" [[package]] name = "rustix" -version = "1.0.3" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" dependencies = [ - "bitflags 2.9.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -3234,72 +1427,31 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.23.25" +version = "0.23.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" +checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" dependencies = [ "once_cell", - "ring", "rustls-pki-types", - "rustls-webpki 0.103.1", + "rustls-webpki", "subtle", "zeroize", ] -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" -dependencies = [ - "web-time", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" dependencies = [ - "ring", - "untrusted", + "zeroize", ] [[package]] name = "rustls-webpki" -version = "0.103.1" +version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef8b8769aaccf73098557a87cd1816b4f9c7c16811c9c77142aa695c16f2c03" +checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ "ring", "rustls-pki-types", @@ -3308,9 +1460,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" [[package]] name = "ryu" @@ -3327,44 +1479,13 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "scheduled-thread-pool" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" -dependencies = [ - "parking_lot", -] - -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "security-framework" version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -3381,12 +1502,6 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" - [[package]] name = "serde" version = "1.0.219" @@ -3404,7 +1519,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn", ] [[package]] @@ -3420,125 +1535,22 @@ dependencies = [ ] [[package]] -name = "serde_json_any_key" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2c409ca1209f6c4741028b9e1e56d973c868ffaef25ffbaf2471e486c2a74b3" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "serde_repr" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_test" -version = "1.0.177" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f901ee573cab6b3060453d2d5f0bae4e6d628c23c0a962ff9b5f1d7c8d4f1ed" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" -dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.8.0", - "serde", - "serde_derive", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "serde_yml" -version = "0.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ce6afeda22f0b55dde2c34897bce76a629587348480384231205c14b59a01f" -dependencies = [ - "indexmap 2.8.0", - "itoa", - "libyml 0.0.3", - "log", - "memchr", - "ryu", - "serde", - "serde_json", - "tempfile", -] - -[[package]] -name = "serde_yml" -version = "0.0.11" +name = "serde_urlencoded" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e76bab63c3fd98d27c17f9cbce177f64a91f5e69ac04cafe04e1bb25d1dc3c" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ - "indexmap 2.8.0", + "form_urlencoded", "itoa", - "libyml 0.0.4", - "log", - "memchr", "ryu", "serde", - "serde_json", - "tempfile", ] [[package]] -name = "sha1" -version = "0.10.6" +name = "sha2" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -3546,21 +1558,23 @@ dependencies = [ ] [[package]] -name = "sha2" -version = "0.10.8" +name = "sharded-slab" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ - "cfg-if", - "cpufeatures", - "digest", + "lazy_static", ] [[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +name = "share" +version = "0.1.0" +dependencies = [ + "indoc", + "miette", + "tempfile", + "tokio", +] [[package]] name = "shlex" @@ -3570,45 +1584,30 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" dependencies = [ "libc", ] -[[package]] -name = "simple_asn1" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror 2.0.12", - "time", -] - [[package]] name = "slab" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "smallvec" -version = "1.14.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3616,121 +1615,11 @@ dependencies = [ [[package]] name = "specifications" -version = "3.0.0" -source = "git+https://github.com/braneframework/brane#9acf0eda6fd6c13efe0c198801d586e6478efffb" -dependencies = [ - "anyhow", - "async-trait", - "base64 0.22.1", - "base64ct", - "chrono", - "const_format", - "enum-debug", - "futures", - "jsonwebtoken", - "log", - "parking_lot", - "prost 0.13.5", - "reqwest 0.12.15", - "semver", - "serde", - "serde_json", - "serde_test", - "serde_with", - "serde_yml 0.0.10", - "strum 0.27.1", - "strum_macros 0.27.1", - "thiserror 2.0.12", - "tonic 0.12.3", - "uuid", -] - -[[package]] -name = "specifications" -version = "3.0.0" -source = "git+https://github.com/epi-project/brane#7524309001d9ff347c8063747f2535a474a73565" -dependencies = [ - "anyhow", - "async-trait", - "base64 0.21.7", - "base64ct", - "chrono", - "const_format", - "enum-debug", - "futures", - "jsonwebtoken", - "log", - "num-traits", - "parking_lot", - "prost 0.12.6", - "reqwest 0.11.27", - "semver", - "serde", - "serde_json", - "serde_test", - "serde_with", - "serde_yml 0.0.10", - "strum 0.24.1", - "strum_macros 0.24.3", - "tonic 0.11.0", - "uuid", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "srv" -version = "0.1.0" -dependencies = [ - "audit-logger 0.1.0", - "auth-resolver 0.1.0", - "brane-ast 3.0.0 (git+https://github.com/braneframework/brane)", - "brane-exe 3.0.0 (git+https://github.com/braneframework/brane)", - "chrono", - "deliberation 0.1.0", - "error-trace", - "http 1.1.0", - "log", - "policy 0.1.0", - "problem_details", - "reasonerconn 0.1.0", - "serde", - "serde_json", - "state-resolver 0.1.0", - "tokio", - "uuid", - "warp", - "workflow 0.1.0", -] - -[[package]] -name = "srv" -version = "0.1.0" -source = "git+https://github.com/braneframework/policy-reasoner#42261e9751c320914c89cf49641bf7477bd1c313" +version = "0.2.0" dependencies = [ - "audit-logger 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "auth-resolver 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "brane-ast 3.0.0 (git+https://github.com/epi-project/brane)", - "brane-exe 3.0.0 (git+https://github.com/epi-project/brane)", - "chrono", - "deliberation 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "error-trace", - "http 1.1.0", - "log", - "policy 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "problem_details", - "reasonerconn 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", + "paste", "serde", - "serde_json", - "state-resolver 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", - "tokio", - "uuid", - "warp", - "workflow 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", + "share", ] [[package]] @@ -3739,25 +1628,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "state-resolver" -version = "0.1.0" -dependencies = [ - "async-trait", - "serde", - "workflow 0.1.0", -] - -[[package]] -name = "state-resolver" -version = "0.1.0" -source = "git+https://github.com/braneframework/policy-reasoner#42261e9751c320914c89cf49641bf7477bd1c313" -dependencies = [ - "async-trait", - "serde", - "workflow 0.1.0 (git+https://github.com/braneframework/policy-reasoner)", -] - [[package]] name = "strsim" version = "0.11.1" @@ -3765,102 +1635,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" - -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -dependencies = [ - "strum_macros 0.25.3", -] - -[[package]] -name = "strum" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" -dependencies = [ - "strum_macros 0.27.1", -] - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" +name = "subtle" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.100", -] +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] -name = "strum_macros" -version = "0.27.1" +name = "supports-color" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" +checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6" dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.100", + "is_ci", ] [[package]] -name = "subtle" -version = "2.6.1" +name = "supports-hyperlinks" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +checksum = "804f44ed3c63152de6a9f90acbea1a110441de43006ea51bcce8f436196a288b" [[package]] -name = "syn" -version = "1.0.109" +name = "supports-unicode" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] +checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" [[package]] name = "syn" -version = "2.0.100" +version = "2.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "e4307e30089d6fd6aff212f2da3a1f9e32f3223b1f010fb09b7c95f90f3ca1e8" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" @@ -3872,24 +1683,13 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys 0.5.0", + "syn", ] [[package]] @@ -3898,19 +1698,9 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.0", + "bitflags", "core-foundation", - "system-configuration-sys 0.6.0", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", + "system-configuration-sys", ] [[package]] @@ -3925,44 +1715,44 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.19.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "rustix", "windows-sys 0.59.0", ] [[package]] -name = "thiserror" -version = "1.0.69" +name = "terminal_size" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" dependencies = [ - "thiserror-impl 1.0.69", + "rustix", + "windows-sys 0.59.0", ] [[package]] -name = "thiserror" -version = "2.0.12" +name = "textwrap" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" dependencies = [ - "thiserror-impl 2.0.12", + "unicode-linebreak", + "unicode-width 0.2.1", ] [[package]] -name = "thiserror-impl" -version = "1.0.69" +name = "thiserror" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "thiserror-impl", ] [[package]] @@ -3973,76 +1763,38 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", -] - -[[package]] -name = "time" -version = "0.3.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", + "syn", ] [[package]] -name = "time-core" -version = "0.1.4" +name = "thread_local" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" - -[[package]] -name = "time-macros" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ - "num-conv", - "time-core", + "cfg-if", ] [[package]] name = "tinystr" -version = "0.7.6" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ "displaydoc", "zerovec", ] -[[package]] -name = "tinyvec" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.44.2" +version = "1.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" dependencies = [ "backtrace", "bytes", "libc", "mio", - "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -4050,16 +1802,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.5.0" @@ -4068,7 +1810,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn", ] [[package]] @@ -4087,183 +1829,52 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.25", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-tar" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5714c010ca3e5c27114c1cdeb9d14641ace49874aa5626d7149e47aedace75" -dependencies = [ - "filetime", - "futures-core", - "libc", - "redox_syscall 0.3.5", - "tokio", - "tokio-stream", - "xattr", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", -] - -[[package]] -name = "tokio-util" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" -dependencies = [ - "indexmap 2.8.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tonic" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" -dependencies = [ - "async-stream", - "async-trait", - "axum 0.6.20", - "base64 0.21.7", - "bytes", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "hyper-timeout 0.4.1", - "percent-encoding", - "pin-project", - "prost 0.12.6", + "rustls", "tokio", - "tokio-stream", - "tower 0.4.13", - "tower-layer", - "tower-service", - "tracing", ] [[package]] -name = "tonic" -version = "0.12.3" +name = "tokio-util" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" dependencies = [ - "async-stream", - "async-trait", - "axum 0.7.9", - "base64 0.22.1", "bytes", - "h2 0.4.8", - "http 1.1.0", - "http-body 1.0.1", - "http-body-util", - "hyper 1.6.0", - "hyper-timeout 0.5.2", - "hyper-util", - "percent-encoding", - "pin-project", - "prost 0.13.5", - "socket2", + "futures-core", + "futures-sink", + "pin-project-lite", "tokio", - "tokio-stream", - "tower 0.4.13", - "tower-layer", - "tower-service", - "tracing", ] [[package]] name = "tower" -version = "0.4.13" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "indexmap 1.9.3", - "pin-project", "pin-project-lite", - "rand 0.8.5", - "slab", + "sync_wrapper", "tokio", - "tokio-util", "tower-layer", "tower-service", - "tracing", ] [[package]] -name = "tower" -version = "0.5.2" +name = "tower-http" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "0fdb0c213ca27a9f57ab69ddb290fd80d970922355b83ae380b395d3986b8a2e" dependencies = [ - "futures-core", + "bitflags", + "bytes", "futures-util", + "http", + "http-body", + "iri-string", "pin-project-lite", - "sync_wrapper 1.0.2", - "tokio", + "tower", "tower-layer", "tower-service", ] @@ -4286,7 +1897,6 @@ version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4294,65 +1904,65 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn", ] [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", + "valuable", ] [[package]] -name = "transform" +name = "tracing-log" version = "0.2.0" -source = "git+https://github.com/Lut99/transform-rs?tag=v0.2.0#ea708962d9a770c1f89c3bce0b9309dfe48656a6" - -[[package]] -name = "try-lock" -version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] [[package]] -name = "tungstenite" -version = "0.21.0" +name = "tracing-subscriber" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 1.1.0", - "httparse", - "log", - "rand 0.8.5", - "sha1", - "thiserror 1.0.69", - "url", - "utf-8", + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", ] [[package]] -name = "typenum" -version = "1.18.0" +name = "try-lock" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "unicase" -version = "2.8.1" +name = "typenum" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "unicode-ident" @@ -4361,22 +1971,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] -name = "unicode-segmentation" -version = "1.12.0" +name = "unicode-linebreak" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-width" -version = "0.2.0" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] -name = "unicode-xid" -version = "0.2.6" +name = "unicode-width" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" [[package]] name = "untrusted" @@ -4395,18 +2005,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -4420,15 +2018,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] -name = "uuid" -version = "1.16.0" +name = "valuable" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" -dependencies = [ - "getrandom 0.3.2", - "rand 0.9.0", - "serde", -] +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vcpkg" @@ -4451,40 +2044,11 @@ dependencies = [ "try-lock", ] -[[package]] -name = "warp" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4378d202ff965b011c64817db11d5829506d3404edeadb61f190d111da3f231c" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "headers", - "http 0.2.12", - "hyper 0.14.32", - "log", - "mime", - "mime_guess", - "multer", - "percent-encoding", - "pin-project", - "scoped-tls", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-tungstenite", - "tokio-util", - "tower-service", - "tracing", -] - [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" @@ -4517,7 +2081,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.100", + "syn", "wasm-bindgen-shared", ] @@ -4552,7 +2116,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4623,15 +2187,15 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", "windows-link", "windows-result", - "windows-strings 0.4.0", + "windows-strings", ] [[package]] @@ -4642,7 +2206,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn", ] [[package]] @@ -4653,7 +2217,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn", ] [[package]] @@ -4664,58 +2228,40 @@ checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" [[package]] name = "windows-registry" -version = "0.4.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" +checksum = "b3bab093bdd303a1240bb99b8aba8ea8a69ee19d34c9e2ef9594e708a4878820" dependencies = [ + "windows-link", "windows-result", - "windows-strings 0.3.1", - "windows-targets 0.53.0", + "windows-strings", ] [[package]] name = "windows-result" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4724,22 +2270,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -4748,281 +2279,92 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - -[[package]] -name = "winnow" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wit-bindgen-rt" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.0", -] - -[[package]] -name = "workflow" -version = "0.1.0" -dependencies = [ - "brane-ast 3.0.0 (git+https://github.com/braneframework/brane)", - "brane-exe 3.0.0 (git+https://github.com/braneframework/brane)", - "brane-shr 3.0.0 (git+https://github.com/braneframework/brane)", - "clap", - "eflint-json", - "enum-debug", - "error-trace", - "humanlog", - "log", - "names", - "num-traits", - "rand 0.9.0", - "serde", - "serde_json", - "specifications 3.0.0 (git+https://github.com/braneframework/brane)", - "transform", + "bitflags", ] [[package]] name = "workflow" -version = "0.1.0" -source = "git+https://github.com/braneframework/policy-reasoner#42261e9751c320914c89cf49641bf7477bd1c313" +version = "0.2.0" dependencies = [ - "brane-ast 3.0.0 (git+https://github.com/epi-project/brane)", - "brane-exe 3.0.0 (git+https://github.com/epi-project/brane)", - "eflint-json", "enum-debug", - "log", - "num-traits", - "rand 0.8.5", "serde", - "specifications 3.0.0 (git+https://github.com/epi-project/brane)", - "transform", ] -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - [[package]] name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - -[[package]] -name = "x509-parser" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569f339c0c402346d4a75a9e39cf8dad310e287eef1ff56d4c68e5067f53460" -dependencies = [ - "asn1-rs", - "data-encoding", - "der-parser", - "lazy_static", - "nom", - "oid-registry", - "rusticata-macros", - "thiserror 2.0.12", - "time", -] - -[[package]] -name = "xattr" -version = "1.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d65cbf2f12c15564212d48f4e3dfb87923d25d611f2aed18f4cb23f0413d89e" -dependencies = [ - "libc", - "rustix", -] +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "yoke" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ "serde", "stable_deref_trait", @@ -5032,36 +2374,16 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn", "synstructure", ] -[[package]] -name = "zerocopy" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - [[package]] name = "zerofrom" version = "0.1.6" @@ -5079,7 +2401,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn", "synstructure", ] @@ -5089,11 +2411,22 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + [[package]] name = "zerovec" -version = "0.10.4" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" dependencies = [ "yoke", "zerofrom", @@ -5102,11 +2435,11 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn", ] diff --git a/Cargo.toml b/Cargo.toml index 0271159..876c03c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,121 +1,120 @@ +[workspace] +resolver = "2" +members = [ + # Implementations + "lib/reasoners/eflint-haskell", + "lib/reasoners/eflint-json", + "lib/reasoners/no-op", + "lib/reasoners/posix", + "lib/loggers/file", + "lib/loggers/no-op", + "lib/resolvers/file", + + # Library + "lib/eflint-to-json", + + # Specifications + "lib/spec", + "lib/workflow", + "lib/share", +] + +[workspace.package] +repository = "https://github.com/BraneFramework/policy-reasoner" +license = "Apache-2.0" + + [package] name = "policy-reasoner" -description = "Long-awaited implementation of the EPI Framework checkers, which reason about policies and contrain systems like [Brane](https://github.com/braneframework/brane)" -rust-version = "1.82" +version = "1.0.0" edition = "2021" -version.workspace = true +rust-version = "1.78.0" +authors = ["Tim Müller", "Bas Kloosterman", "Daniel Voogsgerd"] repository.workspace = true -authors.workspace = true license.workspace = true +description = "A library for using several different reasoning backends to determine if a particular workflow is allowed by policy or not." -[workspace.package] -version = "0.1.0" -repository = "https://github.com/braneframework/policy-reasoner" -authors = ["Bas Kloosterman", "Tim Müller"] -license = "Apache-2.0" +[[example]] +name = "eflint-haskell" +path = "./examples/eflint_haskell.rs" +required-features = ["eflint-haskell-reasoner", "file-logger"] -[dependencies] -# Crates.io -async-trait = "0.1.67" -base64ct = { version = "1.6", features = ["std"] } -chrono = "0.4.35" -clap = { version = "4.5.6", features = ["derive", "env"] } -diesel = { version = "2.2.3", features = ["sqlite", "chrono", "r2d2"] } -dotenvy = "0.15.7" -itertools = "0.14.0" -jsonwebtoken = "9.2.0" -log = "0.4.22" -reqwest = { version = "0.12.0", features = ["json"] } -serde = { version = "1.0.204", features = ["derive"] } -serde_json = { version = "1.0.120", features = ["raw_value"] } -serde_yaml = { version = "0.0.11", package = "serde_yml" } -thiserror = "2.0.0" -tokio = { version = "1.38.0", features = ["full"] } -uuid = { version = "1.7.0", features = ["serde", "v4"], optional = true } -warp = "0.3" - -# Path -audit-logger = { path = "lib/audit-logger" } -auth-resolver = { path = "lib/auth-resolver" } -deliberation = { path = "./lib/deliberation" } -nested-cli-parser = { path = "lib/nested-cli-parser" } -policy = { path = "./lib/policy" } -reasonerconn = { path = "./lib/reasonerconn" } -srv = { path = "lib/srv" } -state-resolver = { path = "lib/state-resolver" } -workflow = { path = "./lib/workflow" } - -# Workspace dependencies -enum-debug.workspace = true -error-trace.workspace = true -humanlog.workspace = true +[[example]] +name = "eflint-json" +path = "./examples/eflint_json.rs" +required-features = ["eflint-json-reasoner", "eflint-to-json", "file-logger"] -# GitLab -eflint-json = { git = "https://gitlab.com/eflint/json-spec-rs.git", branch = "incorrect-is-invariant" } +[[example]] +name = "posix" +path = "./examples/posix.rs" +required-features = ["posix-reasoner", "file-logger", "serde", "workflow"] -# Brane -brane-cfg = { git = "https://github.com/braneframework/brane", optional = true } -brane-shr = { git = "https://github.com/braneframework/brane" } -specifications = { git = "https://github.com/braneframework/brane" } +[[example]] +name = "no-op" +path = "./examples/no_op.rs" +required-features = ["no-op-reasoner", "file-logger"] -# Weird -graphql_client = { version = "0.14.0", optional = true } +[dependencies] +eflint-haskell-reasoner = { path = "./lib/reasoners/eflint-haskell", optional = true } +eflint-json-reasoner = { path = "./lib/reasoners/eflint-json", optional = true } +no-op-reasoner = { path = "./lib/reasoners/no-op", optional = true } +posix-reasoner = { path = "./lib/reasoners/posix", optional = true } +file-logger = { path = "./lib/loggers/file", optional = true } +no-op-logger = { path = "./lib/loggers/no-op", optional = true } +file-resolver = { path = "./lib/resolvers/file", optional = true } +eflint-to-json = { path = "./lib/eflint-to-json", features = ["async-tokio"], optional = true } +spec = { path = "./lib/spec", package = "specifications" } +workflow = { path = "./lib/workflow", optional = true } -[build-dependencies] -base16ct = { version = "0.2", features = ["alloc"] } -diesel = { version = "2.2.3", default-features = false, features = ["sqlite"] } -diesel_migrations = "2.2.0" -sha2 = "0.10.6" +share = { path = "lib/share" } -eflint-to-json = { path = "./lib/eflint-to-json" } +miette = { version = "7.0.0", features = ["fancy"] } -# Workspace dependencies + +[dev-dependencies] +clap = { version = "4.0.0", features = ["derive"] } +console = "0.15.0" error-trace.workspace = true +serde_json = "1.0.29" +shlex = "1.0.0" +tracing = "0.1.37" +tracing-subscriber = { version = "0.3.0", features = ["env-filter"] } +tokio = { version = "1.44.2", default-features = false, features = ["fs", "io-std", "macros", "rt"] } + [features] -brane-api-resolver = ["dep:graphql_client", "dep:brane-cfg", "dep:uuid"] -leak-public-errors = [] +default = [] +all = ["reasoners", "loggers", "resolvers", "auxillary"] -[lints.clippy] -# I daren't listen to this, I'm pretty sure new Rust versions claim the opposite -redundant_static_lifetimes = "allow" +reasoners = ["eflint-haskell-reasoner", "eflint-json-reasoner", "no-op-reasoner", "posix-reasoner"] +# reasoners = ["eflint-json-reasoner", "no-op-reasoner"] +eflint-haskell-reasoner = ["dep:eflint-haskell-reasoner"] +eflint-json-reasoner = ["dep:eflint-json-reasoner"] +no-op-reasoner = ["dep:no-op-reasoner"] +posix-reasoner = ["dep:posix-reasoner"] +loggers = ["file-logger", "no-op-logger"] +file-logger = ["dep:file-logger"] +no-op-logger = ["dep:no-op-logger"] -[workspace] -resolver = "2" -members = [ - "lib/auth-resolver", - "lib/deliberation", - "lib/eflint-to-json", - "lib/policy", - "lib/reasonerconn", - "lib/srv", - "lib/state-resolver", - "lib/workflow", - "lib/audit-logger", - "lib/nested-cli-parser", +resolvers = ["file-resolver"] +file-resolver = ["dep:file-resolver"] + +auxillary = ["eflint-to-json", "workflow"] +eflint-to-json = ["dep:eflint-to-json"] +workflow = ["dep:workflow"] + +serde = ["workflow/serde"] - "tools/checker-client", - "tools/key-manager", - "tools/policy-builder", -] [workspace.dependencies] # The infamous lut99 crate set -enum-debug = { git = "https://github.com/Lut99/enum-debug", tag = "v1.1.0", features = [ - "derive", -] } -error-trace = { git = "https://github.com/Lut99/error-trace-rs", tag = "v3.0.0" } -humanlog = { git = "https://github.com/Lut99/humanlog-rs", tag = "v0.2.0" } -names = { git = "https://github.com/Lut99/names-rs", tag = "v0.1.0", default-features = false, features = [ - "rand", - "three-lowercase", - "three-usualcase", -] } -transform = { git = "https://github.com/Lut99/transform-rs", tag = "v0.2.0" } +enum-debug = { git = "https://github.com/Lut99/enum-debug", tag = "v1.1.0", features = ["derive"] } +error-trace = "3.1.0" # Eflint +# NOTE: For now, we must skip the redirect. See eflint-json = { git = "https://gitlab.com/eflint/json-spec-rs.git", branch = "incorrect-is-invariant" } diff --git a/README.md b/README.md index 836398a..0a6d6ba 100644 --- a/README.md +++ b/README.md @@ -10,187 +10,119 @@ Implements the famous policy reasoner, known as `checker` in Brane terminology. This project is complemented by the [Policy Reasoner GUI](https://github.com/braneframework/policy-reasoner-gui). +## Project structure +The project structure is described in [`ARCHITECTURE.md`](ARCHITECTURE.md). + + ## Installation -This section describes how to install the policy reasoner in isolation. It is automatically built as the `brane-chk` service in [Brane](https://github.com/braneframework/brane). +This section describes how to prepare your system to run the policy reasoner in isolation. If you want to use it in the context of Brane, note that it installs it by itself as part of the [`brane-chk`](https://github.com/BraneFramework/brane/tree/main/brane-chk)-service. + +The various backends of the reasoner are executable as standalone binaries in the `examples/`-directory. They simply take a policy as input, run it, and show you the verdict that would be reported to services like Brane. +### eFLINT Haskell backend +The eFLINT Haskell backend relies on your system to have an `eflint-repl`-binary available to call to evaluate policy. -### Compiling `eflint-server` (and `eflint-json`) -By default, this repository uses a connector that runs the eFLINT JSON Specification. That means that in addition to the policy reasoner itself, the _actual_ eFLINT reasoner also has to be built. +As such, install the Haskell implementation of eFLINT first. See the [README.md](https://gitlab.com/eflint/haskell-implementation) at the repository for up-to-date instructions. If you don't or cannot install Haskell to compile the binary, you can also use the Docker image; then, when running the example, be sure to specify a different command for running the `eflint-repl` binary (see the `--eflint-cmd`-option). -This project relies on the [eFLINT GO server](https://github.com/Olaf-Erkemeij/eflint-server) (or rather, the fork [here](https://github.com/epi-project/eflint-server-go)). +### eFLINT JSON backend +The eFLINT JSON backend relies on you running the `eflint-server`-binary from the -repository. The latest release will have precompiled binaries for Linux x86-64 and Arm 64-bit; or, alternatively, you can compile the binary yourself by running the steps below. -To install, clone the repository and use the [Go compiler](https://go.dev/doc/install) to build it: -```bash -git clone https://github.com/epi-project/eflint-server-go && cd eflint-server-go +First, install the [Go compiler](https://go.dev/doc/install). Then, run the following commands to clone the appropriate repository and compile the server binary: +```sh +git clone https://github.com/BraneFramework/eflint-server-go && cd eflint-server-go cd cmd/eflint-server go build . ``` -This will produce `cmd/eflint-server/eflint-server`, which is the binary that must be run later. - -If you are on Linux x86/64, you can also simply download the precompiled binary for the `eflint-server` [here](https://github.com/epi-project/eflint-server-go/raw/main/eflint-server). - +This will produce `cmd/eflint-server/eflint-server`, which is the binary that you should execute in the background of the policy reasoner binary. See how to do that below. -### Setting up the database -The database setup is done automatically by `build.rs` if it isn't found already. +### no-op backend +The no-op backend does not require additional system dependencies. Simply compile it and you're ready to go. -If you somehow have to setup a manual database, you should first install the `diesel-cli` that can apply the migrations though the command-line: -```bash -cargo install diesel_cli --no-default-features --feature sqlite -``` - -Next, run the following commands to create the `data/policy.db`-file: -```bash -mkdir data && touch data/policy.db -diesel migration run --database-url data/policy.db -``` +### POSIX backend +The POSIX backend does not require additional system dependencies. Simply compile it and you're ready to go. ## Running -Running is quite straightforwardly done using Cargo's `run`-subcommand. However, there are some details, so read below: +This section describes how to run the example binaries in the [`examples/`](examples/)-folder in this project. -### Generating keys & tokens -The policy reasoner features two endpoints, the _deliberation endpoint_, and the _policy expert endpoint_ or _management endpoint_ (see [below](#usage)). Both of these are protected by the [JSON Web Key Sets](https://auth0.com/docs/secure/tokens/json-web-tokens/json-web-key-sets) [`examples/config/jwk_set_delib.json`](examples/config/jwk_set_delib.json) and [`examples/config/jwk_set_expert.json`](examples/config/jwk_set_expert.json), respectively. - -It is recommended to change the default provided keys, as these are for testing purposes only. You can do so using the `key-manager` tool: -```rust -cargo run --package key-manager -- generate jwk ./examples/config/jwk_set_delib.json -cargo run --package key-manager -- generate jwk ./examples/config/jwk_set_expert.json -``` +We will once again enumerate the steps for every backend binary. -Then, you can generate tokens that can be used to login using: -```bash -cargo run --package key-manager -- generate jwt -k ./examples/config/jwk_set_delib.json ./jwt_delib.json -cargo run --package key-manager -- generate jwt -k ./examples/config/jwk_set_expert.json ./jwt_expert.json +### eFLINT Haskell backend +To run the eFLINT Haskell backend, run: +```sh +cargo run --example eflint-haskell --features eflint-haskell-reasoner,file-logger -- ``` -where `` should be the name of the user using the JWT, `` the name of the system they are accessing through (if it matters; otherwise, just use the same value as ``) and `` is the time the JWT is valid for. For example: -```bash -cargo run --package key-manager -- generate jwt -k ./examples/config/jwk_set_delib.json ./jwt_delib.json amy site-a-worker 31d -cargo run --package key-manager -- generate jwt -k ./examples/config/jwk_set_expert.json ./jwt_expert.json amy site-a-worker 31d +Optionally, if your downloaded `eflint-repl` binary is executable by another command than simply that, give it with the `--eflint-cmd`-option. For example, when running the Docker version: +```sh +cargo run --example eflint-haskell --features eflint-haskell-reasoner,file-logger -- --eflint-cmd 'docker run -it --rm eflint repl' ``` +The reasoner will evaluate the policy file specified, and analyse the trace of results produced by the binary to give a verdict. It will be shown to you on the terminal. -### Backend reasoner -If you're running a backend reasoner like eFLINT's, run that first. Simply run: -```bash -./cmd/eflint-server/eflint-server +### eFLINT JSON backend +To run the eFLINT JSON backend, first run the `eflint-server` binary in a separate terminal window: +```sh +./eflint-server ``` -from the root of the closed `eflint-server-go`-repository (see [above](#compiling-eflint-server-and-eflint-json)). Note that you have to leave this process running for as long as the policy reasoner itself runs. - - -### The Policy Reasoner -To run the `policy-reasoner`, use the `cargo run`-command to build and execute it automatically. - -Note that doing so will: -- Automatically compile the eFLINT DSL interface to eFLINT JSON; and -- Generate the `data/policy.db` file if it doesn't already exist. - -If the default settings work for you, run: -```bash -cargo run --release -``` -to launch the reasoner. - -By default, the former downloads the precpompiled Linux x86/64 binary from the [fork](https://github.com/epi-project/eflint-server-go). If you're in another system, compile the `eflint-to-json` binary yourself (same procedure as for the `eflint-server`, but replace the latter term with the former in the process) and then give it as an environment variable: -```bash -EFLINT_TO_JSON_PATH="/cmd/eflint-to-json/eflint-to-json" cargo run --release +It will then report to you the address where the server may be reached. Note it down, and then run the example in another terminal window: +```sh +cargo run --example eflint-json --features eflint-json-reasoner,eflint-to-json,file-logger -- --address
``` +where `
` is the address you copied from the `eflint-server` output. +The eFLINT file can either be given in eFLINT DSL syntax, or the JSON syntax. You can use the `--dsl` and `--json` flags to tell the binary which of the two you are giving. Omitting it will default to `--dsl`. -## Usage -> The [Policy Reasoner GUI](https://github.com/braneframework/policy-reasoner-gui) provides an alternative interface to the Policy Reasoner. You can consult that repository for more information on using it. +If you are specifying the DSL syntax, the binary will attempt to automatically download the `eflint-to-json` binary for your system from the internet. It it fails, or you have another reason for preferring otherwise, use the `--eflint-path`-option to refer to an existing binary instead. -The Policy Reasoner implements two endpoints: -- The _deliberation endpoint_ is used by systems using the reasoners to consult policy; and -- The _policy expert endpoint_ or _management endpoint_ is used by policy experts to manage policy. +The reasoner will evaluate the policy file specified, and analyse the trace of results produced by the binary to give a verdict. It will be shown to you on the terminal. -Both require different a JWT to access, which you can generate by following the [section above](#generating-keys--tokens). These should be given as [Bearer-tokens](https://swagger.io/docs/specification/authentication/bearer-authentication/) in the Authorization header of every request, e.g., -```http -Authorization: Bearer +### no-op backend +The no-op backend is the simplest to use, as it does not do anything. Simply hit: +```sh +cargo run --example no-op --features no-op-reasoner,file-logger ``` - -With the keys set, you can access the following endpoints: -- Deliberation API - - `POST v1/deliberation/execute-workflow`: Ask if the reasoner would be OK with participating in the given workflow. - - As a body, a JSON object should be given with: - - `use_case`: A string that defines the use-case for which this request is done for. Currently only relevant when using the `BraneApiStateResolver` to choose which central registry to ask for state. - - `workflow`: A nested JSON Object that represents Brane's [WIR](https://wiki.enablingpersonalizedinterventions.nl/specification/spec/wir/introduction.html) (i.e., the input workflow). - - The response is a JSON object with: - - `verdict`: The verdict of the checker, which is either a JSON string `"allow"` or a JSON string `"deny"`. - - `verdict_reference`: A JSON String with a UUID that can be traced back in the logs to explain the verdict. - - `signature`: A JSON string that carries the checker's signature (unimplemented, currently dummy implementation). - - `POST v1/deliberation/execute-task`: Ask if the reasoner would be OK with executing a particular task in the given workflow. - - As a body, a JSON object should be given with: - - `use_case`: A string that defines the use-case for which this request is done for. Currently only relevant when using the `BraneApiStateResolver` to choose which central registry to ask for state. - - `workflow`: A nested JSON Object that represents Brane's [WIR](https://wiki.enablingpersonalizedinterventions.nl/specification/spec/wir/introduction.html) (i.e., the input workflow). - - `task_id`: The identifier of the task that is asked about. Given as an array of two elements, with either `
` or the function ID of a specific function as first element, and the edge index within that function as second element (see the [WIR](https://wiki.enablingpersonalizedinterventions.nl/specification/spec/wir/introduction.html) for more information). - - The response is a JSON object with: - - `verdict`: The verdict of the checker, which is either a JSON string `"allow"` or a JSON string `"deny"`. - - `verdict_reference`: A JSON String with a UUID that can be traced back in the logs to explain the verdict. - - `signature`: A JSON string that carries the checker's signature (unimplemented, currently dummy implementation). - - `POST v1/deliberation/access-data`: Ask if the reasoner would be OK with transferring a particular dataset to be used as input to the given task in the given workflow OR as result of the given workflow. - - As a body, a JSON object should be given with: - - `use_case`: A string that defines the use-case for which this request is done for. Currently only relevant when using the `BraneApiStateResolver` to choose which central registry to ask for state. - - `workflow`: A nested JSON Object that represents Brane's [WIR](https://wiki.enablingpersonalizedinterventions.nl/specification/spec/wir/introduction.html) (i.e., the input workflow). - - `task_id`: An _optional_ identifier of the task that is asked about. Given as an array of two elements, with either `
` or the function ID of a specific function as first element, and the edge index within that function as second element (see the [WIR](https://wiki.enablingpersonalizedinterventions.nl/specification/spec/wir/introduction.html) for more information). - If this identifier is omitted, it means that instead this workflow returns a result to the user submitting it and we're asking if that transfer would be OK. - - `data_id`: The ID of the dataset/intermediate result that we're asking about. - - The response is a JSON object with: - - `verdict`: The verdict of the checker, which is either a JSON string `"allow"` or a JSON string `"deny"`. - - `verdict_reference`: A JSON String with a UUID that can be traced back in the logs to explain the verdict. - - `signature`: A JSON string that carries the checker's signature (unimplemented, currently dummy implementation). -- Management API - - `GET v1/management/policies`: Retrieve the list of all policy versions on the reasoner. - - No body is required for this request. - - The call returns a JSON Array of policy versions stored on the reasoner, each of which is a JSON Object with: - - `creator`: An _optional_ JSON String with the name of the user that submitted the workflow. - - `created_at`: The time the policy was uploaded. - - `version`: The ID of this version, as a formatted time string. - - `version_description`: The description for this specific version. - - `reasoner_connector_context`: The hash of the context for which this policy is valid. - - `POST v1/management/policies`: Push a new policy version to the reasoner. - - The body of this request should be a JSON Object with: - - `description`: An _optional_ JSON String that provides a generic description for policy in this reasoner. You can expect this one to be duplicate across versions. - - `version_description`: A JSON String that provides a short description or commit message for this version of the policy. - - `content`: A JSON Array with nested JSON Objects with: - - `reasoner`: The string identifier that determines the reasoning backend for which this policy is meant (for the eFLINT backend, this is `eflint-json`). - - `reasoner_version`: A JSON String that denotes the version of the backend reasoner for which this policy is meant (for the eFLINT backend, this is `0.1.0`). - - `content`: The content of the policy. This is arbitrary other JSON, and will be passed as-is to the backend connector that translates it to the reasoner implemented. - - The request returns a JSON Object with the same fields to confirm the policy has been uploaded. - - `GET v1/management/policies/:id`: Retrieve the contents of a particular policy version with identifier `:id`. - - No body is required for this request. - - A JSON Object is returned that contains the requested policy. The fields are indentical as returned by `POST v1/management/policies`. - - `GET v1/management/policies/active`: Get the ID of the currently active policy. - - No body is required for this request. - - A JSON Object is returned that contains the requested policy. The fields are indentical as returned by `POST v1/management/policies`. - - `PUT v1/management/policies/active`: Update the currently active policy. - - The body of this request should be a JSON Object with: - - `version`: A JSON integer that is the ID of the policy to set active. - - A JSON Object is returned that contains the policy to which the reasoner has switched. The fields are indentical as returned by `POST v1/management/policies`. - - `DELETE v1/management/policies/active`: De-active the currently active policy, reverting to "deny all" policy. - - No body is required for this request. - - No result is returned by this request. - -For example, using [curl](https://curl.se/): -```bash -# Run this first to set the keys! -export JWT_DELIB="$(cat ./jwt_delib.json)" -export JWT_EXPERT="$(cat ./jwt_expert.json)" +and let it do the rest. It will tell you the verdict of the reasoner at the end of the file (which is also OK). + +### POSIX backend +The POSIX backend does not accept a single policy file, but instead a workflow that represents the scenario and a config that represents the policy. + +The workflow file should be given as a JSON serialization of the `Workflow`-struct provided by the [`workflow`](lib/workflow/)-crate. The best documentation is the Rust struct itself; or, alternatively, refer to examples in the [`tests/workflow`](tests/workflow/)-folder. + +The config file is also given as JSON, but has a simpler syntax. For example (using illegal comments to show you what's what): +```json +{ + // The location identifier of the worker for which this policy is written. + "id": "amy", + // Maps datasets to policy information + "data": { + // The workflow identifier of the target dataset + "some_dataset": { + // The path where it resides. This may actually be some other file + // than the dataset itself if you want to separate the permissions. + "path": "/home/pi/some_dataset", + // Defines how _workflow users_ map to _POSIX users_ + "user_map": { + "bob": { + // This is the user ID of the user to which `bob` maps + "uid": 1000, + // This is a list of group IDs which the user is + // additionally a member of. + "gids": [1000, 1001, 1002] + } + } + } + + // More data mappings ... + } +} ``` -```bash -# Check a workflow! -curl -X POST -H "Authorization: Bearer $JWT_DELIB" -H "Content-Type: application/json" -d "@tests/deliberation/execute-workflow.json" localhost:3030/v1/deliberation/execute-workflow +Once you're created a workflow and a config file, you can run the reasoner on them with: +```sh +cargo run --example posix --features posix-reasoner,file-logger,serde,workflow -- --workflow --config ``` -```bash -# Push a new policy! -curl -X POST -H "Authorization: Bearer $JWT_EXPERT" -H "Content-Type: application/json" -d "@tests/management/add-tautology.json" localhost:3030/v1/management/policies -``` - -```bash -# Make a policy active! -curl -X PUT -H "Authorization: Bearer $JWT_EXPERT" -H "Content-Type: application/json" -d '{ "version": 1 }' localhost:3030/v1/management/policies/active -``` +If you omit the `--workflow` option, the binary will attempt to read it from stdin instead. ## Contribution diff --git a/build.rs b/build.rs deleted file mode 100644 index e9e9b3b..0000000 --- a/build.rs +++ /dev/null @@ -1,152 +0,0 @@ -// BUILD.rs -// by Lut99 -// -// Created: -// 13 Dec 2023, 11:45:11 -// Last edited: -// 12 Jun 2024, 17:49:49 -// Auto updated? -// Yes -// -// Description: -//! Build script for the main `policy-reasoner` executable. -//! -//! In particular, charged with compiling the eFLINT interface to eFLINT JSON before it can be included in the executable. -// - -use std::env::VarError; -use std::fs::File; -use std::io::Write; -use std::path::PathBuf; -use std::{env, fs}; - -use diesel::{Connection as _, SqliteConnection}; -use diesel_migrations::{FileBasedMigrations, MigrationHarness}; -use eflint_to_json::compile; -use error_trace::trace; -use sha2::{Digest as _, Sha256}; - -/***** HELPERS *****/ -/// Wraps around another Writer to always Write while updating a hash of whatever we write. -struct HashWriter(W, Sha256); -impl HashWriter { - /// Constructor for the HashWriter that initializes its digest. - /// - /// # Arguments - /// - `writer`: The [`Write`]r to wrap. - /// - /// # Returns - /// A new instance of a HashWriter. - #[inline] - fn new(writer: W) -> Self { Self(writer, Sha256::new()) } - - /// Finalizes the HashWriter and returns the digest. - /// - /// # Returns - /// The raw digest bytes encoded as Base64 (in constant time yay). - #[inline] - fn finalize(self) -> String { base16ct::lower::encode_string(&self.1.finalize()) } -} -impl Write for HashWriter { - #[inline] - fn write(&mut self, buf: &[u8]) -> std::io::Result { - // Update the hasher first before passing to the wrapper impl - self.1.update(buf); - self.0.write(buf) - } - - #[inline] - fn flush(&mut self) -> std::io::Result<()> { - // Flush only - self.0.flush() - } -} - -/***** TASKS *****/ -/// Compile & embed the eFLINT base definitions. -fn compile_eflint() { - // Read some environment variables - let src_dir: PathBuf = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()); - let eflint_to_json_exe: Option = match env::var("EFLINT_TO_JSON_PATH") { - Ok(path) => { - let path: PathBuf = path.into(); - if path.is_relative() { Some(src_dir.join(path)) } else { Some(path) } - }, - Err(VarError::NotPresent) => None, - Err(err) => panic!("{}", trace!(("Failed to get environment variable 'EFLINT_TO_JSON_PATH'"), err)), - }; - - // Mark the input files as source-dependent - let interface_dir: PathBuf = src_dir.join("policy").join("eflint").join("interface"); - println!("cargo:rerun-if-changed={}", interface_dir.display()); - println!("cargo:rerun-if-env-changed=EFLINT_TO_JSON_PATH"); - - // Compute the concrete input- and output paths - let main_path: PathBuf = interface_dir.join("main.eflint"); - let output_file: PathBuf = PathBuf::from(env::var("OUT_DIR").unwrap()).join("base-defs.eflint.json"); - println!("cargo:rustc-env=BASE_DEFS_EFLINT_JSON={}", output_file.display()); - - // Alright attempt to open the output file - let handle: File = match File::create(&output_file) { - Ok(handle) => handle, - Err(err) => panic!("{}", trace!(("Failed to create output file '{}'", output_file.display()), err)), - }; - let mut handle: HashWriter = HashWriter::new(handle); - - // Alright run the compiler, after which we reset the handle - if let Err(err) = compile(&main_path, &mut handle, eflint_to_json_exe.as_deref()) { - panic!("{}", trace!(("Failed to compile input file '{}'", main_path.display()), err)); - } - - // Also set the found hash - let hash: String = handle.finalize(); - println!("cargo:rustc-env=BASE_DEFS_EFLINT_JSON_HASH={hash}"); - - // Done -} - -/// Runs the Diesel migrations for the database. -fn build_database() { - // Setup the triggers for running this script - let src_dir: PathBuf = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()); - println!("cargo:rerun-if-changed={}", src_dir.join("migrations").display()); - - // See if the output file already exists - let data_dir: PathBuf = src_dir.join("data"); - let data_file: PathBuf = data_dir.join("policy.db"); - if !data_file.exists() { - // Touch the database file - if !data_dir.exists() { - if let Err(err) = fs::create_dir(&data_dir) { - panic!("{}", trace!(("Failed to create data directory '{}'", data_dir.display()), err)); - } - } - if let Err(err) = fs::File::create(&data_file) { - panic!("{}", trace!(("Failed to create policy database file '{}'", data_file.display()), err)); - } - - // Get the migrations defined - let migrations: FileBasedMigrations = match FileBasedMigrations::find_migrations_directory_in_path(&src_dir) { - Ok(migrations) => migrations, - Err(err) => panic!("{}", trace!(("Failed to find migration in source directory '{}'", src_dir.display()), err)), - }; - - // Apply them by connecting to the database - let mut conn: SqliteConnection = match SqliteConnection::establish(&data_file.display().to_string()) { - Ok(conn) => conn, - Err(err) => panic!("{}", trace!(("Failed to connect to database file '{}'", data_file.display()), err)), - }; - if let Err(err) = conn.run_pending_migrations(migrations) { - panic!("Failed to apply migrations to database '{}': {}", data_file.display(), err); - } - } -} - -/***** ENTRYPOINT *****/ -fn main() { - // 1. Compile the eFLINT base spec - compile_eflint(); - - // 2. Build the database - build_database(); -} diff --git a/deny.toml b/deny.toml index 475b307..21b2c83 100644 --- a/deny.toml +++ b/deny.toml @@ -7,7 +7,9 @@ no-default-features = false feature-depth = 1 [advisories] -ignore = [] +ignore = [ + "RUSTSEC-2024-0436" # paste deprecation, no real alternative, no need to change +] [licenses] allow = [ diff --git a/examples/config/jwk_set_delib.json b/examples/config/jwk_set_delib.json deleted file mode 100644 index 71657a4..0000000 --- a/examples/config/jwk_set_delib.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "keys": [ - { - "use": "sig", - "alg": "HS256", - "kid": "deliberation", - "kty": "oct", - "k": "TtA7ZFN747MLjLiBDpHmA2266Mq67s26TIIExZJFn2E=" - } - ] -} \ No newline at end of file diff --git a/examples/config/jwk_set_expert.json b/examples/config/jwk_set_expert.json deleted file mode 100644 index 9a37983..0000000 --- a/examples/config/jwk_set_expert.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "keys": [ - { - "use": "sig", - "alg": "HS256", - "kid": "expert", - "kty": "oct", - "k": "abICAHBV51bjZeFcoml4sWxJcXwPvAme1yaPEBvTbBM=" - } - ] -} \ No newline at end of file diff --git a/examples/config/jwt_resolver.yaml b/examples/config/jwt_resolver.yaml deleted file mode 100644 index 0508594..0000000 --- a/examples/config/jwt_resolver.yaml +++ /dev/null @@ -1 +0,0 @@ -initiator_claim: username \ No newline at end of file diff --git a/examples/eflint/defs.eflint b/examples/eflint/defs.eflint deleted file mode 100644 index c7a93f1..0000000 --- a/examples/eflint/defs.eflint +++ /dev/null @@ -1,242 +0,0 @@ -// String-identified primitives -Fact workflow. -Fact task. -Fact dataset. -Fact domain. -Fact tag. -Fact signature. - -Fact user. -Fact domain Identified by user. - -// Relations (populate these) -Fact is-valid Identified by signature. -Fact metadata Identified by domain * tag * signature. - -Fact workflow-metadata Identified by workflow * metadata. -Fact task-metadata Identified by task * metadata. -Fact dataset-metadata Identified by dataset * metadata. -Fact domain-metadata Identified by domain * metadata. - -Fact task-in Identified by workflow * task. -Fact result Identified by workflow * dataset. -Fact result-recipient Identified by result * user. - -// Workflow can have only one result-recipient but multiple results (commits) -Fact recipient Identified by dataset * user - Holds when result(workflow, dataset) && result-recipient(result(workflow, dataset), user) - -// Missing derive -// 1. metadata, klopt metadata bij func ook met dataset (bijv diabetes onderzoek) ook task en workflow en user. Alle combi's -// 2. Waar komt func vandaan die op op mijn dataset - -// dataset is the actual code of the function not a dataset the function operates on -Fact function Identified by task * dataset. -Fact argument Identified by task * dataset. -Fact output Identified by task * dataset. -Fact task-at Identified by task * domain. - -// Where the input dataset resides -Fact data-at Identified by dataset * user. - -// Utilities (read only) -Fact input Identified by task * dataset - Holds when function(task, dataset), argument(task, dataset). - -// Input ends up as output -Fact input-to-output Identified by dataset1 * dataset2 - Holds when - (Exists task: task When (argument(task, dataset1) && output(task, dataset2) && dataset1 != dataset2)) - -Fact input-used-for-output Identified by dataset1 * dataset2 - Holds when - input-to-output(dataset1, dataset2) - || - ( - Exists dataset3: dataset3 When input-to-output(dataset1, dataset3) && input-used-for-output(dataset3,dataset2) - ). - -// TODO also include every dataset that is used as input for the produced result -Fact dataset-transferred-to Identified by dataset * user - Holds when ( - ( - Exists task, dataset2, user : task When ( - ( - input-used-for-output(dataset, dataset2) - && - (argument(task, dataset2) || output(task, dataset2)) - && - task-at(task, domain(user)) - ) - ) - ) - || - ( - Exists workflow: workflow When result(workflow, dataset) && result-recipient(result(workflow, dataset), user) - ) - || - ( - Exists dataset2, recipient: dataset2 When Holds(recipient) && ((recipient.user) == user) && ((recipient.dataset) == dataset2) && (input-used-for-output(dataset, dataset2)) - ) - ). - -// Fact dataset-transferred-to Identified by dataset * user -// Holds when ( -// Exists task, dataset2 : task When ( -// ( -// input-used-for-output(dataset, dataset2) -// && -// (argument(task, dataset2) || output(task, dataset2)) -// && -// task-at(task, domain(user)) -// ) -// || -// ( -// output(task, dataset) && task-at(task, domain(user)) -// ) -// ) || ( -// Exists workflow: workflow When result(workflow, dataset) && result-recipient(result(workflow, dataset), user) -// ) || ( -// Exists dataset2: dataset2 When (recipient.user) == user && (recipient.dataset) == dataset2 && input-used-for-output(dataset, dataset2) -// ) -// ). - -// Checker's policy reasoner connector interface -Fact task-to-execute Identified by task. -Fact dataset-to-transfer Identified by dataset * task. -Fact result-to-transfer Identified by workflow. -Fact workflow-to-exectue Identified by workflow. - -// Constraints / sanity checks - -// Exactly one function per task -Invariant one-function-per-task When - (Forall task: Count(Foreach dataset: dataset When Holds(function(task, dataset))) == 1). -// Duty one-function-per-task -// Holder task -// Claimant task // dummy -// Holds when task -// Violated when -// Count(Foreach dataset: dataset When Holds(function(task, dataset))) != 1. - -// // Zero or one output per task -Invariant zero-or-one-output-per-task When - (Forall task: Count(Foreach dataset: dataset When Holds(output(task, dataset))) < 2). -// Duty zero-or-one-output-per-task -// Holder task -// Claimant task // dummy -// Holds when task -// Violated when -// Count(Foreach dataset: dataset When Holds(output(task, dataset))) >= 2. - -// // // Zero or one recipient per workflow -Invariant zero-or-one-result-recipients-per-workflow When - (Forall workflow: (Count(Foreach dataset, user : True When result-recipient(result(workflow, dataset), user)) < 2)). - -// // // // Output dataset can't be used as a function's code -// Invariant output-dataset-cant-be-function-dataset When -// Not( -// Exists dataset, task: function(task, dataset) && output(task, dataset) -// ). - -+task-to-execute(X). - -// // // A requested to be exectued task should exists within the current workflow -Invariant requested-task-should-exist When - // (Forall task-to-execute: Holds(task-to-execute.task)). - (Forall task-to-execute: Holds(task-to-execute.task) When Holds(task-to-execute)). - -// // // Every task should be part of a workflow -Invariant task-should-be-part-of-workflow When (Forall task: (Exists workflow: task-in(workflow, task))). - - - -// // Fill knowledge base - -// // Users -// +user(Hospitala). -// +domain(user(Hospitala)). -// +user(Hospitalb). -// +domain(user(Hospitalb)). -// +user(Hospitalc). -// +domain(user(Hospitalc)). - -// +user(Scientista). - -// // Functions -// +dataset(Funca). - -// // Datasets (inputs) -// +dataset(Ina). -// +dataset(Inb). - -// // Model Workflow -// +workflow(Currentworkflow). - -// // task1 -// +task(X). -// +task-in(Currentworkflow, X). -// +function(X, Funca). -// // +function(X, Ina). -// +argument(X, Ina). -// +dataset(Outa). -// +output(X, Outa). -// +task-at(X, domain(Hospitala)). - -// // task2 -// +task(Y). -// +task-in(Currentworkflow, Y). -// +function(Y, Funca). -// +argument(Y, Outa). -// +argument(Y, Inb). -// +dataset(Outb). -// +output(Y, Outb). -// +task-at(Y, domain(Hospitalb)). - -// // task3 -// +task(Z). -// +task-in(Currentworkflow, Z). -// +function(Z, Funca). -// +argument(Z, Outb). -// +dataset(Outc). -// +output(Z, Outc). -// +task-at(Z, domain(Hospitalc)). - -// +result(Currentworkflow, Outc). -// +result(Currentworkflow, Outb). -// // +result-recipient(result(Currentworkflow, Outc), Scientista). -// +result-recipient(result(Currentworkflow, Outb), Scientista). - -// // // Action that is performed / checked by the checker - -// // // +task-to-execute(X). - -// // // Policy engineers policy code - -// // // Alleen taak draaien synth dataset - -// // // ?( -// // // Not( -// // // Exists task-to-execute: Holds( -// // // task-at(task-to-execute.task, domain(Hospitalb)) -// // // ) -// // // ) -// // // ). - -// // // Various Checks - -// // // Invariant foo When False. -// // // ?input-used-for-output(C,E). -// // // ?input-used-for-output(B,E). - - - -// // // ?--input-to-output. -// // // ?--input-used-for-output. -// // // ?--dataset-transferred-to. -// // // ?one-function-per-task. -// // // ?zero-or-one-output-per-task. -// // // ?output-dataset-cant-be-function-dataset. -// // // ?requested-task-should-exist. -// // // ?task-should-be-part-of-workflow. -// // // ?zero-or-one-result-recipients-per-workflow. diff --git a/examples/eflint/example_workflow.eflint b/examples/eflint/example_workflow.eflint deleted file mode 100644 index d93752f..0000000 --- a/examples/eflint/example_workflow.eflint +++ /dev/null @@ -1,70 +0,0 @@ -// String-identified primitives -Fact workflow. -Fact task. -Fact dataset. -Fact domain. -Fact tag. -Fact signature. - -// Relations (populate these) -Fact is-valid Identified by signature. -Fact metadata Identified by domain * tag * signature. - -Fact workflow-metadata Identified by workflow * metadata. -Fact task-metadata Identified by task * metadata. -Fact dataset-metadata Identified by dataset * metadata. -Fact domain-metadata Identified by domain * metadata. - -Fact task-in Identified by workflow * task. -Fact goal-of Identified by workflow * dataset. - -Fact function Identified by task * dataset. -Fact argument Identified by task * dataset. -Fact output Identified by task * dataset. -Fact at Identified by task * domain. - -// Utilities (read only) -Fact input Identified by task * dataset - Derived from function, argument. - -Fact allowed Identified by task. - -//////////////// EXAMPLE //////////// - -+task-in(Workflow1,Task1). -+function(Task1,F). -+function(Task1,G). -+argument(Task1,X). -+argument(Task1,Y). -+output(Task1,Y). - -?input(Task1, F). - -//////////////// BONUS STATEFUL STUFF ///////// - -Fact agent. - -Fact available Identified by dataset. -Act compute - Actor agent - Recipient task - Holds when (Forall input: - // when all inputs are available - available(input.dataset) - || input.task != task - ) - Creates (Foreach output: - available(output.dataset) - Where output.task == task - ). - - -//////////////// EXAMPLE //////////// - -+available(X). --available(X). -~available(X). -+available(F). -compute(Amy,Task1). -?available(Y). // succeeds - diff --git a/examples/eflint/example_workflow_2.eflint b/examples/eflint/example_workflow_2.eflint deleted file mode 100644 index 5237024..0000000 --- a/examples/eflint/example_workflow_2.eflint +++ /dev/null @@ -1,248 +0,0 @@ -// String-identified primitives -Fact workflow. -Fact task. -Fact dataset. -Fact domain. -Fact tag. -Fact signature. - -Fact user. -Fact domain Identified by user. - -Fact commit. -Fact commits Identified by commit * dataset * dataset. - -// Relations (populate these) -Fact is-valid Identified by signature. - -Placeholder owner For domain. -Placeholder assigner For domain. -Fact metadata Identified by owner * tag * assigner * signature. - -Fact workflow-metadata Identified by workflow * metadata. -Fact task-metadata Identified by task * metadata. -Fact dataset-metadata Identified by dataset * metadata. -Fact domain-metadata Identified by domain * metadata. - -Fact task-in Identified by workflow * task. -Fact result Identified by workflow * dataset. -Fact result-recipient Identified by result * user. - -// Workflow can have only one result-recipient but multiple results (commits) -Fact recipient Identified by dataset * user - Holds when result(workflow, dataset) && result-recipient(result(workflow, dataset), user) - -// Missing derive -// 1. metadata, klopt metadata bij func ook met dataset (bijv diabetes onderzoek) ook task en workflow en user. Alle combi's -// 2. Waar komt func vandaan die op op mijn dataset - -// dataset is the actual code of the function not a dataset the function operates on -Fact function Identified by task * string * dataset. -Fact argument Identified by task * dataset. -Fact output Identified by task * dataset. -Fact task-at Identified by task * domain. - -// Where the input dataset resides -Fact data-at Identified by dataset * user. - -// Utilities (read only) -Fact input Identified by task * dataset - Holds when function(task, dataset), argument(task, dataset). - -// Input ends up as output -Fact input-to-output Identified by dataset1 * dataset2 - Holds when - (Exists task: task When (argument(task, dataset1) && output(task, dataset2) && dataset1 != dataset2)) - -Fact input-used-for-output Identified by dataset1 * dataset2 - Holds when - input-to-output(dataset1, dataset2) - || - ( - Exists dataset3: dataset3 When input-to-output(dataset1, dataset3) && input-used-for-output(dataset3,dataset2) - ). - -// TODO also include every dataset that is used as input for the produced result -Fact dataset-transferred-to Identified by dataset * user - Holds when ( - ( - Exists task, dataset2, user : task When ( - ( - input-used-for-output(dataset, dataset2) - && - (argument(task, dataset2) || output(task, dataset2)) - && - task-at(task, domain(user)) - ) - ) - ) - || - ( - Exists workflow: workflow When result(workflow, dataset) && result-recipient(result(workflow, dataset), user) - ) - || - ( - Exists dataset2, recipient: dataset2 When Holds(recipient) && ((recipient.user) == user) && ((recipient.dataset) == dataset2) && (input-used-for-output(dataset, dataset2)) - ) - ). - -// Fact dataset-transferred-to Identified by dataset * user -// Holds when ( -// Exists task, dataset2 : task When ( -// ( -// input-used-for-output(dataset, dataset2) -// && -// (argument(task, dataset2) || output(task, dataset2)) -// && -// task-at(task, domain(user)) -// ) -// || -// ( -// output(task, dataset) && task-at(task, domain(user)) -// ) -// ) || ( -// Exists workflow: workflow When result(workflow, dataset) && result-recipient(result(workflow, dataset), user) -// ) || ( -// Exists dataset2: dataset2 When (recipient.user) == user && (recipient.dataset) == dataset2 && input-used-for-output(dataset, dataset2) -// ) -// ). - -// Checker's policy reasoner connector interface -Fact task-to-execute Identified by task. -Fact dataset-to-transfer Identified by dataset * task. -Fact result-to-transfer Identified by workflow. -Fact workflow-to-exectue Identified by workflow. - -// Constraints / sanity checks - -// Exactly one function per task -Invariant one-function-per-task When - (Forall task: Count(Foreach dataset: dataset When Holds(function(task, dataset))) == 1). -// Duty one-function-per-task -// Holder task -// Claimant task // dummy -// Holds when task -// Violated when -// Count(Foreach dataset: dataset When Holds(function(task, dataset))) != 1. - -// // Zero or one output per task -Invariant zero-or-one-output-per-task When - (Forall task: Count(Foreach dataset: dataset When Holds(output(task, dataset))) < 2). -// Duty zero-or-one-output-per-task -// Holder task -// Claimant task // dummy -// Holds when task -// Violated when -// Count(Foreach dataset: dataset When Holds(output(task, dataset))) >= 2. - -// // // Zero or one recipient per workflow -Invariant zero-or-one-result-recipients-per-workflow When - (Forall workflow: (Count(Foreach dataset, user : True When result-recipient(result(workflow, dataset), user)) < 2)). - -// // // // Output dataset can't be used as a function's code -// Invariant output-dataset-cant-be-function-dataset When -// Not( -// Exists dataset, task: function(task, dataset) && output(task, dataset) -// ). - -+task-to-execute(X). - -// // // A requested to be exectued task should exists within the current workflow -Invariant requested-task-should-exist When - // (Forall task-to-execute: Holds(task-to-execute.task)). - (Forall task-to-execute: Holds(task-to-execute.task) When Holds(task-to-execute)). - -// // // Every task should be part of a workflow -Invariant task-should-be-part-of-workflow When (Forall task: (Exists workflow: task-in(workflow, task))). - - - -// // Fill knowledge base - -// // Users -// +user(Hospitala). -// +domain(user(Hospitala)). -// +user(Hospitalb). -// +domain(user(Hospitalb)). -// +user(Hospitalc). -// +domain(user(Hospitalc)). - -// +user(Scientista). - -// // Functions -// +dataset(Funca). - -// // Datasets (inputs) -// +dataset(Ina). -// +dataset(Inb). - -// // Model Workflow -// +workflow(Currentworkflow). - -// // task1 -// +task(X). -// +task-in(Currentworkflow, X). -// +function(X, Funca). -// // +function(X, Ina). -// +argument(X, Ina). -// +dataset(Outa). -// +output(X, Outa). -// +task-at(X, domain(Hospitala)). - -// // task2 -// +task(Y). -// +task-in(Currentworkflow, Y). -// +function(Y, Funca). -// +argument(Y, Outa). -// +argument(Y, Inb). -// +dataset(Outb). -// +output(Y, Outb). -// +task-at(Y, domain(Hospitalb)). - -// // task3 -// +task(Z). -// +task-in(Currentworkflow, Z). -// +function(Z, Funca). -// +argument(Z, Outb). -// +dataset(Outc). -// +output(Z, Outc). -// +task-at(Z, domain(Hospitalc)). - -// +result(Currentworkflow, Outc). -// +result(Currentworkflow, Outb). -// // +result-recipient(result(Currentworkflow, Outc), Scientista). -// +result-recipient(result(Currentworkflow, Outb), Scientista). - -// // // Action that is performed / checked by the checker - -// // // +task-to-execute(X). - -// // // Policy engineers policy code - -// // // Alleen taak draaien synth dataset - -// // // ?( -// // // Not( -// // // Exists task-to-execute: Holds( -// // // task-at(task-to-execute.task, domain(Hospitalb)) -// // // ) -// // // ) -// // // ). - -// // // Various Checks - -// // // Invariant foo When False. -// // // ?input-used-for-output(C,E). -// // // ?input-used-for-output(B,E). - - - -// // // ?--input-to-output. -// // // ?--input-used-for-output. -// // // ?--dataset-transferred-to. -// // // ?one-function-per-task. -// // // ?zero-or-one-output-per-task. -// // // ?output-dataset-cant-be-function-dataset. -// // // ?requested-task-should-exist. -// // // ?task-should-be-part-of-workflow. -// // // ?zero-or-one-result-recipients-per-workflow. \ No newline at end of file diff --git a/examples/eflint/higher_level.eflint b/examples/eflint/higher_level.eflint deleted file mode 100644 index 8fad260..0000000 --- a/examples/eflint/higher_level.eflint +++ /dev/null @@ -1,4 +0,0 @@ -#require higher_level.eflint - - - diff --git a/examples/eflint_haskell.rs b/examples/eflint_haskell.rs new file mode 100644 index 0000000..c1167a3 --- /dev/null +++ b/examples/eflint_haskell.rs @@ -0,0 +1,120 @@ +// EFLINT HASKELL.rs +// by Lut99 +// +// Created: +// 06 May 2025, 11:09:11 +// Last edited: +// 06 May 2025, 11:17:02 +// Auto updated? +// Yes +// +// Description: +//! Showcases using the `eflint-haskell-reasoner` backend of the policy +//! reasoner. +// + +use std::process::ExitCode; + +use clap::Parser; +use console::style; +use miette::{Context, IntoDiagnostic}; +use policy_reasoner::loggers::file::FileLogger; +use policy_reasoner::reasoners::eflint_haskell::EFlintHaskellReasonerConnector; +use policy_reasoner::reasoners::eflint_haskell::reasons::SilentHandler; +use policy_reasoner::spec::auditlogger::SessionedAuditLogger; +use policy_reasoner::spec::reasonerconn::ReasonerConnector as _; +use policy_reasoner::spec::reasons::NoReason; +use share::InputFile; +use spec::reasonerconn::ReasonerResponse; +use tracing::{Level, error, info}; + + +/***** ARGUMENTS *****/ +/// Defines the arguments for this binary. +#[derive(Parser)] +struct Arguments { + /// Whether to make `info!()` and `debug!()` visible. + #[clap(long, help = "If given, enables INFO- and DEBUG-level logging.")] + debug: bool, + /// Whether to make `trace!()` visible. + #[clap(long, help = "If given, enables TRACE-level logging. Implies '--debug'.")] + trace: bool, + + /// The file to use as input. + #[clap(name = "FILE", default_value = "-", help = "The eFLINT (JSON) file to read. Use '-' to read from stdin.")] + file: InputFile, + + /// Which `eflint-repl` to use. + #[clap(short, long, default_value = "eflint-repl", help = "The command used to launch the `eflint-repl` binary.")] + eflint_cmd: String, +} + + + + + +/***** LIBRARY *****/ +#[tokio::main(flavor = "current_thread")] +async fn main() -> ExitCode { + // Parse the arguments + let args = Arguments::parse(); + + // Setup the logger + tracing_subscriber::fmt() + .with_max_level(if args.trace { + Level::TRACE + } else if args.debug { + Level::DEBUG + } else { + Level::WARN + }) + .init(); + info!("{} - v{}", env!("CARGO_BIN_NAME"), env!("CARGO_PKG_VERSION")); + + match run(args).await { + Ok(()) => ExitCode::SUCCESS, + Err(err) => { + error!("{err:?}"); + ExitCode::FAILURE + }, + } +} + +async fn run(args: Arguments) -> miette::Result<()> { + // Create the logger + let logger: SessionedAuditLogger = + SessionedAuditLogger::new("test", FileLogger::new(format!("{} - v{}", env!("CARGO_BIN_NAME"), env!("CARGO_PKG_VERSION")), "./test.log")); + + // Ensure there is a file to input + let policy = args.file.as_file().await.context("Could not get the input file")?; + + // Create the reasoner + let conn = EFlintHaskellReasonerConnector::::new_async( + shlex::split(&args.eflint_cmd).into_iter().flatten(), + &policy as &std::path::Path, + SilentHandler, + &logger, + ) + .await + .into_diagnostic() + .context("Failed to create eFLINT reasoner")?; + + let verdict: ReasonerResponse = conn + .consult("".into(), (), &logger) + .await + .into_diagnostic() + .with_context(|| format!("Failed to send message to reasoner {cmd:?}", cmd = args.eflint_cmd))?; + + // OK, report + match verdict { + ReasonerResponse::Success => println!("{} {}", style("Reasoner says:").bold(), style("OK").bold().green()), + ReasonerResponse::Violated(reasons) => { + println!("{} {}", style("Reasoner says:").bold(), style("VIOLATION").bold().red()); + println!("Reason:"); + println!("{reasons}"); + println!(); + }, + } + + Ok(()) +} diff --git a/examples/eflint_json.rs b/examples/eflint_json.rs new file mode 100644 index 0000000..092c508 --- /dev/null +++ b/examples/eflint_json.rs @@ -0,0 +1,172 @@ +// EFLINT JSON.rs +// by Lut99 +// +// Created: +// 10 Oct 2024, 13:54:17 +// Last edited: +// 06 May 2025, 10:57:22 +// Auto updated? +// Yes +// +// Description: +//! Entrypoint to the example `eflint` policy reasoner. +// + +use std::fs; +use std::io::{self, Read as _}; +use std::path::PathBuf; +use std::process::ExitCode; + +use clap::Parser; +use console::style; +use eflint_json_reasoner::json::spec::Phrase; +use miette::{Context, IntoDiagnostic as _}; +use policy_reasoner::loggers::file::FileLogger; +use policy_reasoner::reasoners::eflint_json::EFlintJsonReasonerConnector; +use policy_reasoner::reasoners::eflint_json::json::spec::RequestPhrases; +use policy_reasoner::reasoners::eflint_json::reasons::EFlintSilentReasonHandler; +use policy_reasoner::spec::auditlogger::SessionedAuditLogger; +use policy_reasoner::spec::reasonerconn::ReasonerConnector as _; +use policy_reasoner::spec::reasons::NoReason; +use share::InputFile; +use spec::reasonerconn::ReasonerResponse; +use tracing::{Level, error, info}; + + +/***** ARGUMENTS *****/ +/// Defines the arguments for this binary. +#[derive(Parser)] +struct Arguments { + /// Whether to make `info!()` and `debug!()` visible. + #[clap(long, help = "If given, enables INFO- and DEBUG-level logging.")] + debug: bool, + /// Whether to make `trace!()` visible. + #[clap(long, help = "If given, enables TRACE-level logging. Implies '--debug'.")] + trace: bool, + + /// The file to use as input. + #[clap(name = "FILE", default_value = "-", help = "The eFLINT (JSON) file to read. Use '-' to read from stdin.")] + file: InputFile, + /// Whether to read the input as DSL. + #[clap( + short, + long, + conflicts_with = "json", + help = "If given, assumes the input is standard eFLINT syntax. This is the default if no language flag is given. Mutually exclusive with \ + '--json'." + )] + dsl: bool, + /// Whether to read the input as JSON. + #[clap(short, long, conflicts_with = "dsl", help = "If given, assumes the input is eFLINT JSON syntax. Mutually exclusive with '--dsl'.")] + json: bool, + /// Which `eflint-to-json` to use. + #[clap( + short, + long, + help = "If '--json' is given, you can give this to use an existing 'eflint-to-json' binary instead of downloading one from the internet." + )] + eflint_path: Option, + + /// The address where the reasoner lives. + #[clap(short, long, default_value = "http://127.0.0.1:8080", help = "The address where the eFLINT reasoner lives.")] + address: String, +} + + + + + +/***** LIBRARY *****/ +#[tokio::main(flavor = "current_thread")] +async fn main() -> ExitCode { + // Parse the arguments + let args = Arguments::parse(); + + // Setup the logger + tracing_subscriber::fmt() + .with_max_level(if args.trace { + Level::TRACE + } else if args.debug { + Level::DEBUG + } else { + Level::WARN + }) + .init(); + info!("{} - v{}", env!("CARGO_BIN_NAME"), env!("CARGO_PKG_VERSION")); + + match run(args).await { + Ok(()) => ExitCode::SUCCESS, + Err(err) => { + error!("{err:?}"); + ExitCode::FAILURE + }, + } +} + +async fn run(args: Arguments) -> miette::Result<()> { + // Create the logger + let logger: SessionedAuditLogger = SessionedAuditLogger::new( + "test", + FileLogger::new(format!("{bin_name} - v{version}", bin_name = env!("CARGO_BIN_NAME"), version = env!("CARGO_PKG_VERSION")), "./test.log"), + ); + + // Decide which eflint to run + let dsl: bool = !args.json; + let raw = if dsl { + // First: resolve any stdin to a file + let file = args.file.as_file().await?; + + // Compile first + let mut json: Vec = Vec::new(); + eflint_to_json::compile_async(&file, &mut json, args.eflint_path.as_deref()) + .await + .into_diagnostic() + .with_context(|| format!("Failed to compile input file '{path}' to JSON", path = args.file.display()))?; + + json + } else { + // Read the file + match &args.file { + InputFile::Stdin => { + let mut raw: Vec = Vec::new(); + io::stdin().read_to_end(&mut raw).into_diagnostic().context("Failed to read stdin")?; + raw + }, + InputFile::File(path_buf) => { + fs::read(path_buf).into_diagnostic().with_context(|| format!("Failed to open & read file '{path}'", path = path_buf.display()))? + }, + } + }; + + let policy: RequestPhrases = + // Now parse the file contents as a request and done + serde_json::from_slice(&raw) + .into_diagnostic() + .with_context(|| format!("Failed to parse {path} as an eFLINT JSON phrases request", path = args.file.display()))?; + + // Create the reasoner + let conn = + EFlintJsonReasonerConnector::, ()>::new_async(&args.address, EFlintSilentReasonHandler, &logger) + .await + .into_diagnostic() + .context("Failed to create eFLINT reasoner")?; + + let verdict: ReasonerResponse = conn + .consult(policy.phrases, (), &logger) + .await + .into_diagnostic() + .with_context(|| format!("Failed to send message to reasoner at {address}", address = args.address))?; + + // OK, report + match verdict { + ReasonerResponse::Success => println!("{} {}", style("Reasoner says:").bold(), style("OK").bold().green()), + ReasonerResponse::Violated(reasons) => { + println!("{} {}", style("Reasoner says:").bold(), style("VIOLATION").bold().red()); + println!("Reason:"); + println!("{reasons}"); + println!(); + }, + } + + Ok(()) +} diff --git a/examples/eflint_json/interface.json b/examples/eflint_json/interface.json deleted file mode 100644 index dd260b5..0000000 --- a/examples/eflint_json/interface.json +++ /dev/null @@ -1,523 +0,0 @@ -{ - "version": "0.1.0", - "kind": "phrases", - "phrases": [ - { - "kind": "afact", - "name": "user", - "type": "String" - }, - { - "kind": "cfact", - "name": "domain", - "identified-by": [ - "user" - ] - }, - { - "kind": "afact", - "name": "asset", - "type": "String" - }, - { - "kind": "cfact", - "name": "asset-access", - "identified-by": [ - "asset", - "user" - ] - }, - { - "kind": "cfact", - "name": "code", - "identified-by": [ - "asset" - ] - }, - { - "kind": "afact", - "name": "workflow", - "type": "String" - }, - { - "kind": "cfact", - "name": "workflow-result", - "identified-by": [ - "workflow", - "asset" - ] - }, - { - "kind": "cfact", - "name": "workflow-result-recipient", - "identified-by": [ - "workflow-result", - "user" - ] - }, - { - "kind": "cfact", - "name": "node", - "identified-by": [ - "workflow", - "string" - ] - }, - { - "kind": "cfact", - "name": "node-input", - "identified-by": [ - "node", - "asset" - ] - }, - { - "kind": "cfact", - "name": "node-input-ensured", - "identified-by": [ - "node-input" - ] - }, - { - "kind": "cfact", - "name": "node-output", - "identified-by": [ - "node", - "asset" - ] - }, - { - "kind": "cfact", - "name": "link", - "identified-by": [ - "node-output", - "node-input" - ] - }, - { - "kind": "cfact", - "name": "link-branch", - "identified-by": [ - "node-output", - "node-input" - ] - }, - { - "kind": "cfact", - "name": "task", - "identified-by": [ - "node" - ] - }, - { - "kind": "cfact", - "name": "task-code", - "identified-by": [ - "task", - "code" - ] - }, - { - "kind": "cfact", - "name": "task-at", - "identified-by": [ - "task", - "domain" - ] - }, - { - "kind": "cfact", - "name": "commit", - "identified-by": [ - "node" - ] - }, - { - "kind": "cfact", - "name": "signature", - "identified-by": [ - "user", - "string" - ] - }, - { - "kind": "cfact", - "name": "signature-valid", - "identified-by": [ - "signature" - ] - }, - { - "kind": "cfact", - "name": "tag", - "identified-by": [ - "user", - "string" - ] - }, - { - "kind": "cfact", - "name": "metadata", - "identified-by": [ - "tag", - "signature" - ] - }, - { - "kind": "cfact", - "name": "workflow-metadata", - "identified-by": [ - "workflow", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "node-metadata", - "identified-by": [ - "node", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "asset-metadata", - "identified-by": [ - "asset", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "user-metadata", - "identified-by": [ - "user", - "metadata" - ] - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "workflow-at-most-one-result-recipient", - "expression": { - "iterator": "FORALL", - "binds": [ - "workflow" - ], - "expression": { - "operator": "LTE", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "asset", - "user" - ], - "expression": { - "operator": "WHEN", - "operands": [ - { - "identifier": "workflow-result-recipient", - "operands": [ - { - "identifier": "workflow-result", - "operands": [ - [ - "workflow" - ], - [ - "asset" - ] - ] - }, - [ - "user" - ] - ] - }, - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "workflow-result-recipient", - "operands": [ - { - "identifier": "workflow-result", - "operands": [ - [ - "workflow" - ], - [ - "asset" - ] - ] - }, - [ - "user" - ] - ] - } - ] - } - ] - } - } - ] - }, - 1 - ] - } - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "node-at-most-one-output", - "expression": { - "iterator": "FORALL", - "binds": [ - "node" - ], - "expression": { - "operator": "LTE", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "asset" - ], - "expression": { - "operator": "WHEN", - "operands": [ - { - "identifier": "node-output", - "operands": [ - [ - "node" - ], - [ - "asset" - ] - ] - }, - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "node-output", - "operands": [ - [ - "node" - ], - [ - "asset" - ] - ] - } - ] - } - ] - } - } - ] - }, - 1 - ] - } - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "task-at-most-one-code", - "expression": { - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "operator": "LTE", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "code" - ], - "expression": { - "operator": "WHEN", - "operands": [ - { - "identifier": "task-code", - "operands": [ - [ - "task" - ], - [ - "code" - ] - ] - }, - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "task-code", - "operands": [ - [ - "task" - ], - [ - "code" - ] - ] - } - ] - } - ] - } - } - ] - }, - 1 - ] - } - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "task-exactly-one-at", - "expression": { - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "operator": "EQ", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "domain" - ], - "expression": { - "operator": "WHEN", - "operands": [ - { - "identifier": "task-at", - "operands": [ - [ - "task" - ], - [ - "domain" - ] - ] - }, - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "task-at", - "operands": [ - [ - "task" - ], - [ - "domain" - ] - ] - } - ] - } - ] - } - } - ] - }, - 1 - ] - } - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "commit-at-most-one-input-ensured", - "expression": { - "iterator": "FORALL", - "binds": [ - "commit" - ], - "expression": { - "operator": "LTE", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "asset" - ], - "expression": { - "operator": "WHEN", - "operands": [ - { - "identifier": "node-input-ensure", - "operands": [ - { - "parameter": "node", - "operand": [ - "commit" - ] - }, - [ - "asset" - ] - ] - }, - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "node-input-ensure", - "operands": [ - { - "parameter": "node", - "operand": [ - "commit" - ] - }, - [ - "asset" - ] - ] - } - ] - } - ] - } - } - ] - }, - 1 - ] - } - } - } - ], - "updates": true -} diff --git a/examples/eflint_reasonerconn/eflint.rs b/examples/eflint_reasonerconn/eflint.rs deleted file mode 100644 index 9a6ecb3..0000000 --- a/examples/eflint_reasonerconn/eflint.rs +++ /dev/null @@ -1,22 +0,0 @@ -use std::fs; - -use policy::Policy; -use reasonerconn::connector::ReasonerConnector; -use reasonerconn::eflint::EFlintReasonerConnector; -use state_resolver::State; -use workflow::spec::Workflow; - -#[tokio::main] -async fn main() { - let conn = EFlintReasonerConnector::new("http://localhost:8080".into()); - - let policy = fs::read_to_string("/examples/eflint_reasonerconn/example-policy.json").unwrap(); - let workflow = fs::read_to_string("/examples/eflint_reasonerconn/example-workflow.json").unwrap(); - let state = fs::read_to_string("/examples/eflint_reasonerconn/example-state.json").unwrap(); - - let workflow: Workflow = serde_json::from_str(&workflow).unwrap(); - let policy: Policy = serde_json::from_str(&policy).unwrap(); - let state: State = serde_json::from_str(&state).unwrap(); - - conn.execute_task(policy, state, workflow, "X".into()).await.unwrap(); -} diff --git a/examples/eflint_reasonerconn/example-policy-content.json b/examples/eflint_reasonerconn/example-policy-content.json deleted file mode 100644 index 38e1ac6..0000000 --- a/examples/eflint_reasonerconn/example-policy-content.json +++ /dev/null @@ -1,888 +0,0 @@ -[ - { - "reasoner": "eflint", - "reasoner_version": "0.1.0", - "content": [ - { - "kind": "afact", - "name": "workflow", - "type": "String" - }, - { - "kind": "afact", - "name": "task", - "type": "String" - }, - { - "kind": "afact", - "name": "dataset", - "type": "String" - }, - { - "kind": "afact", - "name": "domain", - "type": "String" - }, - { - "kind": "afact", - "name": "tag", - "type": "String" - }, - { - "kind": "afact", - "name": "signature", - "type": "String" - }, - { - "kind": "afact", - "name": "user", - "type": "String" - }, - { - "kind": "cfact", - "name": "domain", - "identified-by": [ - "user" - ] - }, - { - "kind": "afact", - "name": "commit", - "type": "String" - }, - { - "kind": "cfact", - "name": "commits", - "identified-by": [ - "commit", - "dataset", - "dataset" - ] - }, - { - "kind": "cfact", - "name": "is-valid", - "identified-by": [ - "signature" - ] - }, - { - "kind": "placeholder", - "name": [ - "owner" - ], - "for": "domain" - }, - { - "kind": "placeholder", - "name": [ - "assigner" - ], - "for": "domain" - }, - { - "kind": "cfact", - "name": "metadata", - "identified-by": [ - "owner", - "tag", - "assigner", - "signature" - ] - }, - { - "kind": "cfact", - "name": "workflow-metadata", - "identified-by": [ - "workflow", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "task-metadata", - "identified-by": [ - "task", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "dataset-metadata", - "identified-by": [ - "dataset", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "domain-metadata", - "identified-by": [ - "domain", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "task-in", - "identified-by": [ - "workflow", - "task" - ] - }, - { - "kind": "cfact", - "name": "result", - "identified-by": [ - "workflow", - "dataset" - ] - }, - { - "kind": "cfact", - "name": "result-recipient", - "identified-by": [ - "result", - "user" - ] - }, - { - "kind": "cfact", - "name": "recipient", - "identified-by": [ - "dataset", - "user" - ], - "holds-when": [ - { - "operator": "AND", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - { - "identifier": "result-recipient", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - [ - "user" - ] - ] - } - ] - } - ] - }, - { - "kind": "cfact", - "name": "function", - "identified-by": [ - "task", - "string", - "dataset" - ] - }, - { - "kind": "cfact", - "name": "argument", - "identified-by": [ - "task", - "dataset" - ] - }, - { - "kind": "cfact", - "name": "output", - "identified-by": [ - "task", - "dataset" - ] - }, - { - "kind": "cfact", - "name": "task-at", - "identified-by": [ - "task", - "domain" - ] - }, - { - "kind": "cfact", - "name": "data-at", - "identified-by": [ - "dataset", - "user" - ] - }, - { - "kind": "cfact", - "name": "input", - "identified-by": [ - "task", - "dataset" - ], - "holds-when": [ - { - "identifier": "function", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - }, - { - "identifier": "argument", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - } - ] - }, - { - "kind": "cfact", - "name": "input-to-output", - "identified-by": [ - "dataset1", - "dataset2" - ], - "holds-when": [ - { - "iterator": "EXISTS", - "binds": [ - "task" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "task" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "argument", - "operands": [ - [ - "task" - ], - [ - "dataset1" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "identifier": "output", - "operands": [ - [ - "task" - ], - [ - "dataset2" - ] - ] - }, - { - "operator": "NEQ", - "operands": [ - [ - "dataset1" - ], - [ - "dataset2" - ] - ] - } - ] - } - ] - } - ] - } - } - ] - }, - { - "kind": "cfact", - "name": "input-used-for-output", - "identified-by": [ - "dataset1", - "dataset2" - ], - "holds-when": [ - { - "operator": "OR", - "operands": [ - { - "identifier": "input-to-output", - "operands": [ - [ - "dataset1" - ], - [ - "dataset2" - ] - ] - }, - { - "iterator": "EXISTS", - "binds": [ - "dataset3" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset3" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "input-to-output", - "operands": [ - [ - "dataset1" - ], - [ - "dataset3" - ] - ] - }, - { - "identifier": "input-used-for-output", - "operands": [ - [ - "dataset3" - ], - [ - "dataset2" - ] - ] - } - ] - } - ] - } - } - ] - } - ] - }, - { - "kind": "cfact", - "name": "dataset-transferred-to", - "identified-by": [ - "dataset", - "user" - ], - "holds-when": [ - { - "operator": "OR", - "operands": [ - { - "iterator": "EXISTS", - "binds": [ - "task", - "dataset2", - "user" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "task" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "input-used-for-output", - "operands": [ - [ - "dataset" - ], - [ - "dataset2" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "operator": "OR", - "operands": [ - { - "identifier": "argument", - "operands": [ - [ - "task" - ], - [ - "dataset2" - ] - ] - }, - { - "identifier": "output", - "operands": [ - [ - "task" - ], - [ - "dataset2" - ] - ] - } - ] - }, - { - "identifier": "task-at", - "operands": [ - [ - "task" - ], - { - "identifier": "domain", - "operands": [ - [ - "user" - ] - ] - } - ] - } - ] - } - ] - } - ] - } - }, - { - "operator": "OR", - "operands": [ - { - "iterator": "EXISTS", - "binds": [ - "workflow" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "workflow" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - { - "identifier": "result-recipient", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - [ - "user" - ] - ] - } - ] - } - ] - } - }, - { - "iterator": "EXISTS", - "binds": [ - "dataset2", - "recipient" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset2" - ], - { - "operator": "AND", - "operands": [ - { - "operator": "HOLDS", - "operands": [ - [ - "recipient" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "operator": "EQ", - "operands": [ - { - "parameter": "user", - "operand": [ - "recipient" - ] - }, - [ - "user" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "operator": "EQ", - "operands": [ - { - "parameter": "dataset", - "operand": [ - "recipient" - ] - }, - [ - "dataset2" - ] - ] - }, - { - "identifier": "input-used-for-output", - "operands": [ - [ - "dataset" - ], - [ - "dataset2" - ] - ] - } - ] - } - ] - } - ] - } - ] - } - } - ] - } - ] - } - ] - }, - { - "kind": "cfact", - "name": "task-to-execute", - "identified-by": [ - "task" - ] - }, - { - "kind": "cfact", - "name": "dataset-to-transfer", - "identified-by": [ - "dataset", - "task" - ] - }, - { - "kind": "cfact", - "name": "result-to-transfer", - "identified-by": [ - "workflow" - ] - }, - { - "kind": "cfact", - "name": "workflow-to-exectue", - "identified-by": [ - "workflow" - ] - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "one-function-per-task", - "expression": { - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "operator": "EQ", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "dataset" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset" - ], - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "function", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - } - ] - } - ] - } - } - ] - }, - 1 - ] - } - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "zero-or-one-output-per-task", - "expression": { - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "operator": "LT", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "dataset" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset" - ], - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "output", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - } - ] - } - ] - } - } - ] - }, - 2 - ] - } - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "zero-or-one-result-recipients-per-workflow", - "expression": { - "iterator": "FORALL", - "binds": [ - "workflow" - ], - "expression": { - "operator": "LT", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "dataset", - "user" - ], - "expression": { - "operator": "WHEN", - "operands": [ - true, - { - "identifier": "result-recipient", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - [ - "user" - ] - ] - } - ] - } - } - ] - }, - 2 - ] - } - } - }, - { - "kind": "create", - "operand": { - "identifier": "task-to-execute", - "operands": [ - "X" - ] - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "requested-task-should-exist", - "expression": { - "iterator": "FORALL", - "binds": [ - "task-to-execute" - ], - "expression": { - "operator": "WHEN", - "operands": [ - { - "operator": "HOLDS", - "operands": [ - { - "parameter": "task", - "operand": [ - "task-to-execute" - ] - } - ] - }, - { - "operator": "HOLDS", - "operands": [ - [ - "task-to-execute" - ] - ] - } - ] - } - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "task-should-be-part-of-workflow", - "expression": { - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "iterator": "EXISTS", - "binds": [ - "workflow" - ], - "expression": { - "identifier": "task-in", - "operands": [ - [ - "workflow" - ], - [ - "task" - ] - ] - } - } - } - } - ] - } -] diff --git a/examples/eflint_reasonerconn/example-policy.json b/examples/eflint_reasonerconn/example-policy.json deleted file mode 100644 index adb0211..0000000 --- a/examples/eflint_reasonerconn/example-policy.json +++ /dev/null @@ -1,895 +0,0 @@ -{ - "description": "Dit is een omschrijving", - "creator": "Bas Kloosterman", - "created_at": "2023-10-25T19:51:24.225137+02:00", - "version": 1, - "version_description": "Dit is een versie omschrijving", - "content": [ - { - "reasoner": "eflint", - "reasoner_version": "0.1.0", - "content": [ - { - "kind": "afact", - "name": "workflow", - "type": "String" - }, - { - "kind": "afact", - "name": "task", - "type": "String" - }, - { - "kind": "afact", - "name": "dataset", - "type": "String" - }, - { - "kind": "afact", - "name": "domain", - "type": "String" - }, - { - "kind": "afact", - "name": "tag", - "type": "String" - }, - { - "kind": "afact", - "name": "signature", - "type": "String" - }, - { - "kind": "afact", - "name": "user", - "type": "String" - }, - { - "kind": "cfact", - "name": "domain", - "identified-by": [ - "user" - ] - }, - { - "kind": "afact", - "name": "commit", - "type": "String" - }, - { - "kind": "cfact", - "name": "commits", - "identified-by": [ - "commit", - "dataset", - "dataset" - ] - }, - { - "kind": "cfact", - "name": "is-valid", - "identified-by": [ - "signature" - ] - }, - { - "kind": "placeholder", - "name": [ - "owner" - ], - "for": "domain" - }, - { - "kind": "placeholder", - "name": [ - "assigner" - ], - "for": "domain" - }, - { - "kind": "cfact", - "name": "metadata", - "identified-by": [ - "owner", - "tag", - "assigner", - "signature" - ] - }, - { - "kind": "cfact", - "name": "workflow-metadata", - "identified-by": [ - "workflow", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "task-metadata", - "identified-by": [ - "task", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "dataset-metadata", - "identified-by": [ - "dataset", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "domain-metadata", - "identified-by": [ - "domain", - "metadata" - ] - }, - { - "kind": "cfact", - "name": "task-in", - "identified-by": [ - "workflow", - "task" - ] - }, - { - "kind": "cfact", - "name": "result", - "identified-by": [ - "workflow", - "dataset" - ] - }, - { - "kind": "cfact", - "name": "result-recipient", - "identified-by": [ - "result", - "user" - ] - }, - { - "kind": "cfact", - "name": "recipient", - "identified-by": [ - "dataset", - "user" - ], - "holds-when": [ - { - "operator": "AND", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - { - "identifier": "result-recipient", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - [ - "user" - ] - ] - } - ] - } - ] - }, - { - "kind": "cfact", - "name": "function", - "identified-by": [ - "task", - "string", - "dataset" - ] - }, - { - "kind": "cfact", - "name": "argument", - "identified-by": [ - "task", - "dataset" - ] - }, - { - "kind": "cfact", - "name": "output", - "identified-by": [ - "task", - "dataset" - ] - }, - { - "kind": "cfact", - "name": "task-at", - "identified-by": [ - "task", - "domain" - ] - }, - { - "kind": "cfact", - "name": "data-at", - "identified-by": [ - "dataset", - "user" - ] - }, - { - "kind": "cfact", - "name": "input", - "identified-by": [ - "task", - "dataset" - ], - "holds-when": [ - { - "identifier": "function", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - }, - { - "identifier": "argument", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - } - ] - }, - { - "kind": "cfact", - "name": "input-to-output", - "identified-by": [ - "dataset1", - "dataset2" - ], - "holds-when": [ - { - "iterator": "EXISTS", - "binds": [ - "task" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "task" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "argument", - "operands": [ - [ - "task" - ], - [ - "dataset1" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "identifier": "output", - "operands": [ - [ - "task" - ], - [ - "dataset2" - ] - ] - }, - { - "operator": "NEQ", - "operands": [ - [ - "dataset1" - ], - [ - "dataset2" - ] - ] - } - ] - } - ] - } - ] - } - } - ] - }, - { - "kind": "cfact", - "name": "input-used-for-output", - "identified-by": [ - "dataset1", - "dataset2" - ], - "holds-when": [ - { - "operator": "OR", - "operands": [ - { - "identifier": "input-to-output", - "operands": [ - [ - "dataset1" - ], - [ - "dataset2" - ] - ] - }, - { - "iterator": "EXISTS", - "binds": [ - "dataset3" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset3" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "input-to-output", - "operands": [ - [ - "dataset1" - ], - [ - "dataset3" - ] - ] - }, - { - "identifier": "input-used-for-output", - "operands": [ - [ - "dataset3" - ], - [ - "dataset2" - ] - ] - } - ] - } - ] - } - } - ] - } - ] - }, - { - "kind": "cfact", - "name": "dataset-transferred-to", - "identified-by": [ - "dataset", - "user" - ], - "holds-when": [ - { - "operator": "OR", - "operands": [ - { - "iterator": "EXISTS", - "binds": [ - "task", - "dataset2", - "user" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "task" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "input-used-for-output", - "operands": [ - [ - "dataset" - ], - [ - "dataset2" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "operator": "OR", - "operands": [ - { - "identifier": "argument", - "operands": [ - [ - "task" - ], - [ - "dataset2" - ] - ] - }, - { - "identifier": "output", - "operands": [ - [ - "task" - ], - [ - "dataset2" - ] - ] - } - ] - }, - { - "identifier": "task-at", - "operands": [ - [ - "task" - ], - { - "identifier": "domain", - "operands": [ - [ - "user" - ] - ] - } - ] - } - ] - } - ] - } - ] - } - }, - { - "operator": "OR", - "operands": [ - { - "iterator": "EXISTS", - "binds": [ - "workflow" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "workflow" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - { - "identifier": "result-recipient", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - [ - "user" - ] - ] - } - ] - } - ] - } - }, - { - "iterator": "EXISTS", - "binds": [ - "dataset2", - "recipient" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset2" - ], - { - "operator": "AND", - "operands": [ - { - "operator": "HOLDS", - "operands": [ - [ - "recipient" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "operator": "EQ", - "operands": [ - { - "parameter": "user", - "operand": [ - "recipient" - ] - }, - [ - "user" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "operator": "EQ", - "operands": [ - { - "parameter": "dataset", - "operand": [ - "recipient" - ] - }, - [ - "dataset2" - ] - ] - }, - { - "identifier": "input-used-for-output", - "operands": [ - [ - "dataset" - ], - [ - "dataset2" - ] - ] - } - ] - } - ] - } - ] - } - ] - } - } - ] - } - ] - } - ] - }, - { - "kind": "cfact", - "name": "task-to-execute", - "identified-by": [ - "task" - ] - }, - { - "kind": "cfact", - "name": "dataset-to-transfer", - "identified-by": [ - "dataset", - "task" - ] - }, - { - "kind": "cfact", - "name": "result-to-transfer", - "identified-by": [ - "workflow" - ] - }, - { - "kind": "cfact", - "name": "workflow-to-exectue", - "identified-by": [ - "workflow" - ] - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "one-function-per-task", - "expression": { - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "operator": "EQ", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "dataset" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset" - ], - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "function", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - } - ] - } - ] - } - } - ] - }, - 1 - ] - } - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "zero-or-one-output-per-task", - "expression": { - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "operator": "LT", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "dataset" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset" - ], - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "output", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - } - ] - } - ] - } - } - ] - }, - 2 - ] - } - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "zero-or-one-result-recipients-per-workflow", - "expression": { - "iterator": "FORALL", - "binds": [ - "workflow" - ], - "expression": { - "operator": "LT", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "iterator": "FOREACH", - "binds": [ - "dataset", - "user" - ], - "expression": { - "operator": "WHEN", - "operands": [ - true, - { - "identifier": "result-recipient", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - [ - "user" - ] - ] - } - ] - } - } - ] - }, - 2 - ] - } - } - }, - { - "kind": "create", - "operand": { - "identifier": "task-to-execute", - "operands": [ - "X" - ] - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "requested-task-should-exist", - "expression": { - "iterator": "FORALL", - "binds": [ - "task-to-execute" - ], - "expression": { - "operator": "WHEN", - "operands": [ - { - "operator": "HOLDS", - "operands": [ - { - "parameter": "task", - "operand": [ - "task-to-execute" - ] - } - ] - }, - { - "operator": "HOLDS", - "operands": [ - [ - "task-to-execute" - ] - ] - } - ] - } - } - }, - { - "kind": "predicate", - "is-invariant": true, - "name": "task-should-be-part-of-workflow", - "expression": { - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "iterator": "EXISTS", - "binds": [ - "workflow" - ], - "expression": { - "identifier": "task-in", - "operands": [ - [ - "workflow" - ], - [ - "task" - ] - ] - } - } - } - } - ] - } - ] -} \ No newline at end of file diff --git a/examples/eflint_reasonerconn/example-result.json b/examples/eflint_reasonerconn/example-result.json deleted file mode 100644 index 4f32d17..0000000 --- a/examples/eflint_reasonerconn/example-result.json +++ /dev/null @@ -1,1252 +0,0 @@ -{ - "success": true, - "results": [ - { - "success": true, - "changes": [ - { - "kind": "afact", - "name": "workflow", - "type": "String" - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "afact", - "name": "task", - "type": "String" - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "afact", - "name": "dataset", - "type": "String" - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "afact", - "name": "domain", - "type": "String" - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "afact", - "name": "tag", - "type": "String" - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "afact", - "name": "signature", - "type": "String" - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "afact", - "name": "user", - "type": "String" - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "domain", - "identified-by": [ - "user" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "is-valid", - "identified-by": [ - "signature" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "metadata", - "identified-by": [ - "domain", - "tag", - "signature" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "workflow-metadata", - "identified-by": [ - "workflow", - "metadata" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "task-metadata", - "identified-by": [ - "task", - "metadata" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "dataset-metadata", - "identified-by": [ - "dataset", - "metadata" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "domain-metadata", - "identified-by": [ - "domain", - "metadata" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "task-in", - "identified-by": [ - "workflow", - "task" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "result", - "identified-by": [ - "workflow", - "dataset" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "result-recipient", - "identified-by": [ - "result", - "user" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "recipient", - "holds-when": [ - { - "operator": "AND", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - { - "identifier": "result-recipient", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - [ - "user" - ] - ] - } - ] - } - ], - "identified-by": [ - "dataset", - "user" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "function", - "identified-by": [ - "task", - "dataset" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "argument", - "identified-by": [ - "task", - "dataset" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "output", - "identified-by": [ - "task", - "dataset" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "task-at", - "identified-by": [ - "task", - "domain" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "data-at", - "identified-by": [ - "dataset", - "user" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "input", - "holds-when": [ - { - "identifier": "function", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - }, - { - "identifier": "argument", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - } - ], - "identified-by": [ - "task", - "dataset" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "input-to-output", - "holds-when": [ - { - "operands": null, - "iterator": "EXISTS", - "binds": [ - "task" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "task" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "argument", - "operands": [ - [ - "task" - ], - [ - "dataset1" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "identifier": "output", - "operands": [ - [ - "task" - ], - [ - "dataset2" - ] - ] - }, - { - "operator": "NEQ", - "operands": [ - [ - "dataset1" - ], - [ - "dataset2" - ] - ] - } - ] - } - ] - } - ] - } - } - ], - "identified-by": [ - "dataset1", - "dataset2" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "input-used-for-output", - "holds-when": [ - { - "operator": "OR", - "operands": [ - { - "identifier": "input-to-output", - "operands": [ - [ - "dataset1" - ], - [ - "dataset2" - ] - ] - }, - { - "operands": null, - "iterator": "EXISTS", - "binds": [ - "dataset3" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset3" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "input-to-output", - "operands": [ - [ - "dataset1" - ], - [ - "dataset3" - ] - ] - }, - { - "identifier": "input-used-for-output", - "operands": [ - [ - "dataset3" - ], - [ - "dataset2" - ] - ] - } - ] - } - ] - } - } - ] - } - ], - "identified-by": [ - "dataset1", - "dataset2" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "dataset-transferred-to", - "holds-when": [ - { - "operator": "OR", - "operands": [ - { - "operands": null, - "iterator": "EXISTS", - "binds": [ - "task", - "dataset2", - "user" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "task" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "input-used-for-output", - "operands": [ - [ - "dataset" - ], - [ - "dataset2" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "operator": "OR", - "operands": [ - { - "identifier": "argument", - "operands": [ - [ - "task" - ], - [ - "dataset2" - ] - ] - }, - { - "identifier": "output", - "operands": [ - [ - "task" - ], - [ - "dataset2" - ] - ] - } - ] - }, - { - "identifier": "task-at", - "operands": [ - [ - "task" - ], - { - "identifier": "domain", - "operands": [ - [ - "user" - ] - ] - } - ] - } - ] - } - ] - } - ] - } - }, - { - "operator": "OR", - "operands": [ - { - "operands": null, - "iterator": "EXISTS", - "binds": [ - "workflow" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "workflow" - ], - { - "operator": "AND", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - { - "identifier": "result-recipient", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - [ - "user" - ] - ] - } - ] - } - ] - } - }, - { - "operands": null, - "iterator": "EXISTS", - "binds": [ - "dataset2", - "recipient" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset2" - ], - { - "operator": "AND", - "operands": [ - { - "operator": "HOLDS", - "operands": [ - [ - "recipient" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "operator": "EQ", - "operands": [ - { - "operands": null, - "operand": [ - "recipient" - ], - "parameter": "user" - }, - [ - "user" - ] - ] - }, - { - "operator": "AND", - "operands": [ - { - "operator": "EQ", - "operands": [ - { - "operands": null, - "operand": [ - "recipient" - ], - "parameter": "dataset" - }, - [ - "dataset2" - ] - ] - }, - { - "identifier": "input-used-for-output", - "operands": [ - [ - "dataset" - ], - [ - "dataset2" - ] - ] - } - ] - } - ] - } - ] - } - ] - } - } - ] - } - ] - } - ], - "identified-by": [ - "dataset", - "user" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "task-to-execute", - "identified-by": [ - "task" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "dataset-to-transfer", - "identified-by": [ - "dataset", - "task" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "result-to-transfer", - "identified-by": [ - "workflow" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "cfact", - "name": "workflow-to-exectue", - "identified-by": [ - "workflow" - ] - } - ], - "triggers": [], - "violated": false, - "violations": [] - }, - { - "success": true, - "changes": [ - { - "kind": "predicate", - "expression": { - "operands": null, - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "operator": "EQ", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "operands": null, - "iterator": "FOREACH", - "binds": [ - "dataset" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset" - ], - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "function", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - } - ] - } - ] - } - } - ] - }, - 1 - ] - } - }, - "name": "one-function-per-task", - "is-invariant": true - } - ], - "triggers": [], - "violated": true, - "violations": [ - { - "kind": "invariant", - "identifier": "one-function-per-task", - "operands": [] - } - ] - }, - { - "success": true, - "changes": [ - { - "kind": "predicate", - "expression": { - "operands": null, - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "operator": "LT", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "operands": null, - "iterator": "FOREACH", - "binds": [ - "dataset" - ], - "expression": { - "operator": "WHEN", - "operands": [ - [ - "dataset" - ], - { - "operator": "HOLDS", - "operands": [ - { - "identifier": "output", - "operands": [ - [ - "task" - ], - [ - "dataset" - ] - ] - } - ] - } - ] - } - } - ] - }, - 2 - ] - } - }, - "name": "zero-or-one-output-per-task", - "is-invariant": true - }, - { - "kind": "create", - "operand": { - "identifier": "zero-or-one-output-per-task", - "operands": [] - } - } - ], - "triggers": [], - "violated": true, - "violations": [ - { - "kind": "invariant", - "identifier": "one-function-per-task", - "operands": [] - } - ] - }, - { - "success": true, - "changes": [ - { - "kind": "predicate", - "expression": { - "operands": null, - "iterator": "FORALL", - "binds": [ - "workflow" - ], - "expression": { - "operator": "LT", - "operands": [ - { - "operator": "COUNT", - "operands": [ - { - "operands": null, - "iterator": "FOREACH", - "binds": [ - "dataset", - "user" - ], - "expression": { - "operator": "WHEN", - "operands": [ - true, - { - "identifier": "result-recipient", - "operands": [ - { - "identifier": "result", - "operands": [ - [ - "workflow" - ], - [ - "dataset" - ] - ] - }, - [ - "user" - ] - ] - } - ] - } - } - ] - }, - 2 - ] - } - }, - "name": "zero-or-one-result-recipients-per-workflow", - "is-invariant": true - }, - { - "kind": "create", - "operand": { - "identifier": "zero-or-one-result-recipients-per-workflow", - "operands": [] - } - } - ], - "triggers": [], - "violated": true, - "violations": [ - { - "kind": "invariant", - "identifier": "one-function-per-task", - "operands": [] - } - ] - }, - { - "success": true, - "changes": [ - { - "kind": "predicate", - "expression": { - "operands": null, - "iterator": "FORALL", - "binds": [ - "task-to-execute" - ], - "expression": { - "operator": "WHEN", - "operands": [ - { - "operator": "HOLDS", - "operands": [ - { - "operands": null, - "operand": [ - "task-to-execute" - ], - "parameter": "task" - } - ] - }, - { - "operator": "HOLDS", - "operands": [ - [ - "task-to-execute" - ] - ] - } - ] - } - }, - "name": "requested-task-should-exist", - "is-invariant": true - }, - { - "kind": "create", - "operand": { - "identifier": "requested-task-should-exist", - "operands": [] - } - } - ], - "triggers": [], - "violated": true, - "violations": [ - { - "kind": "invariant", - "identifier": "one-function-per-task", - "operands": [] - } - ] - }, - { - "success": true, - "changes": [ - { - "kind": "predicate", - "expression": { - "operands": null, - "iterator": "FORALL", - "binds": [ - "task" - ], - "expression": { - "operands": null, - "iterator": "EXISTS", - "binds": [ - "workflow" - ], - "expression": { - "identifier": "task-in", - "operands": [ - [ - "workflow" - ], - [ - "task" - ] - ] - } - } - }, - "name": "task-should-be-part-of-workflow", - "is-invariant": true - } - ], - "triggers": [], - "violated": true, - "violations": [ - { - "kind": "invariant", - "identifier": "one-function-per-task", - "operands": [] - }, - { - "kind": "invariant", - "identifier": "task-should-be-part-of-workflow", - "operands": [] - } - ] - }, - { - "success": true, - "changes": [ - { - "kind": "obfuscate", - "operand": { - "identifier": "requested-task-should-exist", - "operands": [] - } - }, - { - "kind": "create", - "operand": { - "identifier": "task-to-execute", - "operands": [ - { - "identifier": "task", - "operands": [ - "X" - ] - } - ] - } - } - ], - "triggers": [], - "violated": true, - "violations": [ - { - "kind": "invariant", - "identifier": "task-should-be-part-of-workflow", - "operands": [] - }, - { - "kind": "invariant", - "identifier": "one-function-per-task", - "operands": [] - }, - { - "kind": "invariant", - "identifier": "requested-task-should-exist", - "operands": [] - } - ] - } - ] -} \ No newline at end of file diff --git a/examples/eflint_reasonerconn/example-state.json b/examples/eflint_reasonerconn/example-state.json deleted file mode 100644 index 7d38c09..0000000 --- a/examples/eflint_reasonerconn/example-state.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "users": [ - { - "name": "amy" - }, - { - "name": "surf" - } - ], - "locations": [ - { - "name": "st_antonius" - }, - { - "name": "umc_utrecht" - }, - { - "name": "surf" - } - ], - "datasets": [ - { - "name": "epi-1.0.0", - "from": null - }, - { - "name": "st_antonius_ect", - "from": null - }, - { - "name": "umc_utrecht_ect", - "from": null - } - ], - "functions": [] -} \ No newline at end of file diff --git a/examples/eflint_reasonerconn/example-workflow.json b/examples/eflint_reasonerconn/example-workflow.json deleted file mode 100644 index c9cafa4..0000000 --- a/examples/eflint_reasonerconn/example-workflow.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "id": "workflow-kQKDa34a", - "start": { - "Task": { - "id": "workflow-kQKDa34a-
:1-task", - "name": "copy_result", - "package": "copy_result", - "version": "1.1.0", - "input": [ - { - "name": "Test", - "from": null - } - ], - "output": { - "name": "result_copy_result_02da77", - "from": null - }, - "location": null, - "metadata": [], - "next": { - "Commit": { - "id": "workflow-kQKDa34a-
:3-commit", - "data_name": "result", - "input": [ - { - "name": "result_copy_result_02da77", - "from": null - } - ], - "next": { - "Stop": [ - { - "name": "result", - "from": null - } - ] - } - } - } - } - }, - "user": { - "name": "Danny Data Scientist" - }, - "metadata": [], - "signature": "its_signed_i_swear_mom" -} diff --git a/examples/no_op.rs b/examples/no_op.rs new file mode 100644 index 0000000..1d3bf59 --- /dev/null +++ b/examples/no_op.rs @@ -0,0 +1,90 @@ +// NO OP.rs +// by Lut99 +// +// Created: +// 10 Oct 2024, 16:17:21 +// Last edited: +// 02 Dec 2024, 14:34:47 +// Auto updated? +// Yes +// +// Description: +//! Showcases the reasoner with a super dummy backend reasoner that +//! always accepts anything. +// + +use std::process::ExitCode; + +use clap::Parser; +use console::style; +use miette::{Context as _, IntoDiagnostic as _}; +use policy_reasoner::loggers::file::FileLogger; +use policy_reasoner::reasoners::no_op::NoOpReasonerConnector; +use policy_reasoner::spec::ReasonerConnector as _; +use policy_reasoner::spec::auditlogger::SessionedAuditLogger; +use policy_reasoner::spec::reasonerconn::ReasonerResponse; +use tracing::{Level, error, info}; + + +/***** ARGUMENTS *****/ +/// The arguments for this binary. +#[derive(Parser)] +pub struct Arguments { + /// Whether to make `info!()` and `debug!()` visible. + #[clap(long, help = "If given, enables INFO- and DEBUG-level logging.")] + debug: bool, + /// Whether to make `trace!()` visible. + #[clap(long, help = "If given, enables TRACE-level logging. Implies '--debug'.")] + trace: bool, +} + + + + + +/***** ENTRYPOINT *****/ +#[tokio::main(flavor = "current_thread")] +async fn main() -> ExitCode { + // Parse the arguments + let args = Arguments::parse(); + + // Setup the logger + tracing_subscriber::fmt() + .with_max_level(if args.trace { + Level::TRACE + } else if args.debug { + Level::DEBUG + } else { + Level::WARN + }) + .init(); + info!("{} - v{}", env!("CARGO_BIN_NAME"), env!("CARGO_PKG_VERSION")); + + match run(args).await { + Ok(()) => ExitCode::SUCCESS, + Err(err) => { + error!("{err:?}"); + ExitCode::FAILURE + }, + } +} + +async fn run(_args: Arguments) -> miette::Result<()> { + // Create the logger + let mut logger = + SessionedAuditLogger::new("test", FileLogger::new(format!("{} - v{}", env!("CARGO_BIN_NAME"), env!("CARGO_PKG_VERSION")), "./test.log")); + + // Run the reasoner + let conn = NoOpReasonerConnector::new_async(&mut logger).await.into_diagnostic().context("Failed to setup no-op reasoner")?; + let verdict = conn.consult((), (), &logger).await.unwrap(); + + // OK, report + match verdict { + ReasonerResponse::Success => println!("{} {}", style("Reasoner says:").bold(), style("OK").bold().green()), + ReasonerResponse::Violated(_) => { + println!("{} {}", style("Reasoner says:").bold(), style("VIOLATION").bold().red()); + }, + } + + Ok(()) +} diff --git a/examples/posix.rs b/examples/posix.rs new file mode 100644 index 0000000..617a464 --- /dev/null +++ b/examples/posix.rs @@ -0,0 +1,175 @@ +// UNIX.rs +// by Lut99 +// +// Created: +// 11 Oct 2024, 16:32:29 +// Last edited: +// 17 Oct 2024, 12:00:53 +// Auto updated? +// Yes +// +// Description: +//! Showcases the reasoner with a backend that overlays Unix file +//! persmissions. +// + +use std::path::PathBuf; +use std::process::ExitCode; + +use clap::Parser; +use console::style; +use file_logger::FileLogger; +use miette::{Context as _, IntoDiagnostic as _}; +use policy_reasoner::reasoners::posix::{PosixReasonerConnector, State}; +use policy_reasoner::spec::ReasonerConnector as _; +use policy_reasoner::spec::auditlogger::SessionedAuditLogger; +use policy_reasoner::workflow::Workflow; +use posix_reasoner::config::Config; +use share::InputFile; +use spec::reasonerconn::ReasonerResponse; +use tokio::fs; +use tokio::io::{self, AsyncReadExt as _}; +use tracing::{Level, debug, error, info}; + + +/***** HELPER FUNCTIONS *****/ +/// Reads a [`Workflow`] from either stdin or disk. +/// +/// # Arguments +/// - `input`: Either '-' to read from stdin, or a path of the file to read from otherwise. +/// +/// # Returns +/// A parsed [`Workflow`] file. +/// +/// # Errors +/// This function errors if it failed to read stdin OR the file, or parse it as a valid Workflow. +async fn load_workflow(input: &InputFile) -> miette::Result { + let workflow = match input { + InputFile::Stdin => { + debug!("Reading workflow from stdin"); + let mut raw: Vec = Vec::new(); + io::stdin().read_buf(&mut raw).await.into_diagnostic().context("Failed to read from stdin")?; + String::from_utf8(raw).into_diagnostic().context("Stdin is not valid UTF-8")? + }, + InputFile::File(path) => { + debug!("Reading workflow from file"); + fs::read_to_string(path) + .await + .into_diagnostic() + .with_context(|| format!("Failed to read the workflow from {input}", input = input.display()))? + }, + }; + + let workflow = serde_json::from_str(&workflow).into_diagnostic().with_context(|| format!("{input:?} is not a valid workflow"))?; + + Ok(workflow) +} + +/// Reads a [`Config`] from disk. +/// +/// # Arguments +/// - `path`: The path to the config file to load. +/// +/// # Returns +/// A parsed [`Config`] file. +/// +/// # Errors +/// This function errors if it failed to read the file, or it did not contain a valid config. +async fn load_config(path: PathBuf) -> miette::Result { + // Load the file and parse it + let config: String = + fs::read_to_string(&path).await.into_diagnostic().with_context(|| format!("Failed to read the config file {path}", path = path.display()))?; + + let mut config: Config = + serde_json::from_str(&config).into_diagnostic().with_context(|| format!("File {path} is not a valid config file", path = path.display()))?; + + // Resolve relative files to relative to the binary, for consistency of calling the example + let path = std::env::current_exe().into_diagnostic().context("Failed to obtain the current executable's path")?; + let prefix = if let Some(parent) = path.parent() { parent.into() } else { path }; + + for path in config.data.values_mut().map(|data| &mut data.path) { + if path.is_relative() { + *path = prefix.join(&*path); + } + } + debug!("Config after resolving relative paths: {config:?}"); + + // Done + Ok(config) +} + + + +/***** ARGUMENTS *****/ +/// The arguments for this binary. +#[derive(Parser)] +pub struct Arguments { + /// Whether to make `info!()` and `debug!()` visible. + #[clap(long, help = "If given, enables INFO- and DEBUG-level logging.")] + debug: bool, + /// Whether to make `trace!()` visible. + #[clap(long, help = "If given, enables TRACE-level logging. Implies '--debug'.")] + trace: bool, + + /// The file containing the workflow to check. + #[clap(name = "WORKFLOW", default_value = "-", help = "The JSON workflow to evaluate. Use '-' to read from stdin.")] + workflow: InputFile, + /// The file containing the config for the reasoner. + #[clap(short, long, help = "The JSON configuration file to read that configures the policy.")] + config: PathBuf, +} + + + + + +/***** ENTRYPOINT *****/ +#[tokio::main(flavor = "current_thread")] +async fn main() -> ExitCode { + // Parse the arguments + let args = Arguments::parse(); + + // Setup the logger + tracing_subscriber::fmt() + .with_max_level(if args.trace { + Level::TRACE + } else if args.debug { + Level::DEBUG + } else { + Level::WARN + }) + .init(); + info!("{} - v{}", env!("CARGO_BIN_NAME"), env!("CARGO_PKG_VERSION")); + + match run(args).await { + Ok(()) => ExitCode::SUCCESS, + Err(err) => { + error!("{err:?}"); + ExitCode::FAILURE + }, + } +} +async fn run(args: Arguments) -> miette::Result<()> { + // Read the workflow & config + let workflow: Workflow = load_workflow(&args.workflow).await.context("Could not load workflow")?; + let config: Config = load_config(args.config).await.context("Could not load config")?; + + // Create the logger + let mut logger = + SessionedAuditLogger::new("test", FileLogger::new(format!("{} - v{}", env!("CARGO_BIN_NAME"), env!("CARGO_PKG_VERSION")), "./test.log")); + + // Run the reasoner + let conn = PosixReasonerConnector::new_async(&mut logger).await.into_diagnostic().context("Failed to create the POSIX reasoner")?; + + let verdict = conn.consult(State { workflow, config }, (), &logger).await.into_diagnostic().context("Failed to consult the POSIX reasoner")?; + + // OK, report + match verdict { + ReasonerResponse::Success => println!("{} {}", style("Reasoner says:").bold(), style("OK").bold().green()), + ReasonerResponse::Violated(_) => { + println!("{} {}", style("Reasoner says:").bold(), style("VIOLATION").bold().red()); + }, + } + + Ok(()) +} diff --git a/examples/requests/exec-task.json b/examples/requests/exec-task.json deleted file mode 100644 index 102caf2..0000000 --- a/examples/requests/exec-task.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "workflow": { - "table": { - "funcs": [ - { - "n": "print", - "a": [ - { - "kind": "str" - } - ], - "r": { - "kind": "void" - } - }, - { - "n": "println", - "a": [ - { - "kind": "str" - } - ], - "r": { - "kind": "void" - } - }, - { - "n": "len", - "a": [ - { - "kind": "arr", - "t": { - "kind": "any" - } - } - ], - "r": { - "kind": "int" - } - }, - { - "n": "commit_result", - "a": [ - { - "kind": "str" - }, - { - "kind": "res" - } - ], - "r": { - "kind": "data" - } - } - ], - "tasks": [ - { - "kind": "cmp", - "p": "copy_result", - "v": "1.1.0", - "d": { - "n": "copy_result", - "a": [ - { - "kind": "res" - } - ], - "r": { - "kind": "res" - } - }, - "a": [ - "result" - ], - "r": [] - } - ], - "classes": [ - { - "n": "Data", - "i": null, - "v": null, - "p": [ - { - "n": "name", - "t": { - "kind": "str" - } - } - ], - "m": [] - }, - { - "n": "IntermediateResult", - "i": null, - "v": null, - "p": [ - { - "n": "path", - "t": { - "kind": "str" - } - } - ], - "m": [] - } - ], - "vars": [ - { - "n": "data", - "t": { - "kind": "data" - } - }, - { - "n": "res", - "t": { - "kind": "res" - } - } - ], - "results": {} - }, - "graph": [ - { - "kind": "lin", - "i": [ - { - "kind": "vrd", - "d": 0 - }, - { - "kind": "str", - "v": "Test" - }, - { - "kind": "ins", - "d": 0 - }, - { - "kind": "vrs", - "d": 0 - }, - { - "kind": "vrd", - "d": 1 - }, - { - "kind": "vrg", - "d": 0 - }, - { - "kind": "cst", - "t": { - "kind": "res" - } - } - ], - "n": 1 - }, - { - "kind": "nod", - "t": 0, - "l": "all", - "s": "hospital_A", - "i": { - "{\"Data\":\"Test\"}": { - "kind": "available", - "h": { - "file": { - "path": "/some/path" - } - } - } - }, - "r": "result_copy_result_951985", - "n": 2 - }, - { - "kind": "lin", - "i": [ - { - "kind": "vrs", - "d": 1 - }, - { - "kind": "str", - "v": "result" - }, - { - "kind": "vrg", - "d": 1 - }, - { - "kind": "fnc", - "d": 3 - } - ], - "n": 3 - }, - { - "kind": "cll", - "i": [ - { - "IntermediateResult": "result_copy_result_951985" - } - ], - "r": [ - { - "Data": "result" - } - ], - "n": 4 - }, - { - "kind": "ret", - "r": [ - { - "Data": "result" - } - ] - } - ], - "funcs": {} - }, - "task_id": [ - 18446744073709551615, - 1 - ] -} \ No newline at end of file diff --git a/examples/requests/workflow.json b/examples/requests/workflow.json deleted file mode 100644 index 84656d4..0000000 --- a/examples/requests/workflow.json +++ /dev/null @@ -1,309 +0,0 @@ -{ - "table": { - "funcs": { - "d": [ - { - "n": "print", - "a": [ - { - "kind": "str" - } - ], - "r": { - "kind": "void" - }, - "t": { - "funcs": { - "d": [], - "o": 18446744073709551615 - }, - "tasks": { - "d": [], - "o": 18446744073709551615 - }, - "classes": { - "d": [], - "o": 18446744073709551615 - }, - "vars": { - "d": [], - "o": 18446744073709551615 - }, - "results": {} - } - }, - { - "n": "println", - "a": [ - { - "kind": "str" - } - ], - "r": { - "kind": "void" - }, - "t": { - "funcs": { - "d": [], - "o": 18446744073709551615 - }, - "tasks": { - "d": [], - "o": 18446744073709551615 - }, - "classes": { - "d": [], - "o": 18446744073709551615 - }, - "vars": { - "d": [], - "o": 18446744073709551615 - }, - "results": {} - } - }, - { - "n": "len", - "a": [ - { - "kind": "arr", - "t": { - "kind": "any" - } - } - ], - "r": { - "kind": "int" - }, - "t": { - "funcs": { - "d": [], - "o": 18446744073709551615 - }, - "tasks": { - "d": [], - "o": 18446744073709551615 - }, - "classes": { - "d": [], - "o": 18446744073709551615 - }, - "vars": { - "d": [], - "o": 18446744073709551615 - }, - "results": {} - } - }, - { - "n": "commit_result", - "a": [ - { - "kind": "str" - }, - { - "kind": "res" - } - ], - "r": { - "kind": "data" - }, - "t": { - "funcs": { - "d": [], - "o": 18446744073709551615 - }, - "tasks": { - "d": [], - "o": 18446744073709551615 - }, - "classes": { - "d": [], - "o": 18446744073709551615 - }, - "vars": { - "d": [], - "o": 18446744073709551615 - }, - "results": {} - } - } - ], - "o": 0 - }, - "tasks": { - "d": [ - { - "kind": "cmp", - "p": "copy_result", - "v": "1.1.0", - "d": { - "n": "copy_result", - "a": [ - { - "kind": "res" - } - ], - "r": { - "kind": "res" - }, - "t": { - "funcs": { - "d": [], - "o": 0 - }, - "tasks": { - "d": [], - "o": 0 - }, - "classes": { - "d": [], - "o": 0 - }, - "vars": { - "d": [], - "o": 0 - }, - "results": {} - } - }, - "a": [ - "result" - ], - "r": [] - } - ], - "o": 0 - }, - "classes": { - "d": [ - { - "n": "Data", - "i": null, - "v": null, - "p": [ - { - "n": "name", - "t": { - "kind": "str" - } - } - ], - "m": [] - }, - { - "n": "IntermediateResult", - "i": null, - "v": null, - "p": [ - { - "n": "path", - "t": { - "kind": "str" - } - } - ], - "m": [] - } - ], - "o": 0 - }, - "vars": { - "d": [ - { - "n": "data", - "t": { - "kind": "data" - } - }, - { - "n": "res", - "t": { - "kind": "res" - } - } - ], - "o": 0 - }, - "results": {} - }, - "graph": [ - { - "kind": "lin", - "i": [ - { - "kind": "vrd", - "d": 0 - }, - { - "kind": "str", - "v": "Test" - }, - { - "kind": "ins", - "d": 0 - }, - { - "kind": "vrs", - "d": 0 - }, - { - "kind": "vrd", - "d": 1 - }, - { - "kind": "vrg", - "d": 0 - }, - { - "kind": "cst", - "t": { - "kind": "res" - } - } - ], - "n": 1 - }, - { - "kind": "nod", - "t": 0, - "l": "all", - "s": null, - "i": { - "{\"Data\":\"Test\"}": null - }, - "r": "result_copy_result_d220be", - "n": 2 - }, - { - "kind": "lin", - "i": [ - { - "kind": "vrs", - "d": 1 - }, - { - "kind": "str", - "v": "result" - }, - { - "kind": "vrg", - "d": 1 - }, - { - "kind": "fnc", - "d": 3 - } - ], - "n": 3 - }, - { - "kind": "cll", - "n": 4 - }, - { - "kind": "ret" - } - ], - "funcs": {} -} diff --git a/lib/audit-logger/Cargo.toml b/lib/audit-logger/Cargo.toml deleted file mode 100644 index d5f798b..0000000 --- a/lib/audit-logger/Cargo.toml +++ /dev/null @@ -1,28 +0,0 @@ -[package] -name = "audit-logger" -rust-version = "1.81" -edition = "2021" -version.workspace = true -repository.workspace = true -authors.workspace = true -license.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -# Crates.io -async-trait = "0.1.67" -hex = "0.4.3" -serde = "1.0.204" -serde_json = "1.0.120" -warp = "0.3" - -# Path -auth-resolver = { path = "../auth-resolver" } -deliberation = { path = "../deliberation" } -policy = { path = "../policy" } -state-resolver = { path = "../state-resolver" } -workflow = { path = "../workflow" } - -# Git -enum-debug.workspace = true diff --git a/lib/audit-logger/src/lib.rs b/lib/audit-logger/src/lib.rs deleted file mode 100644 index 3551493..0000000 --- a/lib/audit-logger/src/lib.rs +++ /dev/null @@ -1,336 +0,0 @@ -use std::borrow::Cow; -use std::collections::hash_map::DefaultHasher; -use std::fmt::Debug; -use std::hash::{Hash as _, Hasher as _}; - -use auth_resolver::AuthContext; -use deliberation::spec::Verdict; -use enum_debug::EnumDebug; -use policy::Policy; -use serde::{Deserialize, Serialize}; -use serde_json::Value; -use state_resolver::State; -use workflow::Workflow; - -#[derive(Debug)] -pub enum Error { - CouldNotDeliver(String), -} - -impl std::fmt::Display for Error { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::CouldNotDeliver(msg) => { - write!(f, "Could not deliver: {}", msg) - }, - } - } -} - -impl std::error::Error for Error {} - -impl warp::reject::Reject for Error {} - -pub trait ConnectorContext { - fn r#type(&self) -> String; - fn version(&self) -> String; -} - -/// Defines an intermediary that allows us to conveniently log `ReasonerConnector`'s context. -pub trait ConnectorWithContext { - /// The type returned by [`Self::context()`]. - type Context: ConnectorContext + std::hash::Hash + Sync + Send + Serialize + Clone + core::fmt::Debug; - - /// Returns hash of connector's context. - /// - /// If anything about the connector changes that can have an effect on the evaluation of a policy - /// the returned hash must be different - fn hash() -> String { - let mut hasher = DefaultHasher::new(); - Self::context().hash(&mut hasher); - // digest() - let h = hasher.finish(); - hex::encode(h.to_be_bytes()) - } - /// Returns so-called "full context" about the reasoner connector that is relevant for the audit log. - /// - /// In particular, this should al least contain the type of the connector used and its version. - fn context() -> Self::Context; -} - -/// Collects everything we might want to log in an [`AuditLogger`]. -/// -/// TODO: Nicer to move this to the toplevel crate, `logger.rs`. -#[derive(Clone, Debug, Deserialize, EnumDebug, Serialize)] -#[serde(tag = "kind", rename_all = "SCREAMING-KEBAB-CASE")] -pub enum LogStatement<'a> { - /// A request that asks if a task may be executed has been received. - ExecuteTask { - reference: Cow<'a, str>, - auth: Cow<'a, AuthContext>, - policy: i64, - state: Cow<'a, State>, - workflow: Cow<'a, Workflow>, - task: Cow<'a, str>, - }, - /// A request that asks if an asset may be accessed has been received. - AssetAccess { - reference: Cow<'a, str>, - auth: Cow<'a, AuthContext>, - policy: i64, - state: Cow<'a, State>, - workflow: Cow<'a, Workflow>, - data: Cow<'a, str>, - #[serde(skip_serializing_if = "Option::is_none")] - task: Option>, - }, - /// A request that asks if a workflow is permitted has been received. - WorkflowValidate { - reference: Cow<'a, str>, - auth: Cow<'a, AuthContext>, - policy: i64, - state: Cow<'a, State>, - workflow: Cow<'a, Workflow>, - }, - - /// Logs the raw response of a reasoner. - ReasonerResponse { reference: Cow<'a, str>, response: Cow<'a, str> }, - /// Logs the official response of a reasoner. - ReasonerVerdict { reference: Cow<'a, str>, verdict: Cow<'a, Verdict> }, - - /// Logs the reasoner backend for during startup. - ReasonerContext { connector_context: Value, connector_context_hash: String }, - /// Logs the arrival of a new policy. - PolicyAdd { auth: Cow<'a, AuthContext>, connector_context_hash: String, policy: Cow<'a, Policy> }, - /// Logs the activation of an existing policy. - PolicyActivate { auth: Cow<'a, AuthContext>, policy: Cow<'a, Policy> }, - /// Logs the deactivation of the current active policy. - PolicyDeactivate { auth: Cow<'a, AuthContext> }, -} -impl<'a> LogStatement<'a> { - /// Constructor for a [`LogStatement::ExecuteTask`] that makes it a bit more convenient to initialize. - /// - /// # Arguments - /// - `reference`: The reference ID for this request. - /// - `auth`: The [`AuthContext`] that explains who performed the request. - /// - `policy`: The [`Policy`] used to evaluate the request. - /// - `state`: The [`State`] given to the policy for evaluation. - /// - `workflow`: The [`Workflow`] that is being evaluated. - /// - `task`: Which task in the `workflow` we're specifically considering. - /// - /// # Returns - /// A new [`LogStatement::ExecuteTask`] that is initialized with the given properties. - #[inline] - pub fn execute_task(reference: &'a str, auth: &'a AuthContext, policy: i64, state: &'a State, workflow: &'a Workflow, task: &'a str) -> Self { - Self::ExecuteTask { - reference: Cow::Borrowed(reference), - auth: Cow::Borrowed(auth), - policy, - state: Cow::Borrowed(state), - workflow: Cow::Borrowed(workflow), - task: Cow::Borrowed(task), - } - } - - /// Constructor for a [`LogStatement::AssetAccess`] that makes it a bit more convenient to initialize. - /// - /// # Arguments - /// - `reference`: The reference ID for this request. - /// - `auth`: The [`AuthContext`] that explains who performed the request. - /// - `policy`: The [`Policy`] used to evaluate the request. - /// - `state`: The [`State`] given to the policy for evaluation. - /// - `workflow`: The [`Workflow`] that is being evaluated. - /// - `task`: Which task in the `workflow` we're specifically considering. - /// - /// # Returns - /// A new [`LogStatement::AssetAccess`] that is initialized with the given properties. - #[inline] - pub fn asset_access( - reference: &'a str, - auth: &'a AuthContext, - policy: i64, - state: &'a State, - workflow: &'a Workflow, - data: &'a str, - task: &'a Option, - ) -> Self { - Self::AssetAccess { - reference: Cow::Borrowed(reference), - auth: Cow::Borrowed(auth), - policy, - state: Cow::Borrowed(state), - workflow: Cow::Borrowed(workflow), - data: Cow::Borrowed(data), - task: task.as_ref().map(|t| Cow::Borrowed(t.as_str())), - } - } - - /// Constructor for a [`LogStatement::WorkflowValidate`] that makes it a bit more convenient to initialize. - /// - /// # Arguments - /// - `reference`: The reference ID for this request. - /// - `auth`: The [`AuthContext`] that explains who performed the request. - /// - `policy`: The [`Policy`] used to evaluate the request. - /// - `state`: The [`State`] given to the policy for evaluation. - /// - `workflow`: The [`Workflow`] that is being evaluated. - /// - `task`: Which task in the `workflow` we're specifically considering. - /// - /// # Returns - /// A new [`LogStatement::WorkflowValidate`] that is initialized with the given properties. - #[inline] - pub fn workflow_validate(reference: &'a str, auth: &'a AuthContext, policy: i64, state: &'a State, workflow: &'a Workflow) -> Self { - Self::WorkflowValidate { - reference: Cow::Borrowed(reference), - auth: Cow::Borrowed(auth), - policy, - state: Cow::Borrowed(state), - workflow: Cow::Borrowed(workflow), - } - } - - /// Constructor for a [`LogStatement::ReasonerResponse`] that makes it a bit more convenient to initialize. - /// - /// # Arguments - /// - `reference`: The reference ID for this request. - /// - `response`: The raw response as returned by the reasoner. - /// - /// # Returns - /// A new [`LogStatement::ReasonerResponse`] that is initialized with the given properties. - #[inline] - pub fn reasoner_response(reference: &'a str, response: &'a str) -> Self { - Self::ReasonerResponse { reference: Cow::Borrowed(reference), response: Cow::Borrowed(response) } - } - - /// Constructor for a [`LogStatement::ReasonerVerdict`] that makes it a bit more convenient to initialize. - /// - /// # Arguments - /// - `reference`: The reference ID for this request. - /// - `verdict`: The verdict given by the reasoner. - /// - /// # Returns - /// A new [`LogStatement::ReasonerVerdict`] that is initialized with the given properties. - #[inline] - pub fn reasoner_verdict(reference: &'a str, verdict: &'a Verdict) -> Self { - Self::ReasonerVerdict { reference: Cow::Borrowed(reference), verdict: Cow::Borrowed(verdict) } - } - - /// Constructor for a [`LogStatement::ReasonerContext`] that makes it a bit more convenient to initialize. - /// - /// # Arguments - /// - `context`: The context that is used to give answers with this reasoner. - /// - /// # Returns - /// A new [`LogStatement::ReasonerContext`] that is initialized with the given properties. - #[inline] - pub fn reasoner_context() -> Self { - Self::ReasonerContext { - connector_context: serde_json::to_value(C::context()) - .unwrap_or_else(|err| panic!("Could not serialize context of {}: {}", std::any::type_name::(), err)), - connector_context_hash: C::hash(), - } - } - - /// Constructor for a [`LogStatement::PolicyAdd`] that makes it a bit more convenient to initialize. - /// - /// # Arguments - /// - `auth`: The [`AuthContext`] that explains who performed the request. - /// - `context`: The context that is used to give answers with this reasoner. - /// - `policy`: The [`Policy`] added to the checker in this request. - /// - /// # Returns - /// A new [`LogStatement::ReasonerContext`] that is initialized with the given properties. - #[inline] - pub fn policy_add(auth: &'a AuthContext, policy: &'a Policy) -> Self { - Self::PolicyAdd { auth: Cow::Borrowed(auth), connector_context_hash: C::hash(), policy: Cow::Borrowed(policy) } - } - - /// Constructor for a [`LogStatement::PolicyActivate`] that makes it a bit more convenient to initialize. - /// - /// # Arguments - /// - `auth`: The [`AuthContext`] that explains who performed the request. - /// - `policy`: The [`Policy`] that got activated in this request. - /// - /// # Returns - /// A new [`LogStatement::PolicyActivate`] that is initialized with the given properties. - #[inline] - pub fn policy_activate(auth: &'a AuthContext, policy: &'a Policy) -> Self { - Self::PolicyActivate { auth: Cow::Borrowed(auth), policy: Cow::Borrowed(policy) } - } - - /// Constructor for a [`LogStatement::PolicyDeactivate`] that makes it a bit more convenient to initialize. - /// - /// # Arguments - /// - `auth`: The [`AuthContext`] that explains who performed the request. - /// - /// # Returns - /// A new [`LogStatement::PolicyDeactivate`] that is initialized with the given properties. - #[inline] - pub fn policy_deactivate(auth: &'a AuthContext) -> Self { Self::PolicyDeactivate { auth: Cow::Borrowed(auth) } } -} - -#[async_trait::async_trait] -pub trait AuditLogger: ReasonerConnectorAuditLogger { - async fn log_exec_task_request( - &self, - reference: &str, - auth: &AuthContext, - policy: i64, - state: &State, - workflow: &Workflow, - task: &str, - ) -> Result<(), Error>; - - // OK so it _may_ have a few functions. But again, not worth it to make a struct IMO. - #[allow(clippy::too_many_arguments)] - async fn log_data_access_request( - &self, - reference: &str, - auth: &AuthContext, - policy: i64, - state: &State, - workflow: &Workflow, - data: &str, - task: &Option, - ) -> Result<(), Error>; - - async fn log_validate_workflow_request( - &self, - reference: &str, - auth: &AuthContext, - policy: i64, - state: &State, - workflow: &Workflow, - ) -> Result<(), Error>; - - async fn log_verdict(&self, reference: &str, verdict: &Verdict) -> Result<(), Error>; - - /// Dumps the full context of the reasoner on startup. - /// - /// Note that it's recommended to use `ReasonerConnector::FullContext` for this, to include the full base specification. - async fn log_reasoner_context(&self) -> Result<(), Error>; - /// Logs that a new policy has been added, including the full policy. - /// - /// Note that it's recommended to use `ReasonerConnector::Context` for this, as the full base spec as already been logged at startup. - async fn log_add_policy_request(&self, auth: &AuthContext, policy: &Policy) -> Result<(), Error>; - - async fn log_set_active_version_policy(&self, auth: &AuthContext, policy: &Policy) -> Result<(), Error>; - - async fn log_deactivate_policy(&self, auth: &AuthContext) -> Result<(), Error>; -} - -#[async_trait::async_trait] -pub trait ReasonerConnectorAuditLogger { - async fn log_reasoner_response(&self, reference: &str, response: &str) -> Result<(), Error>; -} - -pub struct SessionedConnectorAuditLogger { - pub reference: String, - logger: Logger, -} -impl SessionedConnectorAuditLogger { - pub fn new(reference: String, logger: Logger) -> Self { Self { reference, logger } } - - pub async fn log_reasoner_response(&self, response: &str) -> Result<(), Error> { - self.logger.log_reasoner_response(&self.reference, response).await - } -} diff --git a/lib/auth-resolver/Cargo.toml b/lib/auth-resolver/Cargo.toml deleted file mode 100644 index 548a2ae..0000000 --- a/lib/auth-resolver/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "auth-resolver" -rust-version = "1.81" -edition = "2021" -version.workspace = true -repository.workspace = true -authors.workspace = true -license.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -async-trait = "0.1.67" -serde = { version = "1.0.204", features = ["derive"] } -warp = "0.3" diff --git a/lib/auth-resolver/src/lib.rs b/lib/auth-resolver/src/lib.rs deleted file mode 100644 index f6c9bda..0000000 --- a/lib/auth-resolver/src/lib.rs +++ /dev/null @@ -1,29 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct AuthContext { - pub initiator: String, - pub system: String, -} - -#[derive(Debug)] -pub struct AuthResolverError { - err: String, -} - -impl AuthResolverError { - pub fn new(err: String) -> Self { Self { err } } -} - -impl std::fmt::Display for AuthResolverError { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.err) } -} - -impl std::error::Error for AuthResolverError {} - -impl warp::reject::Reject for AuthResolverError {} - -#[async_trait::async_trait] -pub trait AuthResolver { - async fn authenticate(&self, headers: warp::http::HeaderMap) -> Result; -} diff --git a/lib/deliberation/Cargo.toml b/lib/deliberation/Cargo.toml deleted file mode 100644 index 99bf504..0000000 --- a/lib/deliberation/Cargo.toml +++ /dev/null @@ -1,33 +0,0 @@ -[package] -name = "deliberation" -rust-version = "1.81" -edition = "2021" -authors = ["Bas Kloosterman"] -version.workspace = true -repository.workspace = true -license.workspace = true - - -[dependencies] -# Crates.io -log = "0.4.22" -serde = { version="1.0.204", features=["derive"] } -serde_json = "1.0.120" -uuid = "1.7.0" - -# Workspace dependencies -enum-debug.workspace = true - -# Brane -brane-ast = { git = "https://github.com/braneframework/brane" } -brane-exe = { git = "https://github.com/braneframework/brane" } - - -[dev-dependencies] -# Crates.io -clap = { version = "4.5.6", features = ["derive"] } -log = "0.4.22" - -# Workspace dependencies -error-trace.workspace = true -humanlog.workspace = true diff --git a/lib/deliberation/src/lib.rs b/lib/deliberation/src/lib.rs deleted file mode 100644 index cc05df3..0000000 --- a/lib/deliberation/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod spec; diff --git a/lib/deliberation/src/spec.rs b/lib/deliberation/src/spec.rs deleted file mode 100644 index c448ffe..0000000 --- a/lib/deliberation/src/spec.rs +++ /dev/null @@ -1,92 +0,0 @@ -use brane_ast::Workflow; -use brane_exe::pc::ProgramCounter; -use serde::{Deserialize, Serialize}; - -/// ExecuteTaskRequest represents the question if it is allowed to execute a -/// certain task on this node -#[derive(Serialize, Deserialize)] -pub struct ExecuteTaskRequest { - /// Some identifier that allows the policy reasoner to assume a different context. - /// - /// Note that not any identifier is accepted. Which are depends on which plugins used. - pub use_case: String, - /// Workflow definition - pub workflow: Workflow, - /// The location of the task we're examining in the given `workflow`. - pub task_id: ProgramCounter, -} - -/// AccessDataRequest represents the question if a certain dataset -/// can be accessed -#[derive(Serialize, Deserialize)] -pub struct AccessDataRequest { - /// Some identifier that allows the policy reasoner to assume a different context. - /// - /// Note that not any identifier is accepted. Which are depends on which plugins used. - pub use_case: String, - /// Workflow definition - pub workflow: Workflow, - /// Identifier for the requested dataset - pub data_id: String, - /// The location of the task for which we transfer in the given `workflow`. If omitted, then this transfer should be interpreted as transferring the final result of the workflow. - pub task_id: Option, -} - -/// WorkflowValidationRequest represents the question -/// if a workflow as a whole is considered valid by the checker. -/// Used on the 'central' side to enforce 'central' policies -#[derive(Serialize, Deserialize)] -pub struct WorkflowValidationRequest { - /// Some identifier that allows the policy reasoner to assume a different context. - /// - /// Note that not any identifier is accepted. Which are depends on which plugins used. - pub use_case: String, - /// Workflow definition - pub workflow: Workflow, -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -#[serde(tag = "verdict")] -pub enum Verdict { - // Checker says yes - #[serde(rename = "allow")] - Allow(DeliberationAllowResponse), - // Checker says no - #[serde(rename = "deny")] - Deny(DeliberationDenyResponse), -} - -// DeliberationResponse represents the shared part of the the deliberation repsonses -// (Allow, Deny) -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct DeliberationResponse { - pub verdict_reference: String, -} - -// DeliberationResponse represents the answer the checker came up with -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct DeliberationAllowResponse { - #[serde(flatten)] - pub shared: DeliberationResponse, - /// Signature by the checker - pub signature: String, -} - -// DeliberationResponse represents the answer the checker came up with -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct DeliberationDenyResponse { - #[serde(flatten)] - pub shared: DeliberationResponse, - /// A optional list that contains the reasons that the request is denied. - /// Only present if the request is denied and it only contains reasons - /// the checker wants to share. - pub reasons_for_denial: Option>, -} - -pub type TaskExecResponse = DeliberationResponse; -pub type DataAccessResponse = DeliberationResponse; -pub type WorkflowValidationResponse = DeliberationResponse; - -// POST /v1/deliberation/execute-task -// POST /v1/deliberation/access-data -// POST /v1/deliberation/execute-workflow diff --git a/lib/eflint-to-json/Cargo.toml b/lib/eflint-to-json/Cargo.toml index 12c7170..c58c6d5 100644 --- a/lib/eflint-to-json/Cargo.toml +++ b/lib/eflint-to-json/Cargo.toml @@ -1,22 +1,28 @@ [package] name = "eflint-to-json" description = "Defines a high-level wrapper around Olaf's [`eflint-to-json`](https://github.com/Olaf-Erkemeij/eflint-server) executable that compiles eFLINT to eFLINT JSON Specification." -rust-version = "1.81" +rust-version = "1.82.0" edition = "2021" -version.workspace = true +version = "0.2.0" +authors = ["Tim Müller"] repository.workspace = true -authors.workspace = true license.workspace = true [dependencies] -async-recursion = "1.0" -console = "0.15.5" -futures-util = "0.3.30" -hex = "0.4.3" -hex-literal = "0.4" +async-recursion = { version = "1.0.0", optional = true } +console = "0.15.0" +futures-util = { version = "0.3.30", optional = true } +hex = "0.4.0" +hex-literal = "0.4.0" indicatif = "0.17" -log = "0.4.22" -reqwest = { version = "0.12.0", features = ["blocking", "stream"] } -sha2 = "0.10.6" -tokio = { version = "1.38.0", default-features = false, features = ["fs", "process"]} +reqwest = { version = "0.12.0", default-features = false, features = ["blocking", "stream"] } +sha2 = "0.10.1" +thiserror = "2.0.0" +tokio = { version = "1.44.2", default-features = false, features = ["fs", "io-util", "process"], optional = true } +tracing = { version = "0.1.37" } + +[features] +default = [] + +async-tokio = ["dep:async-recursion", "dep:futures-util", "dep:tokio"] diff --git a/lib/eflint-to-json/src/download.rs b/lib/eflint-to-json/src/download.rs index c5ad98a..9b96a6e 100644 --- a/lib/eflint-to-json/src/download.rs +++ b/lib/eflint-to-json/src/download.rs @@ -4,7 +4,7 @@ // Created: // 29 Nov 2023, 15:11:58 // Last edited: -// 12 Jun 2024, 17:45:43 +// 11 Oct 2024, 16:08:06 // Auto updated? // Yes // @@ -13,96 +13,69 @@ // use std::fmt::{Display, Formatter, Result as FResult}; +use std::fs; use std::io::Write as _; use std::path::{Path, PathBuf}; use std::str::FromStr as _; -use std::{error, fs}; use console::Style; +#[cfg(feature = "async-tokio")] use futures_util::StreamExt as _; use indicatif::{ProgressBar, ProgressStyle}; -use log::debug; -use reqwest::{Client, Request, Response, StatusCode, Url, blocking}; +#[cfg(feature = "async-tokio")] +use reqwest::{Client, Request, Response}; +use reqwest::{StatusCode, Url, blocking}; use sha2::{Digest as _, Sha256}; +#[cfg(feature = "async-tokio")] use tokio::fs as tfs; +#[cfg(feature = "async-tokio")] use tokio::io::AsyncWriteExt as _; +use tracing::debug; + /***** ERRORS *****/ /// Wraps the contents of an error body. -#[derive(Debug)] +#[derive(Debug, thiserror::Error)] +#[error("{0}")] pub struct ResponseBodyError(pub String); -impl Display for ResponseBodyError { - fn fmt(&self, f: &mut Formatter<'_>) -> FResult { write!(f, "{}", self.0) } -} -impl error::Error for ResponseBodyError {} -/// Defines errors occurring with [`download_file_async()`]. -#[derive(Debug)] + + +/// Defines errors occurring with [`download_file()`]. +#[derive(Debug, thiserror::Error)] pub enum Error { /// Failed to create a file. - FileCreate { path: PathBuf, err: std::io::Error }, + #[error("Failed to create output file '{}'", path.display())] + FileCreate { path: PathBuf, source: std::io::Error }, /// Failed to write to the output file. - FileWrite { path: PathBuf, err: std::io::Error }, + #[error("Failed to write to output file '{}'", path.display())] + FileWrite { path: PathBuf, source: std::io::Error }, /// The checksum of a file was not what we expected. + #[error("Checksum of downloaded file '{}' is incorrect: expected '{got}', got '{expected}'", path.display())] FileChecksum { path: PathBuf, got: String, expected: String }, /// Directory not found. + #[error("Directory '{}' not found", path.display())] DirNotFound { path: PathBuf }, /// The given address did not have HTTPS enabled. + #[error("Security policy requires HTTPS is enabled, but '{address}' does not enable it (or we cannot parse the URL)")] NotHttps { address: String }, /// Failed to send a request to the given address. - Request { address: String, err: reqwest::Error }, + #[error("Failed to send GET-request to '{address}'")] + Request { address: String, source: reqwest::Error }, /// The given server responded with a non-2xx status code. - RequestFailure { address: String, code: StatusCode, err: Option }, + #[error("GET-request to '{address}' failed with status code {} ({})", code.as_u16(), code.canonical_reason().unwrap_or("???"))] + RequestFailure { address: String, code: StatusCode, source: Option }, /// Failed to download the full file stream. - Download { address: String, err: reqwest::Error }, -} -impl Display for Error { - fn fmt(&self, f: &mut Formatter<'_>) -> FResult { - use Error::*; - match self { - FileCreate { path, .. } => write!(f, "Failed to create output file '{}'", path.display()), - FileWrite { path, .. } => write!(f, "Failed to write to output file '{}'", path.display()), - FileChecksum { path, got, expected } => { - write!(f, "Checksum of downloaded file '{}' is incorrect: expected '{}', got '{}'", path.display(), got, expected) - }, - - DirNotFound { path } => write!(f, "Directory '{}' not found", path.display()), - - NotHttps { address } => { - write!(f, "Security policy requires HTTPS is enabled, but '{address}' does not enable it (or we cannot parse the URL)") - }, - Request { address, .. } => write!(f, "Failed to send GET-request to '{address}'"), - RequestFailure { address, code, .. } => { - write!(f, "GET-request to '{}' failed with status code {} ({})", address, code.as_u16(), code.canonical_reason().unwrap_or("???")) - }, - Download { address, .. } => write!(f, "Failed to download file '{address}'"), - } - } -} -impl std::error::Error for Error { - fn source(&self) -> Option<&(dyn error::Error + 'static)> { - use Error::*; - match self { - FileCreate { err, .. } => Some(err), - FileWrite { err, .. } => Some(err), - FileChecksum { .. } => None, - - DirNotFound { .. } => None, - - NotHttps { .. } => None, - Request { err, .. } => Some(err), - RequestFailure { err, .. } => err.as_ref().map(|err| { - // Use a little bit of indirection to coerce into the trait object - let err: &dyn error::Error = err; - err - }), - Download { err, .. } => Some(err), - } - } + #[error("Failed to download file '{address}'")] + Download { address: String, source: reqwest::Error }, } + + + + /***** AUXILLARY *****/ /// Defines things to do to assert a downloaded file is secure and what we expect. #[derive(Clone, Debug)] @@ -176,6 +149,10 @@ impl Display for DownloadSecurity<'_> { } } + + + + /***** LIBRARY *****/ /// Downloads some file from the interwebs to the given location. /// @@ -192,12 +169,17 @@ impl Display for DownloadSecurity<'_> { /// /// # Errors /// This function may error if we failed to download the file or write it (which may happen if the parent directory of `local` does not exist, among other things). -pub fn download_file(source: impl AsRef, target: impl AsRef, security: DownloadSecurity<'_>, verbose: Option