Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gateway): Remove path, query and variables field from subgraph error responses #900

Merged
merged 5 commits into from
Jul 21, 2021

Conversation

trevor-scheer
Copy link
Member

@trevor-scheer trevor-scheer commented Jul 21, 2021

Queries and variables coming from the gateway down to subgraphs can contain sensitive information that shouldn't be passed back to the client. Currently this can happen when an error occurs during a gateway fetch to a subgraph, and those errors are subsequently returned to the client in the response's error extensions.

We should just remove these fields. There is more discussion to be had around returning error information of this sort at all, but for now this is a sensible first step and prevents leaking potentially immediately sensitive information.

@trevor-scheer trevor-scheer changed the title Trevor/dont leak query+vars fix(gateway): Remove query and variables field from subgraph error responses Jul 21, 2021
@trevor-scheer trevor-scheer changed the base branch from main to release-gateway-0.34 July 21, 2021 17:49
@trevor-scheer trevor-scheer added this to the MM-2021-07 milestone Jul 21, 2021
gateway-js/CHANGELOG.md Outdated Show resolved Hide resolved
gateway-js/src/executeQueryPlan.ts Outdated Show resolved Hide resolved
@trevor-scheer trevor-scheer changed the title fix(gateway): Remove query and variables field from subgraph error responses fix(gateway): Remove path, query and variables field from subgraph error responses Jul 21, 2021
@trevor-scheer trevor-scheer merged commit 016d043 into release-gateway-0.34 Jul 21, 2021
@trevor-scheer trevor-scheer deleted the trevor/dont-leak-query+vars branch July 21, 2021 18:31
trevor-scheer added a commit that referenced this pull request Jul 21, 2021
Release
* @apollo/[email protected]
* @apollo/[email protected]
* @apollo/[email protected]
* @apollo/[email protected]

PRs:
* feat(gateway): Default to Uplink for composed supergraph managed federation (#881)
* fix(federation): Require user-defined @tag directive definition (#882)
* Remove @inaccessible elements when converting to API schema (#807)
* Move toAPISchema call into try/catch block (#894)
* fix(gateway): Prevent inaccessible type names from being leaked in error messages (#893)
* docs: rm instruction to set APOLLO_SCHEMA_CONFIG_DELIVERY_ENDPOINT for Uplink (#899)
* fix(gateway): Remove path, query and variables field from subgraph error responses (#900)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants