Author & publish a policy
Policies move through a lifecycle — draft → validate → publish — so a change is reviewable and every later decision records the version that produced it. See Authorization & policy.
- Create or edit a policy draft (Cedar).
- Validate it — catch syntax and reference errors, and simulate key decisions.
- Publish the version, which supersedes the previous one.
Create a draft
Section titled “Create a draft”Create a policy draft
- Open Access → Policies → New.
- Write the Cedar policy in the editor; references resolve against the current environment.
curl -X POST "$GATEWAY/v1/policies" \
-H "authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
--data @policy.jsoncreatePolicy in the API reference →gatewayctl policy review --policy-version cedar-policy-v4 --format jsonEvery gatewayctl verb accepts --format text|json.
Validate, then publish
Section titled “Validate, then publish”Validate and publish a policy version
- Click Validate and resolve any errors; run a few simulations to confirm intent.
- Click Publish — the new version becomes active and supersedes the prior one.
# 1) validate
curl -X POST "$GATEWAY/v1/policies/cedar-policy-v4/validate" \
-H "authorization: Bearer $TOKEN"
# 2) publish
curl -X POST "$GATEWAY/v1/policies/cedar-policy-v4/publish" \
-H "authorization: Bearer $TOKEN"publishPolicyVersion in the API reference →gatewayctl policy publish --policy-version cedar-policy-v4Every gatewayctl verb accepts --format text|json.
Type set in Geist, Source Serif 4, and Departure Mono.