Overview

appendix B  Step-by-step AI-assisted policy authoring

This appendix gives a practical walkthrough for using AI tools to help author and review authorization policies, with the reader working directly in a code editor and following a companion repository. It emphasizes that the focus is on practice rather than theory: the policies remain deterministic, the policy engine stays in control of decisions, and AI is limited to design-time help such as drafting, explaining, and testing.

The main setup uses the ACME Cedar example environment, where the repository includes the schema, policy files, sample requests, expected decisions, and AI-specific guidance. The key preparation step is to provide the AI with the right context so it can reason from the real schema and policies instead of inventing entities or attributes. With that context in place, the AI can explain why a request is allowed, restate policy behavior in plain language, and suggest alternative ways to express changes.

The workflow is intentionally human-centered: start from a concrete request, define the desired outcome precisely, ask the AI for possible implementation options, and then evaluate those options for clarity, scope, and maintainability before applying any change manually. The appendix reinforces that choices such as adding a deny rule, narrowing an existing permit, or using an exception clause are design judgments for humans, not decisions for the model. It closes with guardrails and a review checklist that require grounding in the schema, least-privilege thinking, concrete test cases, and final human accountability.

B.8 Key takeaways

This appendix has shown a practical, step-by-step approach to using AI tools to assist with authoring authorization policies. The focus was not on automating decisions but on improving the quality and clarity of human-authored policies.

The key lessons are straightforward:

  • AI is most effective during design-time activities such as drafting, refactoring, and explanation.
  • Authorization decisions remain deterministic and are evaluated by a policy engine, not by an AI system.
  • Clear intent, narrow scope, and deliberate structure matter more than syntactic elegance.
  • Guardrails in prompts and disciplined human review are what make AI assistance safe and useful.
  • Final responsibility for authorization behavior always rests with the human author.

For a deeper discussion of why these boundaries matter, see chapter 17. For a contrast with systems that delegate authority to AI agents, see chapter 18.

FAQ

What is the main purpose of appendix B on step-by-step AI-assisted policy authoring?The appendix gives a hands-on walkthrough for using AI-assisted development tools to help author and review authorization policies. It focuses on practical use in an editor like Cursor, with steps you can follow alongside the companion repository.
Why does the appendix emphasize that AI should only be used at design time?The appendix says AI assistance is limited to authoring, review, and testing. Authorization decisions themselves must remain deterministic and be evaluated by a policy engine, with humans retaining responsibility for the final policy behavior.
What repository and editor are used in the appendix examples?The examples use Cursor and the GitHub repository acme-cedar-ai-authoring. The repository contains the ACME Cedar schema, policies, example requests, and AI guidance files used in the walkthrough.
Which files should be added to the AI context before prompting it?You should open or include cedar/acme.cedarschema, all policy files under cedar/policies/, examples/sample-request.json, and tests/expected-decisions.json. This ensures the AI works from the real model and does not invent entities, actions, or attributes.
Why is providing concrete example requests important when using AI for policy authoring?Concrete requests help the AI reason about scope and intent more effectively than vague descriptions. The appendix stresses that each policy change should be grounded in an explicit request and expected decision.
What is the human-in-the-loop workflow described in the appendix?The workflow is to ask the AI to explain current behavior, restate policy logic in plain language, explore possible implementation options, and then have a human review the tradeoffs. The human chooses the final approach and applies the change deliberately.
What kinds of policy changes might the AI suggest for denying a request?The AI may suggest adding a new forbid policy, narrowing an existing permit policy by adding conditions, or using an unless clause to express an exception. The appendix notes that these can be semantically similar, but the choice among them is a human design decision.
Why does the appendix recommend starting from an intended outcome rather than from code?Starting from intent helps avoid overly broad policy changes and unintended side effects. The appendix says policy changes should begin with a clearly stated desired outcome, such as denying one specific request while leaving other access unchanged.
What should a human reviewer look for when evaluating AI-proposed policy changes?A reviewer should check whether the change clearly expresses intent, stays within the smallest necessary scope, avoids inventing new model elements, and remains understandable for later maintenance and audit. The reviewer should also confirm that tests reflect both intended permit and deny outcomes.
What guardrails does the starter prompt establish for AI-assisted authoring?The prompt tells the AI to use the schema and existing policies as source of truth, not invent new entities/actions/attributes, prefer least privilege, provide example requests and expected outcomes, and treat its output as advisory. These constraints are meant to keep the AI focused on exploration and explanation rather than authority.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Authorization in Action ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Authorization in Action ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Authorization in Action ebook for free