From 2f55a5c8ac137046bc54a57dba33f6887d4ab461 Mon Sep 17 00:00:00 2001 From: mo khan Date: Tue, 15 Jul 2025 16:37:08 -0600 Subject: refactor: extract a separate module for cedar --- src/authorization/authorizer.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/authorization/authorizer.rs') diff --git a/src/authorization/authorizer.rs b/src/authorization/authorizer.rs index 62733585..d5363c84 100644 --- a/src/authorization/authorizer.rs +++ b/src/authorization/authorizer.rs @@ -3,3 +3,18 @@ use envoy_types::ext_authz::v3::pb::CheckRequest; pub trait Authorizer: std::fmt::Debug + std::marker::Sync + std::marker::Send + 'static { fn authorize(&self, request: CheckRequest) -> bool; } + +#[derive(Debug)] +pub struct DefaultAuthorizer {} + +impl Default for DefaultAuthorizer { + fn default() -> Self { + Self {} + } +} + +impl Authorizer for DefaultAuthorizer { + fn authorize(&self, _request: CheckRequest) -> bool { + true + } +} -- cgit v1.2.3