Skip to content

fix(api): add additional header during subscription authorization #1999

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

Closed

Conversation

sayasheng
Copy link

@sayasheng sayasheng commented Oct 4, 2022

  • PR title and description conform to Pull Request guidelines.

Issue #, if available:
Custom headers set in interceptor are missing during subscription authorization
Description of changes:

  1. define new function addAdditionalHeader in AWSApiPlugin.java
  2. set the additional header in SubscriptionAuthorizer.java

How did you test these changes?
HashMap<String, String> additionalHeaders = new HashMap<>();
additionalHeaders.put("test", "This is a test");
AWSApiPlugin apiPlugin = AWSApiPlugin.builder()..addAdditionalHeader(additionalHeaders).build();

Documentation update required?

  • No
  • [ x ] Yes (Please include a PR link for the documentation update)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sayasheng sayasheng requested review from a team as code owners October 4, 2022 02:56
@mikepschneider
Copy link
Contributor

@sayasheng, can you provide the reasoning for needed to add additional headers?

Also please update your PR to follow the submission guidelines

@sayasheng
Copy link
Author

@sayasheng, can you provide the reasoning for needed to add additional headers?

@mikepschneider Our backend team set up Web Application Firewall (WAF) for query/mutation/subscription, it needs to give custom headers during query/mutation/subscription. Using interceptor to inject the custom headers works only on query/mutation. It fails to set the custom headers during subscription. That's why I made the modification.

Also please update your PR to follow the submission guidelines
Thank you for this information. I will follow the guidelines to update my PR.

@github-actions github-actions bot added the Title Needs Formatting Added by the PR Title Checker when a PR title does not conform to our guidelines label Dec 22, 2022
@sayasheng sayasheng changed the title add additional header during subscription authorization fix(auth): add additional header during subscription authorization Dec 23, 2022
@github-actions github-actions bot removed the Title Needs Formatting Added by the PR Title Checker when a PR title does not conform to our guidelines label Dec 23, 2022
@sayasheng sayasheng changed the title fix(auth): add additional header during subscription authorization fix(api): add additional header during subscription authorization Dec 23, 2022
@titanjer
Copy link

@mikepschneider hi, any updates?

@manueliglesias
Copy link
Contributor

Hi @sayasheng , @titanjer ,

Can you take a look at #2283 ? It should, among other things, cover your use case

@gpanshu
Copy link
Contributor

gpanshu commented Aug 23, 2023

Closing this PR as the changes were done as part of #2283 . Feel free to open a new PR if you feel something was not addressed.

@gpanshu gpanshu closed this Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants