diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-15 16:37:08 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-17 16:30:22 -0600 |
| commit | 45df4d0d9b577fecee798d672695fe24ff57fb1b (patch) | |
| tree | 1b99bf645035b58e0d6db08c7a83521f41f7a75b /vendor/logos-codegen/tests/codegen.rs | |
| parent | f94f79608393d4ab127db63cc41668445ef6b243 (diff) | |
feat: migrate from Cedar to SpiceDB authorization system
This is a major architectural change that replaces the Cedar policy-based
authorization system with SpiceDB's relation-based authorization.
Key changes:
- Migrate from Rust to Go implementation
- Replace Cedar policies with SpiceDB schema and relationships
- Switch from envoy `ext_authz` with Cedar to SpiceDB permission checks
- Update build system and dependencies for Go ecosystem
- Maintain Envoy integration for external authorization
This change enables more flexible permission modeling through SpiceDB's
Google Zanzibar inspired relation-based system, supporting complex
hierarchical permissions that were difficult to express in Cedar.
Breaking change: Existing Cedar policies and Rust-based configuration
will no longer work and need to be migrated to SpiceDB schema.
Diffstat (limited to 'vendor/logos-codegen/tests/codegen.rs')
| -rw-r--r-- | vendor/logos-codegen/tests/codegen.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/vendor/logos-codegen/tests/codegen.rs b/vendor/logos-codegen/tests/codegen.rs deleted file mode 100644 index 5f53c0db..00000000 --- a/vendor/logos-codegen/tests/codegen.rs +++ /dev/null @@ -1,31 +0,0 @@ -use std::{error::Error, io, path::PathBuf}; - -#[rstest::rstest] -#[case("simple")] -#[case("no_error_lut")] -pub fn test_codegen(#[case] fixture: &str) -> Result<(), Box<dyn Error>> { - let mut fixture_dir = PathBuf::new(); - fixture_dir.push(env!("CARGO_MANIFEST_DIR")); - fixture_dir.push("tests"); - fixture_dir.push("data"); - fixture_dir.push(fixture); - - let input = fixture_dir.join("input.rs"); - fixture_dir.push("output.rs"); - let output_file = fixture_dir; - - let input = std::fs::read_to_string(input)?; - let output = std::fs::read_to_string(&output_file)?; - - let generated = logos_codegen::generate(input.parse()?); - let generated = generated.to_string(); - - if std::env::var("BLESS_CODEGEN").is_ok_and(|value| value == "1") { - std::fs::write(&output_file, &generated)?; - return Ok(()); - } - - assert_eq!(generated, output, "Codegen test failed: `{fixture}`, run tests again with env var `BLESS_CODEGEN=1` to bless these changes"); - - Ok(()) -} |
