From 45df4d0d9b577fecee798d672695fe24ff57fb1b Mon Sep 17 00:00:00 2001 From: mo khan Date: Tue, 15 Jul 2025 16:37:08 -0600 Subject: 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. --- vendor/indexmap/src/set/mutable.rs | 86 -------------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 vendor/indexmap/src/set/mutable.rs (limited to 'vendor/indexmap/src/set/mutable.rs') diff --git a/vendor/indexmap/src/set/mutable.rs b/vendor/indexmap/src/set/mutable.rs deleted file mode 100644 index 21615f34..00000000 --- a/vendor/indexmap/src/set/mutable.rs +++ /dev/null @@ -1,86 +0,0 @@ -use core::hash::{BuildHasher, Hash}; - -use super::{Equivalent, IndexSet}; -use crate::map::MutableKeys; - -/// Opt-in mutable access to [`IndexSet`] values. -/// -/// These methods expose `&mut T`, mutable references to the value as it is stored -/// in the set. -/// You are allowed to modify the values in the set **if the modification -/// does not change the value’s hash and equality**. -/// -/// If values are modified erroneously, you can no longer look them up. -/// This is sound (memory safe) but a logical error hazard (just like -/// implementing `PartialEq`, `Eq`, or `Hash` incorrectly would be). -/// -/// `use` this trait to enable its methods for `IndexSet`. -/// -/// This trait is sealed and cannot be implemented for types outside this crate. -pub trait MutableValues: private::Sealed { - type Value; - - /// Return item index and mutable reference to the value - /// - /// Computes in **O(1)** time (average). - fn get_full_mut2(&mut self, value: &Q) -> Option<(usize, &mut Self::Value)> - where - Q: ?Sized + Hash + Equivalent; - - /// Return mutable reference to the value at an index. - /// - /// Valid indices are `0 <= index < self.len()`. - /// - /// Computes in **O(1)** time. - fn get_index_mut2(&mut self, index: usize) -> Option<&mut Self::Value>; - - /// Scan through each value in the set and keep those where the - /// closure `keep` returns `true`. - /// - /// The values are visited in order, and remaining values keep their order. - /// - /// Computes in **O(n)** time (average). - fn retain2(&mut self, keep: F) - where - F: FnMut(&mut Self::Value) -> bool; -} - -/// Opt-in mutable access to [`IndexSet`] values. -/// -/// See [`MutableValues`] for more information. -impl MutableValues for IndexSet -where - S: BuildHasher, -{ - type Value = T; - - fn get_full_mut2(&mut self, value: &Q) -> Option<(usize, &mut T)> - where - Q: ?Sized + Hash + Equivalent, - { - match self.map.get_full_mut2(value) { - Some((index, value, ())) => Some((index, value)), - None => None, - } - } - - fn get_index_mut2(&mut self, index: usize) -> Option<&mut T> { - match self.map.get_index_mut2(index) { - Some((value, ())) => Some(value), - None => None, - } - } - - fn retain2(&mut self, mut keep: F) - where - F: FnMut(&mut T) -> bool, - { - self.map.retain2(move |value, ()| keep(value)); - } -} - -mod private { - pub trait Sealed {} - - impl Sealed for super::IndexSet {} -} -- cgit v1.2.3