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

[Cloud Security] Added 'x-elastic-internal-origin' to agentless axios request headers for Kibana 9.0 #203188

Conversation

seanrathier
Copy link
Contributor

@seanrathier seanrathier commented Dec 5, 2024

Summary

Kibana 9.0 requires all request made with axios have the request header x-elastic-internal-origin set to Kibana to avoid appearing as an “external” integration. Any requests without it will be blocked in Kibana 9.0

Checklist

Reviewers should verify this PR satisfies this list as well.

@seanrathier seanrathier requested a review from a team December 5, 2024 21:51
@seanrathier seanrathier self-assigned this Dec 5, 2024
@seanrathier seanrathier added 8.18 candidate release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Dec 5, 2024
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the error handling tests to a secluded describe section in this file.

@seanrathier seanrathier marked this pull request as ready for review December 5, 2024 21:59
@seanrathier seanrathier requested a review from a team as a code owner December 5, 2024 21:59
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@seanrathier seanrathier enabled auto-merge (squash) December 5, 2024 22:00
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

cc @seanrathier

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM 🚀

@seanrathier seanrathier merged commit e08d712 into elastic:main Dec 6, 2024
16 checks passed
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Dec 6, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12204844354

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 6, 2024
… agentless axios request headers for Kibana 9.0 (#203188) (#203332)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Cloud Security] Added 'x-elastic-internal-origin' to
agentless axios request headers for Kibana 9.0
(#203188)](#203188)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"seanrathier","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-06T19:21:42Z","message":"[Cloud
Security] Added 'x-elastic-internal-origin' to agentless axios request
headers for Kibana 9.0
(#203188)","sha":"e08d7126eb57dfa18a8607df7244a63caacc0bfc","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","Team:Cloud
Security","backport:prev-minor","8.18 candidate"],"title":"[Cloud
Security] Added 'x-elastic-internal-origin' to agentless axios request
headers for Kibana
9.0","number":203188,"url":"https://github.com/elastic/kibana/pull/203188","mergeCommit":{"message":"[Cloud
Security] Added 'x-elastic-internal-origin' to agentless axios request
headers for Kibana 9.0
(#203188)","sha":"e08d7126eb57dfa18a8607df7244a63caacc0bfc"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203188","number":203188,"mergeCommit":{"message":"[Cloud
Security] Added 'x-elastic-internal-origin' to agentless axios request
headers for Kibana 9.0
(#203188)","sha":"e08d7126eb57dfa18a8607df7244a63caacc0bfc"}}]}]
BACKPORT-->

Co-authored-by: seanrathier <[email protected]>
markov00 pushed a commit to markov00/kibana that referenced this pull request Dec 7, 2024
SoniaSanzV pushed a commit to SoniaSanzV/kibana that referenced this pull request Dec 9, 2024
SoniaSanzV pushed a commit to SoniaSanzV/kibana that referenced this pull request Dec 9, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
Samiul-TheSoccerFan pushed a commit to Samiul-TheSoccerFan/kibana that referenced this pull request Dec 10, 2024
mykolaharmash pushed a commit to mykolaharmash/kibana that referenced this pull request Dec 11, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.18 candidate backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related Team:Fleet Team label for Observability Data Collection Fleet team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants