Allow specifying headers in gateway serviceList (specifically Authorization header)
See original GitHub issueIn ApolloGateway, the getServiceDefinitionsFromRemoteEndpoint
function in loadServicesFromRemoteEndpoint.ts
has hardcoded headers. So graphql endpoints that are protected and accept only calls with a valid Authorization
header cannot be accessed by the gateway.
For example if you use AWS ApiGateway authorizers for filtering only authorised requests to your graphql endpoint, requests that don’t have an Authorization header are blocked and don’t even reach your endpoint.
I suggest that the ServiceEndpointDefinition
object will also have a headers parameter that will allow passing such headers. Or that the code in getServiceDefinitionsFromRemoteEndpoint
will also go through the buildService function to allow changing the headers.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:5 (3 by maintainers)
Top Results From Across the Web
API Reference: @apollo/gateway - Apollo GraphQL Docs
The core class of Apollo Server's federated gateway implementation. ... Providing a serviceList and headers to authorize introspection. TypeScript
Read more >API Reference: @apollo/gateway - Apollo Federation
This API reference documents the exports from the @apollo/gateway package. ... Providing a serviceList and headers to authorize introspection.
Read more >Pass custom headers through API Gateway to a Lambda ...
Then, the Lambda function returns one or more header values from the original API request. Resolution. Configure the required AWS Identity and ...
Read more >webMethods API Gateway User's Guide
and information about gateway-specific events and API-specific events ... Ensure you enable this setting in the system where the SOAP API is.
Read more >Access-Control-Allow-Headers - HTTP - MDN Web Docs
Note that the Authorization header can't be wildcarded and always needs to be listed explicitly. Examples. A custom header. Here's an example of ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe this issue can be closed. There are now two different mechanisms that can be used to accomplish this.
@reinosutisno they’ve added an
introspectioHeaders
option to gateway