sdk-python icon indicating copy to clipboard operation
sdk-python copied to clipboard

docs(interventions): add Cedar Authorization documentation page

Open lizradway opened this issue 5 months ago • 2 comments

Description

Adds documentation for the Cedar Authorization vended intervention handler introduced in #2365. Covers basic usage, role-based access control, rate limiting, schema validation, environment gating, file-based policies, and hot reload.

Cedar Builder to be added after ship + publish to NPM: https://github.com/cedar-policy/cedar-for-agents/pull/137

Related Issues

#2365

Documentation PR

N/A (this PR is the documentation)

Type of Change

Documentation update

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce new warnings.

  • [ ] I ran hatch run prepare

Checklist

  • [x] I have read the CONTRIBUTING document
  • [x] I have reviewed and understand every line of code in this PR, including any generated by AI tools, and I can explain why it works
  • [x] My change is focused and reasonably small; I have split unrelated work into separate PRs
  • [ ] I have added any necessary tests that prove my fix is effective or my feature works
  • [x] I have updated the documentation accordingly
  • [x] I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • [x] My changes generate no new warnings
  • [x] Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

lizradway avatar Jun 15 '26 18:06 lizradway

Documentation Preview Ready

Your documentation preview has been successfully deployed!

Changed pages:

Updated at: 2026-06-15T19:06:26.984Z

github-actions[bot] avatar Jun 15 '26 19:06 github-actions[bot]

Assessment: Comment

Solid, well-scoped documentation page. The API surface (principal defaults, hour_utc/call_count session fields, fail-closed principalResolver, reload() validate-then-swap, onError values) all verify correctly against strands-ts/src/vended-interventions/cedar/cedar.ts. Voice and terminology are clean: no hype phrases, no em-dashes, valid tags, correct languages: [typescript]. A few code-example issues are worth addressing before merge.

Review themes
  • Code completeness: Several rendered snippets reference tool variables defined outside their region; // @ts-nocheck on the body file hides this from typecheck. Snippets should be copy-paste-runnable (Stripe principle).
  • Claim parity: One in-snippet comment quotes an error string that doesn't match what the SDK throws. Verifiable claims keep trust high.
  • Non-determinism: One comment narrates a deterministic tool-call sequence; capability framing ("can/may") fits the voice guide.

The conceptual framing and the Cedar-concept mapping table are genuinely clear and do a good job orienting a first-time reader.

github-actions[bot] avatar Jun 15 '26 19:06 github-actions[bot]