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/hyper/src/proto/mod.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/hyper/src/proto/mod.rs')
| -rw-r--r-- | vendor/hyper/src/proto/mod.rs | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/vendor/hyper/src/proto/mod.rs b/vendor/hyper/src/proto/mod.rs deleted file mode 100644 index fcdf2b97..00000000 --- a/vendor/hyper/src/proto/mod.rs +++ /dev/null @@ -1,73 +0,0 @@ -//! Pieces pertaining to the HTTP message protocol. - -cfg_feature! { - #![feature = "http1"] - - pub(crate) mod h1; - - pub(crate) use self::h1::Conn; - - #[cfg(feature = "client")] - pub(crate) use self::h1::dispatch; - #[cfg(feature = "server")] - pub(crate) use self::h1::ServerTransaction; -} - -#[cfg(feature = "http2")] -pub(crate) mod h2; - -/// An Incoming Message head. Includes request/status line, and headers. -#[cfg(feature = "http1")] -#[derive(Debug, Default)] -pub(crate) struct MessageHead<S> { - /// HTTP version of the message. - pub(crate) version: http::Version, - /// Subject (request line or status line) of Incoming message. - pub(crate) subject: S, - /// Headers of the Incoming message. - pub(crate) headers: http::HeaderMap, - /// Extensions. - extensions: http::Extensions, -} - -/// An incoming request message. -#[cfg(feature = "http1")] -pub(crate) type RequestHead = MessageHead<RequestLine>; - -#[derive(Debug, Default, PartialEq)] -#[cfg(feature = "http1")] -pub(crate) struct RequestLine(pub(crate) http::Method, pub(crate) http::Uri); - -/// An incoming response message. -#[cfg(all(feature = "http1", feature = "client"))] -pub(crate) type ResponseHead = MessageHead<http::StatusCode>; - -#[derive(Debug)] -#[cfg(feature = "http1")] -pub(crate) enum BodyLength { - /// Content-Length - Known(u64), - /// Transfer-Encoding: chunked (if h1) - Unknown, -} - -/// Status of when a Dispatcher future completes. -pub(crate) enum Dispatched { - /// Dispatcher completely shutdown connection. - Shutdown, - /// Dispatcher has pending upgrade, and so did not shutdown. - #[cfg(feature = "http1")] - Upgrade(crate::upgrade::Pending), -} - -#[cfg(all(feature = "client", feature = "http1"))] -impl MessageHead<http::StatusCode> { - fn into_response<B>(self, body: B) -> http::Response<B> { - let mut res = http::Response::new(body); - *res.status_mut() = self.subject; - *res.headers_mut() = self.headers; - *res.version_mut() = self.version; - *res.extensions_mut() = self.extensions; - res - } -} |
