From 3d821c356af75cdddddf72d8dc9d877972ee8d20 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 5 Jul 2025 11:36:43 -0600 Subject: refactor: remove duplication from cedar policy --- etc/authzd/policy0.cedar | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'etc') diff --git a/etc/authzd/policy0.cedar b/etc/authzd/policy0.cedar index e1037457..a7a0ccb5 100644 --- a/etc/authzd/policy0.cedar +++ b/etc/authzd/policy0.cedar @@ -6,7 +6,7 @@ when { permit(principal, action == Action::"check", resource) when { - context has path && ( + context has path && context has method && context.method == "GET" && ( context.path like "*.css" || context.path like "*.js" || context.path like "*.ico" || @@ -30,15 +30,6 @@ when { context.path == "/health" || context.path == "/signout" || context.path == "/sparkles" || - context.path like "*.bmp" || - context.path like "*.css" || - context.path like "*.gif" || - context.path like "*.html" || - context.path like "*.ico" || - context.path like "*.jpeg" || - context.path like "*.jpg" || - context.path like "*.js" || - context.path like "*.png" || context.path == "/callback" ) ) || ( -- cgit v1.2.3