summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-02 12:32:27 -0600
committermo khan <mo@mokhan.ca>2025-07-02 12:32:27 -0600
commita577c62277e3d651b66fd68dbe800bf3ab5c4921 (patch)
tree7ae4e79fc84c539c12fb0313d0d3cc929b2e12ae /etc
parentc2b8edab01b23fde6cc196a3349ad6aa19a93299 (diff)
parent0b610d061e45811130d8cf3919037fdc9513e340 (diff)
Merge branch 'rs' into 'main'
Re-write the authorization daemon in rust See merge request gitlab-org/software-supply-chain-security/authorization/authzd!1
Diffstat (limited to 'etc')
-rw-r--r--etc/authzd/policy0.cedar20
1 files changed, 20 insertions, 0 deletions
diff --git a/etc/authzd/policy0.cedar b/etc/authzd/policy0.cedar
new file mode 100644
index 00000000..034e81b5
--- /dev/null
+++ b/etc/authzd/policy0.cedar
@@ -0,0 +1,20 @@
+permit(principal, action == Action::"check", resource)
+when {
+ context has bearer_token &&
+ context.bearer_token == "valid-token"
+};
+
+permit(principal, action == Action::"check", resource)
+when {
+ context has path && (
+ context.path like "*.css" ||
+ context.path like "*.js" ||
+ context.path like "*.ico" ||
+ context.path like "*.png" ||
+ context.path like "*.jpg" ||
+ context.path like "*.jpeg" ||
+ context.path like "*.gif" ||
+ context.path like "*.bmp" ||
+ context.path like "*.html"
+ )
+};