feat(resource-policies): add statement evaluator - #6892
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryHigh Risk Overview Adds a required per-group policy lifecycle (create/delete/backfill), optimistic-concurrency admin GET/PUT, and a settings Access tab. Credential use now evaluates Threads current workflow (draft vs active deployment version) through executor delegation and child-workflow execution so workflow principals and Reviewed by Cursor Bugbot for commit a01a557. Bugbot is set up for automated code reviews on this repo. Configure here. |
9995853 to
0c9fb23
Compare
Greptile SummaryThe PR replaces credential-group grants with statement-based resource policies and carries workflow execution authority into credential-use decisions.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/resource-policies/evaluator.ts | Implements deterministic explicit-deny, allow, and implicit-deny statement evaluation with registered principal and condition handlers. |
| apps/sim/lib/credential-groups/application/workflow-access-policy.ts | Compiles and evaluates bounded workflow-access policies while retaining actor-owned credential access as a system rule. |
| apps/sim/lib/credential-groups/application/authorization.ts | Connects delegated execution identity and current workflow authority to credential-group policy decisions. |
| apps/sim/lib/workflows/executor/execution-core.ts | Constructs current workflow authority from draft or durable deployment state for downstream authorization. |
| apps/sim/executor/handlers/workflow/workflow-handler.ts | Propagates child workflow identity and deployment version through nested executor delegation. |
| packages/db/credential-group-resource-policies.ts | Adds idempotent policy reconciliation, lifecycle-trigger installation, bounded backfill paging, and invariant validation. |
| packages/db/migrations/0309_material_blonde_phantom.sql | Introduces resource-policy persistence with workspace ownership and one-policy-per-resource uniqueness. |
| apps/sim/ee/credential-groups/components/credential-group-access.tsx | Adds a staged workflow-access editor with optimistic revisions, conflict preservation, and save-time catalog validation. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Authenticated principal] --> B[Workspace operation authorization]
B --> C[Credential group access]
C --> D[Load resource policy]
E[Current workflow authority] --> F[Statement evaluator]
D --> F
F --> G{Decision}
G -->|Explicit deny| H[Reject credential use]
G -->|Allow| I[Resolve credential]
G -->|Implicit deny| H
J[Credential group lifecycle] --> K[Policy trigger and backfill]
K --> D
Reviews (14): Last reviewed commit: "chore(resource-policies): merge workspac..." | Re-trigger Greptile
aaea6ae to
52e3168
Compare
95eafd9 to
9d5f513
Compare
c2d891e to
64f547f
Compare
64f547f to
eccb03a
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
3 issues from previous reviews remain unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit eccb03a. Configure here.
eccb03a to
ede2aba
Compare
|
@cursor review |
|
@cursor review |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
…eat/credential-group-resource-policies
…eat/credential-group-resource-policies # Conflicts: # design/credential-group-authorization.md # design/principal-passing.md # design/resource-policies.md
# Conflicts: # packages/db/migrations/meta/0308_snapshot.json # packages/db/migrations/meta/_journal.json # packages/db/script-migrations-paused-billing-attribution.test.ts # packages/db/script-migrations/index.ts

Summary
Type of Change
Testing
Checklist