summaryrefslogtreecommitdiff
path: root/src/authorization/authorizer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/authorization/authorizer.rs')
-rw-r--r--src/authorization/authorizer.rs15
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
+ }
+}