summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile22
1 files changed, 14 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 3625c9f4..96c93ce0 100644
--- a/Makefile
+++ b/Makefile
@@ -81,14 +81,20 @@ production-entities: $(AUTHZD_BIN) check-gitlab-token
@$(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
+# Usage: make run-spicedb-setup SPICEDB_ENDPOINT=localhost:20000
+# make run-spicedb-setup SPICEDB_ENDPOINT=authzd.staging.runway.gitlab.net:443
+# make run-spicedb-setup SPICEDB_ENDPOINT=authzd.runway.gitlab.net:443
+SPICEDB_ENDPOINT ?= localhost:20000
+SPICEDB_TOKEN ?= secret
+
run-spicedb-setup:
- @zed --endpoint ":20000" --token "secret" --insecure schema write etc/authzd/spice.schema
- @zed --endpoint ":20000" --token "secret" --insecure schema read
- @zed --endpoint ":20000" --token "secret" --insecure relationship create project:1 maintainer user:mokhax
- @zed --endpoint ":20000" --token "secret" --insecure relationship create project:1 developer user:tanuki
+ @zed --endpoint "$(SPICEDB_ENDPOINT)" --token "$(SPICEDB_TOKEN)" --insecure schema write etc/authzd/spice.schema
+ @zed --endpoint "$(SPICEDB_ENDPOINT)" --token "$(SPICEDB_TOKEN)" --insecure schema read
+ @zed --endpoint "$(SPICEDB_ENDPOINT)" --token "$(SPICEDB_TOKEN)" --insecure relationship create project:1 maintainer user:mokhax
+ @zed --endpoint "$(SPICEDB_ENDPOINT)" --token "$(SPICEDB_TOKEN)" --insecure relationship create project:1 developer user:tanuki
run-spicedb-permission-check:
- @zed --endpoint ":20000" --token "secret" --insecure permission check project:1 read user:mokhax
- @zed --endpoint ":20000" --token "secret" --insecure permission check project:1 write user:mokhax
- @zed --endpoint ":20000" --token "secret" --insecure permission check project:1 read user:tanuki
- @zed --endpoint ":20000" --token "secret" --insecure permission check project:1 write user:tanuki
+ @zed --endpoint "$(SPICEDB_ENDPOINT)" --token "$(SPICEDB_TOKEN)" --insecure permission check project:1 read user:mokhax
+ @zed --endpoint "$(SPICEDB_ENDPOINT)" --token "$(SPICEDB_TOKEN)" --insecure permission check project:1 write user:mokhax
+ @zed --endpoint "$(SPICEDB_ENDPOINT)" --token "$(SPICEDB_TOKEN)" --insecure permission check project:1 read user:tanuki
+ @zed --endpoint "$(SPICEDB_ENDPOINT)" --token "$(SPICEDB_TOKEN)" --insecure permission check project:1 write user:tanuki