diff options
Diffstat (limited to 'src/authorization/cedar/authorizer.rs')
| -rw-r--r-- | src/authorization/cedar/authorizer.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/authorization/cedar/authorizer.rs b/src/authorization/cedar/authorizer.rs index dfdf6a80..c7086dd3 100644 --- a/src/authorization/cedar/authorizer.rs +++ b/src/authorization/cedar/authorizer.rs @@ -56,7 +56,7 @@ impl Authorizer { fn map_from( &self, - http_request: crate::rpc::envoy::service::auth::v3::attribute_context::HttpRequest, + http_request: envoy_types::pb::envoy::service::auth::v3::attribute_context::HttpRequest, ) -> Result<cedar_policy::Request, Box<dyn std::error::Error>> { let principal = self.principal_from(&http_request)?; let permission = self.permission_from(&http_request)?; @@ -70,7 +70,7 @@ impl Authorizer { fn principal_from( &self, - http_request: &crate::rpc::envoy::service::auth::v3::attribute_context::HttpRequest, + http_request: &envoy_types::pb::envoy::service::auth::v3::attribute_context::HttpRequest, ) -> Result<cedar_policy::EntityUid, Box<dyn std::error::Error>> { let subject = http_request .headers @@ -85,7 +85,7 @@ impl Authorizer { fn permission_from( &self, - http_request: &crate::rpc::envoy::service::auth::v3::attribute_context::HttpRequest, + http_request: &envoy_types::pb::envoy::service::auth::v3::attribute_context::HttpRequest, ) -> Result<cedar_policy::EntityUid, Box<dyn std::error::Error>> { Ok(cedar_policy::EntityUid::from_type_name_and_id( cedar_policy::EntityTypeName::from_str("Action")?, @@ -95,7 +95,7 @@ impl Authorizer { fn resource_from( &self, - http_request: &crate::rpc::envoy::service::auth::v3::attribute_context::HttpRequest, + http_request: &envoy_types::pb::envoy::service::auth::v3::attribute_context::HttpRequest, ) -> Result<cedar_policy::EntityUid, Box<dyn std::error::Error>> { Ok(cedar_policy::EntityUid::from_type_name_and_id( cedar_policy::EntityTypeName::from_str("Resource")?, @@ -105,7 +105,7 @@ impl Authorizer { fn context_from( &self, - http_request: crate::rpc::envoy::service::auth::v3::attribute_context::HttpRequest, + http_request: envoy_types::pb::envoy::service::auth::v3::attribute_context::HttpRequest, ) -> Result<cedar_policy::Context, Box<dyn std::error::Error>> { let mut items = std::collections::HashMap::new(); @@ -133,7 +133,7 @@ impl Default for Authorizer { } impl crate::authorization::authorizer::Authorizer for Authorizer { - fn authorize(&self, request: crate::rpc::envoy::service::auth::v3::CheckRequest) -> bool { + fn authorize(&self, request: envoy_types::pb::envoy::service::auth::v3::CheckRequest) -> bool { let http_request = match request .attributes .as_ref() |
