Files
query-orchestration/cmd/auth_related/permit_test/permit.opa.testing/put-policy-data.sh
T
Jay Brown 6dccf494f8 Merged in feature/permit-policy-cleanup (pull request #210)
cleanup permit policies and correct documentation

* docs

* policy cleanup

* refactor

* Merge remote-tracking branch 'origin/feature/permit-policy-cleanup' into feature/permit-policy-cleanup

* docs and edits
2026-02-19 20:22:59 +00:00

15 lines
375 B
Bash
Executable File

#!/bin/bash
set -e
echo "Waiting for OPA to be ready..."
until curl -f http://localhost:8181/v1/data > /dev/null 2>&1; do
echo "OPA not ready yet, waiting..."
sleep 2
done
echo "Loading policy data into OPA..."
curl -X PUT http://localhost:8181/v1/data/static \
-H "Content-Type: application/json" \
-d @policy-data.json
echo "Policy data loaded successfully!"