relay: enforce pre-hook secret restrictions from signed WorkflowExecution (PRIV-537)#23203
relay: enforce pre-hook secret restrictions from signed WorkflowExecution (PRIV-537)#23203nadahalli wants to merge 1 commit into
Conversation
…tion (PRIV-537) The Workflow-DON-signed PublicData carries the workflow's pre-hook Restrictions. After the PRIV-433 quorum check, filter the requested secrets against the signed restriction membership (exact and prefix rules, vault namespace normalization), and bind the quorum to the request's execution_id so a breached enclave cannot replay an older execution's looser restrictions. Counting budgets stay enclave-side; the relay serves each request statelessly and enforces membership only.
|
✅ No conflicts with other open PRs targeting |
|
I see you updated files related to
|
| execution, err := h.verifyWorkflowAuthorization(localNode.WorkflowDON, params) | ||
| if err != nil { | ||
| return h.errorResponse(ctx, gatewayID, req, jsonrpc.ErrInvalidParams, err) | ||
| } | ||
|
|
||
| // Filter the requested secrets against the workflow's pre-hook restrictions carried in | ||
| // the same signed WorkflowExecution (PRIV-537). The enclave enforces these itself, so a | ||
| // violation reaching the relay implies a breached TEE: reject the whole request rather | ||
| // than serving a partial result. | ||
| if err = enforceSecretsRestrictions(execution.GetRestrictions(), params.Secrets); err != nil { |
There was a problem hiding this comment.
It's already done by the execution handler :)
| return h.errorResponse(ctx, gatewayID, req, jsonrpc.ErrInvalidParams, err) | ||
| } | ||
|
|
||
| handler, ok := h.executionHandlers.GetExecution(params.WorkflowID, params.ExecutionID) |
There was a problem hiding this comment.
The execution handler here already imposes the restrictions.
nolag
left a comment
There was a problem hiding this comment.
No need, work was already done wired into the execution handler.
|
|
Withdrawn: the relay already enforces the pre-hook restrictions through the execution helper registered by ConfidentialModule (restriction-wrapped node-side, with working budgets, for both secrets and capability calls). See discussion with Ryan. |




The Workflow-DON-signed PublicData carries the workflow's pre-hook Restrictions (chainlink-protos #441). After the PRIV-433 quorum check, the relay now filters the requested secrets against the signed restriction membership (exact and prefix rules, vault ""->"main" namespace normalization on both sides) and binds the quorum to the request's execution_id, so a breached enclave cannot replay an older execution's looser restriction set.
Membership only: counting budgets (max_secrets, per-prefix budgets) stay enclave-side, since the relay serves each request statelessly. Semantics mirror chainlink-common's in-TEE executionRestrictions wrapper, including zero-budget denials.
Capability-path filtering is out of scope: CapabilityRequestParams has no SignedComputeRequests carrier yet.