Skip to content

docs: add a guide for policy engines and Cedar policies - #2913

Open
MaxonT wants to merge 1 commit into
aws:v1.xfrom
MaxonT:contrib/1581-auto
Open

MaxonT wants to merge 1 commit into
aws:v1.xfrom
MaxonT:contrib/1581-auto

Conversation

@MaxonT

@MaxonT MaxonT commented Nov 24, 2026

Copy link
Copy Markdown

Hey, I wrote docs/policies.md and linked it from the README; I checked the add policy-engine and add policy parts against the source, but I stopped there and didn't re-run the four Gateway measurements.

Refs #1581

Description

Adds docs/policies.md and a link to it from the README documentation list. It covers the part of #1581 that is about Cedar policy engines:

  • agentcore add policy-engine and agentcore add policy, with their flags (including --tags), defaults and the name rules, taken from src/handlers/project/add/policy-engine/index.ts, src/handlers/project/add/policy/index.ts and src/projectSchemas/policy.ts.
  • Where the engine-to-Gateway attachment lives in agentcore.json (policyEngineConfiguration on the Gateway, mode of ENFORCE or LOG_ONLY), from src/projectSchemas/gateway.ts.
  • The four service behaviors kawaji measured and described in the issue comment: default-deny with forbid-only engines, tool arguments under context.input, the Overly Restrictive rejection under fail-on-any-findings, and an unattached engine enforcing nothing. The page attributes them to the commenter (kawaji) and says they were not re-checked here.

Not included, so the issue should stay open: the form-based guardrail builder, content-filter values, prompt-attack detection, and sensitive-information redaction. I did not find those in the CLI source I read, and did not want to describe them from guesswork. The issue also lists ACTIVE/PASSIVE enforcement modes; the source uses ACTIVE/LOG_ONLY for a policy and ENFORCE/LOG_ONLY for the Gateway attachment, and the page follows the source.

Type of Change

  • Documentation update

Testing

Documentation only. prettier --check passes on docs/policies.md and README.md. I read the handlers and schemas named above to check each flag, default and enum value. I did not deploy a Gateway, so the four service behaviors are the issue reporter's measurements, not mine, and I did not run bun test, bun run lint:check or bun run build since no source file changed.

Signed-off-by: Ym <173550318+MaxonT@users.noreply.github.com>
@MaxonT
MaxonT requested a review from a team November 24, 2026 23:38
@github-actions github-actions Bot added the size/m PR size: M label Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant