summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-04 13:11:19 -0600
committermo khan <mo@mokhan.ca>2025-07-04 13:11:19 -0600
commit33083559c6d43d266ca77fcd1beb94c6feb4b547 (patch)
treef29732db4e2ae73cf91cb8dc400e21700aa7b465 /src
parent743c484d5ed62c01485ff275aca357ea3e7b45a8 (diff)
style: fix linter errors
Diffstat (limited to 'src')
-rw-r--r--src/authorization/cedar_authorizer.rs36
1 files changed, 6 insertions, 30 deletions
diff --git a/src/authorization/cedar_authorizer.rs b/src/authorization/cedar_authorizer.rs
index 61142b71..432102ef 100644
--- a/src/authorization/cedar_authorizer.rs
+++ b/src/authorization/cedar_authorizer.rs
@@ -79,14 +79,11 @@ impl Authorizer for CedarAuthorizer {
"Processing HTTP request"
);
- if http_request.host == "sparkle.staging.runway.gitlab.net" {
- if http_request.method == "GET" && http_request.path == "/" {
- tracing::info!(
- host = %http_request.host,
- "Allowing health check request"
- );
- return true;
- }
+ if http_request.host == "sparkle.staging.runway.gitlab.net"
+ && http_request.method == "GET"
+ && http_request.path == "/"
+ {
+ return true;
}
let headers = &http_request.headers;
@@ -96,15 +93,6 @@ impl Authorizer for CedarAuthorizer {
.and_then(|auth| auth.strip_prefix("Bearer "))
.unwrap_or("");
- tracing::info!(
- path = %http_request.path,
- has_bearer_token = !bearer_token.is_empty(),
- user_agent = ?headers.get("user-agent"),
- x_request_id = ?headers.get("x-request-id"),
- content_type = ?headers.get("content-type"),
- "Extracted request details"
- );
-
match self.create_cedar_request(bearer_token, &http_request.path.to_string()) {
Ok(cedar_request) => {
let entities = Entities::empty();
@@ -112,19 +100,7 @@ impl Authorizer for CedarAuthorizer {
self.authorizer
.is_authorized(&cedar_request, &self.policies, &entities);
- let decision = response.decision();
- let is_allowed = matches!(decision, cedar_policy::Decision::Allow);
-
- tracing::info!(
- method = %http_request.method,
- host = %http_request.host,
- path = %http_request.path,
- decision = ?decision,
- allowed = is_allowed,
- "Authorization decision"
- );
-
- is_allowed
+ matches!(response.decision(), cedar_policy::Decision::Allow)
}
Err(e) => {
tracing::error!(