Repository navigation
Deliver callbacks only to operator-approved origins - #32
Merged
Merged
Conversation
…ck-destination-policy
Delivery is the trust boundary: it runs on the workflow host, outside Sandbox egress rules. The workflow skips a callback whose origin isn't listed in CALLBACK_ALLOWED_ORIGINS (logged as deliver_skipped, so the parent doesn't wait on retries), deliverCallback re-checks the origin, and fetch refuses redirects. The API keeps its existing URL check, so deployers set one value on one service instead of matching values on two. Co-authored-by: Cursor <cursoragent@cursor.com>
Delivery is the trust boundary: it runs on the workflow host, outside Sandbox egress rules. The workflow skips a callback whose origin isn't listed in CALLBACK_ALLOWED_ORIGINS (logged as deliver_skipped, so the parent doesn't wait on retries), deliverCallback re-checks the origin, and fetch refuses redirects. The API keeps its existing URL check, so deployers set one value on one service instead of matching values on two. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Callback delivery runs on the workflow host, outside Sandbox egress rules, and followed redirects. An API caller could make the workflow POST to internal hosts.
CALLBACK_ALLOWED_ORIGINS, a comma-separated list of HTTPS origins (http://localhost:<port>allowed off Render). Unset means callbacks are off.answerQuestionskips a callback whose origin isn't listed and logsdeliver_skipped, so the parent doesn't wait on delivery retries. The reply is still available by polling.deliverCallbackre-checks the origin and setsredirect: "error".The original version of this PR enforced the list on both the API and the workflow, with matching values required on both. That was trimmed to the workflow only, which is the trust boundary. The API keeps its existing URL check, so deployers set one optional value on one service. The variable isn't declared in
render.yaml, so the Blueprint form doesn't get an extra prompt.Upgrade note: a deployment that already uses callbacks must set
CALLBACK_ALLOWED_ORIGINSon the workflow, or deliveries are skipped.Fixes #22.