-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] add is_internal config option for outputs #175546
[Cloud Security] add is_internal config option for outputs #175546
Conversation
/ci |
/ci |
Pinging @elastic/fleet (Team:Fleet) |
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
@@ -523,6 +523,7 @@ | |||
"hosts", | |||
"is_default", | |||
"is_default_monitoring", | |||
"is_internal", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh not sure how to test/check this change, just following the pattern for other config keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You manually modified this file right?
This check was added to make sure that any mapping addition is properly done, by adding a new model version. And I don't see that being done in this PR (looking at x-pack/plugins/fleet/server/saved_objects/index.ts
)
Please follow the guidelines available in the model version documentation
(or follow what was already done for this SO type:
kibana/x-pack/plugins/fleet/server/saved_objects/index.ts
Lines 312 to 321 in 70508b9
'2': { | |
changes: [ | |
{ | |
type: 'mappings_addition', | |
addedMappings: { | |
service_token: { type: 'keyword', index: false }, | |
}, | |
}, | |
], | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the pointer, will check and follow the guidelines!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pgayvallet added a new model version to reflect the addition of the is_internal
mapping. Btw running node scripts/check_mappings_update --fix
made quite a lot of changes to the current_mappings.json which are not related to the is_internal, so I ended up still adding
"is_internal": {
"type": "boolean",
"index": false
},
manually (node scripts/check_mappings_update
passes after I added the model version)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM - one minor suggestion on the docs wording, otherwise 🚀
Co-authored-by: Kyle Pollich <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the docs change. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mappings were added without corresponding model version
@@ -523,6 +523,7 @@ | |||
"hosts", | |||
"is_default", | |||
"is_default_monitoring", | |||
"is_internal", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You manually modified this file right?
This check was added to make sure that any mapping addition is properly done, by adding a new model version. And I don't see that being done in this PR (looking at x-pack/plugins/fleet/server/saved_objects/index.ts
)
Please follow the guidelines available in the model version documentation
(or follow what was already done for this SO type:
kibana/x-pack/plugins/fleet/server/saved_objects/index.ts
Lines 312 to 321 in 70508b9
'2': { | |
changes: [ | |
{ | |
type: 'mappings_addition', | |
addedMappings: { | |
service_token: { type: 'keyword', index: false }, | |
}, | |
}, | |
], | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field should probably be added to that function too so existing output are updated https://github.com/nchaulet/kibana/blob/65375dd33f189e501e7f15b6907d613f536664f6/x-pack/plugins/fleet/server/services/preconfiguration/outputs.ts#L293
@nchaulet thanks for the pointer, added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
… src/core/server/integration_tests/ci_checks'
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
* main: use build hash in FTR tests [Security Solution] Fix moderate typo (elastic#175883) [Fleet] Fix conflicting dynamic template mappings for intermediate objects (elastic#175970) [Visualize] Prevent overwriting managed content (elastic#175274) [SLO] Add/edit form mark optional fields (elastic#175807) skip failing test suite (elastic#175984) [data views] Provide method of excluding data tiers when getting field list (elastic#167946) [Dataset quality] State management (elastic#174906) [Cloud Security] add is_internal config option for outputs (elastic#175546)
…tion (#175983) ## Summary - Follow up after #175546 - Part of #165251 introducing a new `is_internal` config option for `xpack.fleet.fleetServerHosts`. The usage is currently to protect the internal fleet server hosts in the UI: - filter them out in the Settings UI - disable internal hosts in the agent policy form ### Checklist Delete any items that are not applicable to this PR. - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: David Kilfoyle <[email protected]>
…tion (elastic#175983) ## Summary - Follow up after elastic#175546 - Part of elastic#165251 introducing a new `is_internal` config option for `xpack.fleet.fleetServerHosts`. The usage is currently to protect the internal fleet server hosts in the UI: - filter them out in the Settings UI - disable internal hosts in the agent policy form ### Checklist Delete any items that are not applicable to this PR. - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: David Kilfoyle <[email protected]>
…75546) ## Summary - part of elastic#165251 introducing a new `is_internal` config option for `xpack.fleet.outputs`. The usage is currently to protect the internal outputs in the UI: - filter out internal outputs in the Settings UI - disable internal outputs in output select for an agent policy ### Screencast [screencast-github.com-2024.01.26-15_57_56.webm](https://github.com/elastic/kibana/assets/478762/917b4a76-a48f-4bdc-b3d8-5598f86febf8) ### Checklist Delete any items that are not applicable to this PR. - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Kyle Pollich <[email protected]>
…tion (elastic#175983) ## Summary - Follow up after elastic#175546 - Part of elastic#165251 introducing a new `is_internal` config option for `xpack.fleet.fleetServerHosts`. The usage is currently to protect the internal fleet server hosts in the UI: - filter them out in the Settings UI - disable internal hosts in the agent policy form ### Checklist Delete any items that are not applicable to this PR. - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: David Kilfoyle <[email protected]>
…75546) ## Summary - part of elastic#165251 introducing a new `is_internal` config option for `xpack.fleet.outputs`. The usage is currently to protect the internal outputs in the UI: - filter out internal outputs in the Settings UI - disable internal outputs in output select for an agent policy ### Screencast [screencast-github.com-2024.01.26-15_57_56.webm](https://github.com/elastic/kibana/assets/478762/917b4a76-a48f-4bdc-b3d8-5598f86febf8) ### Checklist Delete any items that are not applicable to this PR. - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Kyle Pollich <[email protected]>
…tion (elastic#175983) ## Summary - Follow up after elastic#175546 - Part of elastic#165251 introducing a new `is_internal` config option for `xpack.fleet.fleetServerHosts`. The usage is currently to protect the internal fleet server hosts in the UI: - filter them out in the Settings UI - disable internal hosts in the agent policy form ### Checklist Delete any items that are not applicable to this PR. - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: David Kilfoyle <[email protected]>
Summary
introducing a new
is_internal
config option forxpack.fleet.outputs
. The usage is currently to protect the internal outputs in the UI:Screencast
screencast-github.com-2024.01.26-15_57_56.webm
Checklist
Delete any items that are not applicable to this PR.