Add reject_if grant cancellation support#131
Conversation
| @@ -0,0 +1,26 @@ | |||
| package grant | |||
There was a problem hiding this comment.
🟡 Suggestion: These vendor files (rejected.go and annotation_grant_rejected.pb.go) don't exist in baton-sdk v0.9.20 (the version in go.mod), nor on the SDK's main branch. Running go mod vendor will remove them. If the SDK feature is being developed in parallel, consider pointing go.mod at the SDK commit/branch that contains these types, or document the manual-vendor intent so a future go mod tidy && go mod vendor doesn't silently break the build.
| if grant == nil { | ||
| return nil | ||
| } | ||
|
|
||
| if grant.RejectIf != nil { |
There was a problem hiding this comment.
🟡 Suggestion: The RejectIf.Query SQL is validated for variable references here, but the RejectIf.Reason CEL expression is not validated at startup. A syntax error in the Reason expression would only surface at runtime when a grant is actually rejected. Consider adding a CEL parse/check call here so misconfigured expressions fail early during validation.
Connector PR Review: Add reject_if grant cancellation supportBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThis PR adds a Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. |
reject_if38e9edf to
766c8bf
Compare
Description
reject_ifgrant provisioning checks that cancel matching grants before any grant mutations run.