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] [CDR] Handle grouping fields with missing mapping #195702

Merged
merged 6 commits into from
Oct 10, 2024

Conversation

opauloh
Copy link
Contributor

@opauloh opauloh commented Oct 10, 2024

Summary

This PR fixes https://github.com/elastic/security-team/issues/10632 by adding runtime mapping support for fields that are missing in mapping, this is useful when querying a DataView that points to multiple indices where the mapping is not guaranteed to exist as it's the case with CDR that adds supports to Third Party data.

Also added runtime mapping to sorted fields, as it's not guaranteed that all fields shown on the table have mapped fields.

@opauloh
Copy link
Contributor Author

opauloh commented Oct 10, 2024

/ci

@opauloh opauloh added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Cloud Security Cloud Security team related v8.16.0 labels Oct 10, 2024
@opauloh opauloh requested a review from JordanSh October 10, 2024 05:00
@opauloh opauloh marked this pull request as ready for review October 10, 2024 07:36
@opauloh opauloh requested a review from a team as a code owner October 10, 2024 07:36
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #15 / aiops log pattern analysis loads the log pattern analysis page and filters in patterns in discover

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cloudSecurityPosture 506.3KB 507.8KB +1.5KB

History

@opauloh opauloh added the backport:version Backport to applied version labels label Oct 10, 2024
@opauloh opauloh merged commit e53e545 into elastic:main Oct 10, 2024
25 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2024
…lastic#195702)

## Summary

This PR fixes elastic/security-team#10632 by
adding runtime mapping support for fields that are missing in mapping,
this is useful when querying a DataView that points to multiple indices
where the mapping is not guaranteed to exist as it's the case with CDR
that adds supports to Third Party data.

Also added runtime mapping to sorted fields, as it's not guaranteed that
all fields shown on the table have mapped fields.

(cherry picked from commit e53e545)
@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 Oct 10, 2024
…ing (#195702) (#195792)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Cloud Security] [CDR] Handle grouping fields with missing mapping
(#195702)](#195702)

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

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

<!--BACKPORT [{"author":{"name":"Paulo
Silva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-10T14:52:49Z","message":"[Cloud
Security] [CDR] Handle grouping fields with missing mapping
(#195702)\n\n## Summary\r\n\r\nThis PR fixes
elastic/security-team#10632 by\r\nadding
runtime mapping support for fields that are missing in mapping,\r\nthis
is useful when querying a DataView that points to multiple
indices\r\nwhere the mapping is not guaranteed to exist as it's the case
with CDR\r\nthat adds supports to Third Party data.\r\n\r\nAlso added
runtime mapping to sorted fields, as it's not guaranteed that\r\nall
fields shown on the table have mapped
fields.","sha":"e53e54550f9ab9ce2db83ec56a5c704a96f37355","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","v8.16.0","backport:version"],"title":"[Cloud Security] [CDR]
Handle grouping fields with missing
mapping","number":195702,"url":"https://github.com/elastic/kibana/pull/195702","mergeCommit":{"message":"[Cloud
Security] [CDR] Handle grouping fields with missing mapping
(#195702)\n\n## Summary\r\n\r\nThis PR fixes
elastic/security-team#10632 by\r\nadding
runtime mapping support for fields that are missing in mapping,\r\nthis
is useful when querying a DataView that points to multiple
indices\r\nwhere the mapping is not guaranteed to exist as it's the case
with CDR\r\nthat adds supports to Third Party data.\r\n\r\nAlso added
runtime mapping to sorted fields, as it's not guaranteed that\r\nall
fields shown on the table have mapped
fields.","sha":"e53e54550f9ab9ce2db83ec56a5c704a96f37355"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195702","number":195702,"mergeCommit":{"message":"[Cloud
Security] [CDR] Handle grouping fields with missing mapping
(#195702)\n\n## Summary\r\n\r\nThis PR fixes
elastic/security-team#10632 by\r\nadding
runtime mapping support for fields that are missing in mapping,\r\nthis
is useful when querying a DataView that points to multiple
indices\r\nwhere the mapping is not guaranteed to exist as it's the case
with CDR\r\nthat adds supports to Third Party data.\r\n\r\nAlso added
runtime mapping to sorted fields, as it's not guaranteed that\r\nall
fields shown on the table have mapped
fields.","sha":"e53e54550f9ab9ce2db83ec56a5c704a96f37355"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Paulo Silva <[email protected]>
maxcold pushed a commit that referenced this pull request Nov 1, 2024
…rd party data compatibility (#198635)

## Summary

This PR enhances the solution proposed by [this
PR](#195702), by picking only the
fields that are currently not mapped by the current Third Party
integrations, this fixes performance degradation identified during the
QA cycle of 8.16.0.

Fixes:
- elastic/security-team#11034

### Misconfiguration Runtime fields

- **rule.benchmark.rule_number**: runtime mapping kept because this
field is missing on `security_solution-aws.misconfiguration_latest-v1`
causing filtering out data when sorting by **Rule Number** column on the
Misconfigurations Data Table.
- **rule.section**: runtime mapping kept because this field is missing
on `security_solution-aws.misconfiguration_latest-v1` causing filtering
out data when sorting by **Framework Section** column on the
Misconfigurations Data Table.
- **resource.sub_type**: runtime mapping kept because this field is
missing on `security_solution-aws.misconfiguration_latest-v1` causing
filtering out data when sorting by **Resource Type** column on the
Misconfigurations Data Table.
- **orchestrator.cluster.name**: runtime mapping kept because this field
is missing on `security_solution-wiz.misconfiguration_latest-v1` causing
filtering out data when grouping by **Kubernetes Cluster** column on the
Misconfigurations page.
- **cloud.account.name**: runtime mapping kept because this field is
missing on `security_solution-aws.misconfiguration_latest-v1` causing
filtering out data when grouping by **Kubernetes Cluster** column on the
Misconfigurations page.


### Vulnerability Runtime Fields:

- **observer.vendor**: runtime mapping added because this field is
mapped as `text` on `security_solution-wiz.vulnerability_latest-v1`
causing filtering out when sorting by the **Vendor** column on the
Vulnerability Data Table
- **cloud.provider**: runtime mapping added because this field is mapped
as `text` on `security_solution-wiz.vulnerability_latest-v1` causing
filtering out when grouping by **Cloud Account** on the Vulnerability
page. (This field is needed in order to retrieve the Cloud Provider name
and icon)


## Screenshot - Left: After the changes / Right: Current



https://github.com/user-attachments/assets/2cbdd8b7-131c-42e4-a881-632f8cd3854b


https://github.com/user-attachments/assets/4372feb6-4c01-4047-a90a-d6728f9400fe



https://github.com/user-attachments/assets/b9e32514-f2ee-4e4d-ba5f-ea3e20d4d0b2
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 1, 2024
…rd party data compatibility (elastic#198635)

## Summary

This PR enhances the solution proposed by [this
PR](elastic#195702), by picking only the
fields that are currently not mapped by the current Third Party
integrations, this fixes performance degradation identified during the
QA cycle of 8.16.0.

Fixes:
- elastic/security-team#11034

### Misconfiguration Runtime fields

- **rule.benchmark.rule_number**: runtime mapping kept because this
field is missing on `security_solution-aws.misconfiguration_latest-v1`
causing filtering out data when sorting by **Rule Number** column on the
Misconfigurations Data Table.
- **rule.section**: runtime mapping kept because this field is missing
on `security_solution-aws.misconfiguration_latest-v1` causing filtering
out data when sorting by **Framework Section** column on the
Misconfigurations Data Table.
- **resource.sub_type**: runtime mapping kept because this field is
missing on `security_solution-aws.misconfiguration_latest-v1` causing
filtering out data when sorting by **Resource Type** column on the
Misconfigurations Data Table.
- **orchestrator.cluster.name**: runtime mapping kept because this field
is missing on `security_solution-wiz.misconfiguration_latest-v1` causing
filtering out data when grouping by **Kubernetes Cluster** column on the
Misconfigurations page.
- **cloud.account.name**: runtime mapping kept because this field is
missing on `security_solution-aws.misconfiguration_latest-v1` causing
filtering out data when grouping by **Kubernetes Cluster** column on the
Misconfigurations page.

### Vulnerability Runtime Fields:

- **observer.vendor**: runtime mapping added because this field is
mapped as `text` on `security_solution-wiz.vulnerability_latest-v1`
causing filtering out when sorting by the **Vendor** column on the
Vulnerability Data Table
- **cloud.provider**: runtime mapping added because this field is mapped
as `text` on `security_solution-wiz.vulnerability_latest-v1` causing
filtering out when grouping by **Cloud Account** on the Vulnerability
page. (This field is needed in order to retrieve the Cloud Provider name
and icon)

## Screenshot - Left: After the changes / Right: Current

https://github.com/user-attachments/assets/2cbdd8b7-131c-42e4-a881-632f8cd3854b

https://github.com/user-attachments/assets/4372feb6-4c01-4047-a90a-d6728f9400fe

https://github.com/user-attachments/assets/b9e32514-f2ee-4e4d-ba5f-ea3e20d4d0b2
(cherry picked from commit 7a98aa1)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 1, 2024
…rd party data compatibility (elastic#198635)

## Summary

This PR enhances the solution proposed by [this
PR](elastic#195702), by picking only the
fields that are currently not mapped by the current Third Party
integrations, this fixes performance degradation identified during the
QA cycle of 8.16.0.

Fixes:
- elastic/security-team#11034

### Misconfiguration Runtime fields

- **rule.benchmark.rule_number**: runtime mapping kept because this
field is missing on `security_solution-aws.misconfiguration_latest-v1`
causing filtering out data when sorting by **Rule Number** column on the
Misconfigurations Data Table.
- **rule.section**: runtime mapping kept because this field is missing
on `security_solution-aws.misconfiguration_latest-v1` causing filtering
out data when sorting by **Framework Section** column on the
Misconfigurations Data Table.
- **resource.sub_type**: runtime mapping kept because this field is
missing on `security_solution-aws.misconfiguration_latest-v1` causing
filtering out data when sorting by **Resource Type** column on the
Misconfigurations Data Table.
- **orchestrator.cluster.name**: runtime mapping kept because this field
is missing on `security_solution-wiz.misconfiguration_latest-v1` causing
filtering out data when grouping by **Kubernetes Cluster** column on the
Misconfigurations page.
- **cloud.account.name**: runtime mapping kept because this field is
missing on `security_solution-aws.misconfiguration_latest-v1` causing
filtering out data when grouping by **Kubernetes Cluster** column on the
Misconfigurations page.

### Vulnerability Runtime Fields:

- **observer.vendor**: runtime mapping added because this field is
mapped as `text` on `security_solution-wiz.vulnerability_latest-v1`
causing filtering out when sorting by the **Vendor** column on the
Vulnerability Data Table
- **cloud.provider**: runtime mapping added because this field is mapped
as `text` on `security_solution-wiz.vulnerability_latest-v1` causing
filtering out when grouping by **Cloud Account** on the Vulnerability
page. (This field is needed in order to retrieve the Cloud Provider name
and icon)

## Screenshot - Left: After the changes / Right: Current

https://github.com/user-attachments/assets/2cbdd8b7-131c-42e4-a881-632f8cd3854b

https://github.com/user-attachments/assets/4372feb6-4c01-4047-a90a-d6728f9400fe

https://github.com/user-attachments/assets/b9e32514-f2ee-4e4d-ba5f-ea3e20d4d0b2
(cherry picked from commit 7a98aa1)
kibanamachine added a commit that referenced this pull request Nov 1, 2024
…or third party data compatibility (#198635) (#198649)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Cloud Security] Update Findings page runtime fields required for
third party data compatibility
(#198635)](#198635)

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

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

<!--BACKPORT [{"author":{"name":"Paulo
Silva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-01T09:59:09Z","message":"[Cloud
Security] Update Findings page runtime fields required for third party
data compatibility (#198635)\n\n## Summary\r\n\r\nThis PR enhances the
solution proposed by
[this\r\nPR](#195702), by picking
only the\r\nfields that are currently not mapped by the current Third
Party\r\nintegrations, this fixes performance degradation identified
during the\r\nQA cycle of 8.16.0.\r\n\r\nFixes:\r\n-
https://github.com/elastic/security-team/issues/11034\r\n\r\n###
Misconfiguration Runtime fields\r\n\r\n- **rule.benchmark.rule_number**:
runtime mapping kept because this\r\nfield is missing on
`security_solution-aws.misconfiguration_latest-v1`\r\ncausing filtering
out data when sorting by **Rule Number** column on
the\r\nMisconfigurations Data Table.\r\n- **rule.section**: runtime
mapping kept because this field is missing\r\non
`security_solution-aws.misconfiguration_latest-v1` causing
filtering\r\nout data when sorting by **Framework Section** column on
the\r\nMisconfigurations Data Table.\r\n- **resource.sub_type**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when sorting by **Resource Type** column on
the\r\nMisconfigurations Data Table.\r\n- **orchestrator.cluster.name**:
runtime mapping kept because this field\r\nis missing on
`security_solution-wiz.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n- **cloud.account.name**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n\r\n\r\n### Vulnerability Runtime
Fields:\r\n\r\n- **observer.vendor**: runtime mapping added because this
field is\r\nmapped as `text` on
`security_solution-wiz.vulnerability_latest-v1`\r\ncausing filtering out
when sorting by the **Vendor** column on the\r\nVulnerability Data
Table\r\n- **cloud.provider**: runtime mapping added because this field
is mapped\r\nas `text` on
`security_solution-wiz.vulnerability_latest-v1` causing\r\nfiltering out
when grouping by **Cloud Account** on the Vulnerability\r\npage. (This
field is needed in order to retrieve the Cloud Provider name\r\nand
icon)\r\n\r\n\r\n## Screenshot - Left: After the changes / Right:
Current\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2cbdd8b7-131c-42e4-a881-632f8cd3854b\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4372feb6-4c01-4047-a90a-d6728f9400fe\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b9e32514-f2ee-4e4d-ba5f-ea3e20d4d0b2","sha":"7a98aa176d6dcb3b850b5b9ae2dcd48e7c7ec0cb","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","backport:prev-minor","ci:build-cloud-image","v8.16.0","backport:version","v8.17.0"],"title":"[Cloud
Security] Update Findings page runtime fields required for third party
data
compatibility","number":198635,"url":"https://github.com/elastic/kibana/pull/198635","mergeCommit":{"message":"[Cloud
Security] Update Findings page runtime fields required for third party
data compatibility (#198635)\n\n## Summary\r\n\r\nThis PR enhances the
solution proposed by
[this\r\nPR](#195702), by picking
only the\r\nfields that are currently not mapped by the current Third
Party\r\nintegrations, this fixes performance degradation identified
during the\r\nQA cycle of 8.16.0.\r\n\r\nFixes:\r\n-
https://github.com/elastic/security-team/issues/11034\r\n\r\n###
Misconfiguration Runtime fields\r\n\r\n- **rule.benchmark.rule_number**:
runtime mapping kept because this\r\nfield is missing on
`security_solution-aws.misconfiguration_latest-v1`\r\ncausing filtering
out data when sorting by **Rule Number** column on
the\r\nMisconfigurations Data Table.\r\n- **rule.section**: runtime
mapping kept because this field is missing\r\non
`security_solution-aws.misconfiguration_latest-v1` causing
filtering\r\nout data when sorting by **Framework Section** column on
the\r\nMisconfigurations Data Table.\r\n- **resource.sub_type**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when sorting by **Resource Type** column on
the\r\nMisconfigurations Data Table.\r\n- **orchestrator.cluster.name**:
runtime mapping kept because this field\r\nis missing on
`security_solution-wiz.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n- **cloud.account.name**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n\r\n\r\n### Vulnerability Runtime
Fields:\r\n\r\n- **observer.vendor**: runtime mapping added because this
field is\r\nmapped as `text` on
`security_solution-wiz.vulnerability_latest-v1`\r\ncausing filtering out
when sorting by the **Vendor** column on the\r\nVulnerability Data
Table\r\n- **cloud.provider**: runtime mapping added because this field
is mapped\r\nas `text` on
`security_solution-wiz.vulnerability_latest-v1` causing\r\nfiltering out
when grouping by **Cloud Account** on the Vulnerability\r\npage. (This
field is needed in order to retrieve the Cloud Provider name\r\nand
icon)\r\n\r\n\r\n## Screenshot - Left: After the changes / Right:
Current\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2cbdd8b7-131c-42e4-a881-632f8cd3854b\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4372feb6-4c01-4047-a90a-d6728f9400fe\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b9e32514-f2ee-4e4d-ba5f-ea3e20d4d0b2","sha":"7a98aa176d6dcb3b850b5b9ae2dcd48e7c7ec0cb"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198635","number":198635,"mergeCommit":{"message":"[Cloud
Security] Update Findings page runtime fields required for third party
data compatibility (#198635)\n\n## Summary\r\n\r\nThis PR enhances the
solution proposed by
[this\r\nPR](#195702), by picking
only the\r\nfields that are currently not mapped by the current Third
Party\r\nintegrations, this fixes performance degradation identified
during the\r\nQA cycle of 8.16.0.\r\n\r\nFixes:\r\n-
https://github.com/elastic/security-team/issues/11034\r\n\r\n###
Misconfiguration Runtime fields\r\n\r\n- **rule.benchmark.rule_number**:
runtime mapping kept because this\r\nfield is missing on
`security_solution-aws.misconfiguration_latest-v1`\r\ncausing filtering
out data when sorting by **Rule Number** column on
the\r\nMisconfigurations Data Table.\r\n- **rule.section**: runtime
mapping kept because this field is missing\r\non
`security_solution-aws.misconfiguration_latest-v1` causing
filtering\r\nout data when sorting by **Framework Section** column on
the\r\nMisconfigurations Data Table.\r\n- **resource.sub_type**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when sorting by **Resource Type** column on
the\r\nMisconfigurations Data Table.\r\n- **orchestrator.cluster.name**:
runtime mapping kept because this field\r\nis missing on
`security_solution-wiz.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n- **cloud.account.name**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n\r\n\r\n### Vulnerability Runtime
Fields:\r\n\r\n- **observer.vendor**: runtime mapping added because this
field is\r\nmapped as `text` on
`security_solution-wiz.vulnerability_latest-v1`\r\ncausing filtering out
when sorting by the **Vendor** column on the\r\nVulnerability Data
Table\r\n- **cloud.provider**: runtime mapping added because this field
is mapped\r\nas `text` on
`security_solution-wiz.vulnerability_latest-v1` causing\r\nfiltering out
when grouping by **Cloud Account** on the Vulnerability\r\npage. (This
field is needed in order to retrieve the Cloud Provider name\r\nand
icon)\r\n\r\n\r\n## Screenshot - Left: After the changes / Right:
Current\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2cbdd8b7-131c-42e4-a881-632f8cd3854b\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4372feb6-4c01-4047-a90a-d6728f9400fe\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b9e32514-f2ee-4e4d-ba5f-ea3e20d4d0b2","sha":"7a98aa176d6dcb3b850b5b9ae2dcd48e7c7ec0cb"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Paulo Silva <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 1, 2024
…for third party data compatibility (#198635) (#198648)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Cloud Security] Update Findings page runtime fields required for
third party data compatibility
(#198635)](#198635)

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

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

<!--BACKPORT [{"author":{"name":"Paulo
Silva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-01T09:59:09Z","message":"[Cloud
Security] Update Findings page runtime fields required for third party
data compatibility (#198635)\n\n## Summary\r\n\r\nThis PR enhances the
solution proposed by
[this\r\nPR](#195702), by picking
only the\r\nfields that are currently not mapped by the current Third
Party\r\nintegrations, this fixes performance degradation identified
during the\r\nQA cycle of 8.16.0.\r\n\r\nFixes:\r\n-
https://github.com/elastic/security-team/issues/11034\r\n\r\n###
Misconfiguration Runtime fields\r\n\r\n- **rule.benchmark.rule_number**:
runtime mapping kept because this\r\nfield is missing on
`security_solution-aws.misconfiguration_latest-v1`\r\ncausing filtering
out data when sorting by **Rule Number** column on
the\r\nMisconfigurations Data Table.\r\n- **rule.section**: runtime
mapping kept because this field is missing\r\non
`security_solution-aws.misconfiguration_latest-v1` causing
filtering\r\nout data when sorting by **Framework Section** column on
the\r\nMisconfigurations Data Table.\r\n- **resource.sub_type**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when sorting by **Resource Type** column on
the\r\nMisconfigurations Data Table.\r\n- **orchestrator.cluster.name**:
runtime mapping kept because this field\r\nis missing on
`security_solution-wiz.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n- **cloud.account.name**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n\r\n\r\n### Vulnerability Runtime
Fields:\r\n\r\n- **observer.vendor**: runtime mapping added because this
field is\r\nmapped as `text` on
`security_solution-wiz.vulnerability_latest-v1`\r\ncausing filtering out
when sorting by the **Vendor** column on the\r\nVulnerability Data
Table\r\n- **cloud.provider**: runtime mapping added because this field
is mapped\r\nas `text` on
`security_solution-wiz.vulnerability_latest-v1` causing\r\nfiltering out
when grouping by **Cloud Account** on the Vulnerability\r\npage. (This
field is needed in order to retrieve the Cloud Provider name\r\nand
icon)\r\n\r\n\r\n## Screenshot - Left: After the changes / Right:
Current\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2cbdd8b7-131c-42e4-a881-632f8cd3854b\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4372feb6-4c01-4047-a90a-d6728f9400fe\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b9e32514-f2ee-4e4d-ba5f-ea3e20d4d0b2","sha":"7a98aa176d6dcb3b850b5b9ae2dcd48e7c7ec0cb","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","backport:prev-minor","ci:build-cloud-image","v8.16.0","backport:version","v8.17.0"],"title":"[Cloud
Security] Update Findings page runtime fields required for third party
data
compatibility","number":198635,"url":"https://github.com/elastic/kibana/pull/198635","mergeCommit":{"message":"[Cloud
Security] Update Findings page runtime fields required for third party
data compatibility (#198635)\n\n## Summary\r\n\r\nThis PR enhances the
solution proposed by
[this\r\nPR](#195702), by picking
only the\r\nfields that are currently not mapped by the current Third
Party\r\nintegrations, this fixes performance degradation identified
during the\r\nQA cycle of 8.16.0.\r\n\r\nFixes:\r\n-
https://github.com/elastic/security-team/issues/11034\r\n\r\n###
Misconfiguration Runtime fields\r\n\r\n- **rule.benchmark.rule_number**:
runtime mapping kept because this\r\nfield is missing on
`security_solution-aws.misconfiguration_latest-v1`\r\ncausing filtering
out data when sorting by **Rule Number** column on
the\r\nMisconfigurations Data Table.\r\n- **rule.section**: runtime
mapping kept because this field is missing\r\non
`security_solution-aws.misconfiguration_latest-v1` causing
filtering\r\nout data when sorting by **Framework Section** column on
the\r\nMisconfigurations Data Table.\r\n- **resource.sub_type**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when sorting by **Resource Type** column on
the\r\nMisconfigurations Data Table.\r\n- **orchestrator.cluster.name**:
runtime mapping kept because this field\r\nis missing on
`security_solution-wiz.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n- **cloud.account.name**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n\r\n\r\n### Vulnerability Runtime
Fields:\r\n\r\n- **observer.vendor**: runtime mapping added because this
field is\r\nmapped as `text` on
`security_solution-wiz.vulnerability_latest-v1`\r\ncausing filtering out
when sorting by the **Vendor** column on the\r\nVulnerability Data
Table\r\n- **cloud.provider**: runtime mapping added because this field
is mapped\r\nas `text` on
`security_solution-wiz.vulnerability_latest-v1` causing\r\nfiltering out
when grouping by **Cloud Account** on the Vulnerability\r\npage. (This
field is needed in order to retrieve the Cloud Provider name\r\nand
icon)\r\n\r\n\r\n## Screenshot - Left: After the changes / Right:
Current\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2cbdd8b7-131c-42e4-a881-632f8cd3854b\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4372feb6-4c01-4047-a90a-d6728f9400fe\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b9e32514-f2ee-4e4d-ba5f-ea3e20d4d0b2","sha":"7a98aa176d6dcb3b850b5b9ae2dcd48e7c7ec0cb"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198635","number":198635,"mergeCommit":{"message":"[Cloud
Security] Update Findings page runtime fields required for third party
data compatibility (#198635)\n\n## Summary\r\n\r\nThis PR enhances the
solution proposed by
[this\r\nPR](#195702), by picking
only the\r\nfields that are currently not mapped by the current Third
Party\r\nintegrations, this fixes performance degradation identified
during the\r\nQA cycle of 8.16.0.\r\n\r\nFixes:\r\n-
https://github.com/elastic/security-team/issues/11034\r\n\r\n###
Misconfiguration Runtime fields\r\n\r\n- **rule.benchmark.rule_number**:
runtime mapping kept because this\r\nfield is missing on
`security_solution-aws.misconfiguration_latest-v1`\r\ncausing filtering
out data when sorting by **Rule Number** column on
the\r\nMisconfigurations Data Table.\r\n- **rule.section**: runtime
mapping kept because this field is missing\r\non
`security_solution-aws.misconfiguration_latest-v1` causing
filtering\r\nout data when sorting by **Framework Section** column on
the\r\nMisconfigurations Data Table.\r\n- **resource.sub_type**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when sorting by **Resource Type** column on
the\r\nMisconfigurations Data Table.\r\n- **orchestrator.cluster.name**:
runtime mapping kept because this field\r\nis missing on
`security_solution-wiz.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n- **cloud.account.name**: runtime
mapping kept because this field is\r\nmissing on
`security_solution-aws.misconfiguration_latest-v1` causing\r\nfiltering
out data when grouping by **Kubernetes Cluster** column on
the\r\nMisconfigurations page.\r\n\r\n\r\n### Vulnerability Runtime
Fields:\r\n\r\n- **observer.vendor**: runtime mapping added because this
field is\r\nmapped as `text` on
`security_solution-wiz.vulnerability_latest-v1`\r\ncausing filtering out
when sorting by the **Vendor** column on the\r\nVulnerability Data
Table\r\n- **cloud.provider**: runtime mapping added because this field
is mapped\r\nas `text` on
`security_solution-wiz.vulnerability_latest-v1` causing\r\nfiltering out
when grouping by **Cloud Account** on the Vulnerability\r\npage. (This
field is needed in order to retrieve the Cloud Provider name\r\nand
icon)\r\n\r\n\r\n## Screenshot - Left: After the changes / Right:
Current\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/2cbdd8b7-131c-42e4-a881-632f8cd3854b\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4372feb6-4c01-4047-a90a-d6728f9400fe\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b9e32514-f2ee-4e4d-ba5f-ea3e20d4d0b2","sha":"7a98aa176d6dcb3b850b5b9ae2dcd48e7c7ec0cb"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Paulo Silva <[email protected]>
nreese pushed a commit to nreese/kibana that referenced this pull request Nov 1, 2024
…rd party data compatibility (elastic#198635)

## Summary

This PR enhances the solution proposed by [this
PR](elastic#195702), by picking only the
fields that are currently not mapped by the current Third Party
integrations, this fixes performance degradation identified during the
QA cycle of 8.16.0.

Fixes:
- elastic/security-team#11034

### Misconfiguration Runtime fields

- **rule.benchmark.rule_number**: runtime mapping kept because this
field is missing on `security_solution-aws.misconfiguration_latest-v1`
causing filtering out data when sorting by **Rule Number** column on the
Misconfigurations Data Table.
- **rule.section**: runtime mapping kept because this field is missing
on `security_solution-aws.misconfiguration_latest-v1` causing filtering
out data when sorting by **Framework Section** column on the
Misconfigurations Data Table.
- **resource.sub_type**: runtime mapping kept because this field is
missing on `security_solution-aws.misconfiguration_latest-v1` causing
filtering out data when sorting by **Resource Type** column on the
Misconfigurations Data Table.
- **orchestrator.cluster.name**: runtime mapping kept because this field
is missing on `security_solution-wiz.misconfiguration_latest-v1` causing
filtering out data when grouping by **Kubernetes Cluster** column on the
Misconfigurations page.
- **cloud.account.name**: runtime mapping kept because this field is
missing on `security_solution-aws.misconfiguration_latest-v1` causing
filtering out data when grouping by **Kubernetes Cluster** column on the
Misconfigurations page.


### Vulnerability Runtime Fields:

- **observer.vendor**: runtime mapping added because this field is
mapped as `text` on `security_solution-wiz.vulnerability_latest-v1`
causing filtering out when sorting by the **Vendor** column on the
Vulnerability Data Table
- **cloud.provider**: runtime mapping added because this field is mapped
as `text` on `security_solution-wiz.vulnerability_latest-v1` causing
filtering out when grouping by **Cloud Account** on the Vulnerability
page. (This field is needed in order to retrieve the Cloud Provider name
and icon)


## Screenshot - Left: After the changes / Right: Current



https://github.com/user-attachments/assets/2cbdd8b7-131c-42e4-a881-632f8cd3854b


https://github.com/user-attachments/assets/4372feb6-4c01-4047-a90a-d6728f9400fe



https://github.com/user-attachments/assets/b9e32514-f2ee-4e4d-ba5f-ea3e20d4d0b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants