Skip to content

how to add custom header if we use AWS API Gateway X-API-Key validation #169

Closed

Description

We are using Splunk Java SDK for test suite integration that will do search in Splunk and based on search results will decide whether test case pass/fail for Application continues integration and deployment pipeline. We have introduced AWS API Gateway with X-API-Key validation for security requirement. Can you please let us know how to add custom header X-API-Key to each Splunk Java SDK calls.

Activity

  1. ncanumalla-splunk commented on Aug 31, 2021

    @ncanumalla-splunk

    @dhavamanisettiyannan-nbcuni Thank you for the question. Today, the Splunk Java SDK does not support passing custom headers. There is a static map of headers inside the SDK but it is not open to customize.
    We will need to prioritize this as a feature enhancement. Is there a time by which you need this?
    We are open to contributions and can get to this sooner if you'd like to submit a PR.

  2. dhavamanisettiyannan-nbcuni commented on Aug 31, 2021

    @dhavamanisettiyannan-nbcuni
    Author

    @ncanumalla-splunk Thank you for the update, Can you please prioritize and implement this feature at least by end of November 2021.

  3. ncanumalla-splunk commented on Sep 8, 2021

    @ncanumalla-splunk

    Thank you for the information to help prioritize. Will plan accordingly.

  4. BalasubramanyamEvani commented on Sep 22, 2021

    @BalasubramanyamEvani
    Contributor

    @ncanumalla-splunk can I take this up? new to this repository. I think a setter method needs to be implemented which accepts a map and merges with the defaultHeaders. I do have a doubt though while accepting a new map of headers, how to handle the case when we get duplicate keys - Ignore or Merge values? Also, I guess a check needs to be in place to check for User-Agent, Accept keys?

    Let me know if I can work on this and if my understanding is correct. Thanks!

  5. ncanumalla-splunk commented on Sep 22, 2021

    @ncanumalla-splunk

    @BalasubramanyamEvani We definitely welcome contributions. Your approach seems to be in the right direction. Yes, you will need to account for the default keys and avoid overriding values. Please try implementing this as part of the ServiceArgs class. Please submit a PR to this repo and our team can review.

  6. BalasubramanyamEvani commented on Sep 22, 2021

    @BalasubramanyamEvani
    Contributor

    @ncanumalla-splunk Thanks ! will work on it

  7. bparmar-splunk commented on Nov 8, 2021

    @bparmar-splunk
    Contributor

    @BalasubramanyamEvani,
    Will you please share current state of issue resolution? We would like to know if you are planning a PR for the same.

  8. BalasubramanyamEvani commented on Nov 10, 2021

    @BalasubramanyamEvani
    Contributor

    Yes i am planning to submit a PR by this week. I've been busy with Job search, sorry for the delay.

  9. bparmar-splunk commented on Nov 10, 2021

    @bparmar-splunk
    Contributor

    @BalasubramanyamEvani,
    Thank you for the update.
    Please let us know when you create PR.

  10. bparmar-splunk commented on Nov 16, 2021

    @bparmar-splunk
    Contributor

    @BalasubramanyamEvani,
    Could you please re-share the timeline for this issue resolution?
    As we are planning to release this change in this week.
    Please let us know, if you have further queries.

  11. BalasubramanyamEvani commented on Nov 17, 2021

    @BalasubramanyamEvani
    Contributor

    Hello @bparmar-splunk sorry for the delay. I have created PR #176. Please check

  12. fantavlik commented on Nov 18, 2021

    @fantavlik
    Contributor

    Merged in #176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions