Skip to content

[7.x] Kibana request headers (#79218)#79665

Merged
kobelb merged 1 commit intoelastic:7.xfrom
kobelb:backport/7.x/pr-79218
Oct 6, 2020
Merged

[7.x] Kibana request headers (#79218)#79665
kobelb merged 1 commit intoelastic:7.xfrom
kobelb:backport/7.x/pr-79218

Conversation

@kobelb
Copy link
Copy Markdown
Contributor

@kobelb kobelb commented Oct 6, 2020

Backports the following commits to 7.x:

* Adding X-Kibana header for the legacy client requests

* Specifying `X-Kibana: true` header for all requests coming from Kibana

* Dev Tools now override the X-Kibana header to false

* DevTools doesn't need to do anything, it's not using the ES client

* Switching from `X-Kibana: true` to `User-Agent: Kibana`

* Switching from `X-Kibana: true` to `User-Agent: Kibana`

* Adding a constant

* Starting to add unit tests...

We currently allow end-users to set whatever headers they'd like to be
forwarded to Elasticsearch with `elasticsearch.customHeaders` and
`elasticsearch.requestHeadersWhitelist`. This is potentially problematic
with us always specifying `User-Agent: kibana` as it could interfere
with what our end-users have done...

* Switching from user-agent to X-elastic-product-origin

* Adding some tests

* Adding and updating the legacy client unit tests
T#

* /s/KIBANA_HEADERS/DEFAULT_HEADERS and a deepFreeze

* Adding comment for why `x-elastic-product-origin` exists
@kobelb kobelb added the backport This PR is a backport of another PR label Oct 6, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

distributable file count

id before after diff
default 48008 48009 +1
oss 29329 29330 +1

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@kobelb kobelb merged commit bbf5480 into elastic:7.x Oct 6, 2020
@kobelb kobelb deleted the backport/7.x/pr-79218 branch October 6, 2020 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants