summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 82d6f5a7..bdc7a3d8 100644
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,7 @@ lint:
@cargo clippy
@for policy in etc/authzd/*.cedar; do cedar check-parse --policies $$policy; done
@for policy in etc/authzd/*.cedar; do cedar format --policies $$policy --check; done
+ @./bin/envoy --mode validate -c ./etc/envoy/envoy.yaml || echo "Envoy not available, skipping validation"
doc:
@cargo doc --open
@@ -78,3 +79,16 @@ production-entities: $(AUTHZD_BIN) check-gitlab-token
@$(AUTHZD_BIN) generate --project gitlab-org/gitlab --output etc/authzd/gitlab.com/gitlab-org/gitlab/entities.json
@$(AUTHZD_BIN) generate --project gitlab-org/software-supply-chain-security/authorization/authzd --output etc/authzd/gitlab.com/gitlab-org/software-supply-chain-security/authorization/authzd/entities.json
@$(AUTHZD_BIN) generate --project gitlab-org/software-supply-chain-security/authorization/sparkled --output etc/authzd/gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/entities.json
+
+# spice targets
+run-spicedb-setup:
+ @zed --endpoint ":50051" --token "secret" --insecure schema write etc/authzd/spice.schema
+ @zed --endpoint ":50051" --token "secret" --insecure schema read
+ @zed --endpoint ":50051" --token "secret" --insecure relationship create project:1 maintainer user:mokhax
+ @zed --endpoint ":50051" --token "secret" --insecure relationship create project:1 developer user:tanuki
+
+run-spicedb-permission-check:
+ @zed --endpoint ":50051" --token "secret" --insecure permission check project:1 read user:mokhax
+ @zed --endpoint ":50051" --token "secret" --insecure permission check project:1 write user:mokhax
+ @zed --endpoint ":50051" --token "secret" --insecure permission check project:1 read user:tanuki
+ @zed --endpoint ":50051" --token "secret" --insecure permission check project:1 write user:tanuki