feat(interventions): add cedar vended intervention handler#2365
Open
lizradway wants to merge 7 commits into
Open
feat(interventions): add cedar vended intervention handler#2365lizradway wants to merge 7 commits into
lizradway wants to merge 7 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a
CedarAuthorizationintervention handler that evaluates Cedar authorization policies at the tool-call boundary, providing identity-aware access control for agent tool invocations.The handler integrates with
@cedar-policy/cedar-wasm(optional peer dependency) to evaluate Cedar policies before each tool call, returningdeny()orproceed()based on the policy decision.Follows the cedar-for-agents schema generator conventions:
Action::"search")resourceResolverfor domain-specific entities){ input: <tool args>, session: { hour_utc, call_count, environment } }Cedar-to-tool mapping
invocationState(viaprincipalResolver)User::"alice@acme.com"Action::"search"resourceResolverResource::"agent"orRecord::"42"{ query: "report" }{ hour_utc: 14, call_count: 3 }Key features
.cedarfilehour_utc,call_count,environmentin session context, plus custom enricher callbackonError: 'throw' | 'deny' | 'proceed'Usage
Related Issues
Documentation PR
N/A
Type of Change
New feature
Testing
How have you tested the change?
npm run checkfor TypeScript (type-check, tests, lint)examples/cedar/) tested end-to-end with 5 scenariosChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.