diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-15 16:37:08 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-15 16:37:08 -0600 |
| commit | 2f55a5c8ac137046bc54a57dba33f6887d4ab461 (patch) | |
| tree | c2ba9ea121e3ea56968dc4f31df75f4b6b65347a /src/authorization/authorizer.rs | |
| parent | f94f79608393d4ab127db63cc41668445ef6b243 (diff) | |
refactor: extract a separate module for cedar
Diffstat (limited to 'src/authorization/authorizer.rs')
| -rw-r--r-- | src/authorization/authorizer.rs | 15 |
1 files changed, 15 insertions, 0 deletions
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 + } +} |
