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

[Fleet] Fix security solution tag id #164582

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

criamico
Copy link
Contributor

@criamico criamico commented Aug 23, 2023

Related to #152814

Summary

Fix for a bug found in #162643 :
The security solution tag is actually created with "Security Solution" name and "security-solution-default" id (instead of SecuritySolution):

   {
        "id": "security-solution-default",
        "name": "Security Solution",
        "description": "",
        "color": "#D36086"
    }

I found that in same cases the tag is duplicated, since is not created with an unique id:

Screenshot 2023-08-23 at 15 07 09

I think it's acceptable to use the "security-solution-default", at least it will create the correct tag name.

Test

For testing I used a package built locally that uses the Security Solution tag
The steps are the same as described in #162643

  • Additionally, check that the tags endpoint in the Tags page has name and id as described above:
Screenshot 2023-08-23 at 14 55 05

@criamico criamico added the Team:Fleet Team label for Observability Data Collection Fleet team label Aug 23, 2023
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@criamico criamico added v8.1.1 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 labels Aug 23, 2023
@criamico criamico self-assigned this Aug 23, 2023
@criamico criamico marked this pull request as ready for review August 23, 2023 12:57
@criamico criamico requested a review from a team as a code owner August 23, 2023 12:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@juliaElastic
Copy link
Contributor

@criamico the label v8.1.1 looks wrong, did you mean something else?

@criamico criamico added v8.11.0 and removed v8.1.1 labels Aug 23, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @criamico

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.10

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 24, 2023
Related to elastic#152814

## Summary

Fix for a bug found in elastic#162643 :
The security solution tag is actually created with "Security Solution"
name and "security-solution-default" id (instead of `SecuritySolution`):

```
   {
        "id": "security-solution-default",
        "name": "Security Solution",
        "description": "",
        "color": "#D36086"
    }
```

I found that in same cases the tag is duplicated, since[ is not created
with an unique
id](https://github.com/elastic/kibana/blob/dd0938bea3ebd745a49ac164a7a5f053ba6a138b/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_tags.ts#L44-L51):

<img width="3079" alt="Screenshot 2023-08-23 at 15 07 09"
src="https://github.com/elastic/kibana/assets/16084106/ef885d8f-2e68-4695-aa14-1adc2e326ab0">

I think it's acceptable to use the "security-solution-default", at least
it will create the correct tag name.

### Test
For testing I used a package built locally that uses the `Security
Solution` tag
The steps are the same as described in
elastic#162643

- Additionally, check that the `tags` endpoint in the Tags page has name
and id as described above:
<img width="2521" alt="Screenshot 2023-08-23 at 14 55 05"
src="https://github.com/elastic/kibana/assets/16084106/48b3ddd0-3d04-4ff6-8a24-946902687b13">

(cherry picked from commit da8d3b2)
kibanamachine added a commit that referenced this pull request Aug 24, 2023
# Backport

This will backport the following commits from `main` to `8.10`:
- [[Fleet] Fix security solution tag id
(#164582)](#164582)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Cristina
Amico","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-24T07:20:13Z","message":"[Fleet]
Fix security solution tag id (#164582)\n\nRelated to
https://github.com/elastic/kibana/issues/152814\r\n\r\n##
Summary\r\n\r\nFix for a bug found in
#162643 :\r\nThe security solution
tag is actually created with \"Security Solution\"\r\nname and
\"security-solution-default\" id (instead of
`SecuritySolution`):\r\n\r\n```\r\n {\r\n \"id\":
\"security-solution-default\",\r\n \"name\": \"Security Solution\",\r\n
\"description\": \"\",\r\n \"color\": \"#D36086\"\r\n }\r\n```\r\n\r\nI
found that in same cases the tag is duplicated, since[ is not
created\r\nwith an
unique\r\nid](https://github.com/elastic/kibana/blob/dd0938bea3ebd745a49ac164a7a5f053ba6a138b/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_tags.ts#L44-L51):\r\n\r\n<img
width=\"3079\" alt=\"Screenshot 2023-08-23 at 15 07
09\"\r\nsrc=\"https://github.com/elastic/kibana/assets/16084106/ef885d8f-2e68-4695-aa14-1adc2e326ab0\">\r\n\r\nI
think it's acceptable to use the \"security-solution-default\", at
least\r\nit will create the correct tag name.\r\n\r\n### Test\r\nFor
testing I used a package built locally that uses the
`Security\r\nSolution` tag\r\nThe steps are the same as described
in\r\nhttps://github.com//pull/162643\r\n\r\n-
Additionally, check that the `tags` endpoint in the Tags page has
name\r\nand id as described above:\r\n<img width=\"2521\"
alt=\"Screenshot 2023-08-23 at 14 55
05\"\r\nsrc=\"https://github.com/elastic/kibana/assets/16084106/48b3ddd0-3d04-4ff6-8a24-946902687b13\">","sha":"da8d3b25c91deaba383a6d6a40d00522f7c6f463","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v8.11.0"],"number":164582,"url":"https://github.com/elastic/kibana/pull/164582","mergeCommit":{"message":"[Fleet]
Fix security solution tag id (#164582)\n\nRelated to
https://github.com/elastic/kibana/issues/152814\r\n\r\n##
Summary\r\n\r\nFix for a bug found in
#162643 :\r\nThe security solution
tag is actually created with \"Security Solution\"\r\nname and
\"security-solution-default\" id (instead of
`SecuritySolution`):\r\n\r\n```\r\n {\r\n \"id\":
\"security-solution-default\",\r\n \"name\": \"Security Solution\",\r\n
\"description\": \"\",\r\n \"color\": \"#D36086\"\r\n }\r\n```\r\n\r\nI
found that in same cases the tag is duplicated, since[ is not
created\r\nwith an
unique\r\nid](https://github.com/elastic/kibana/blob/dd0938bea3ebd745a49ac164a7a5f053ba6a138b/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_tags.ts#L44-L51):\r\n\r\n<img
width=\"3079\" alt=\"Screenshot 2023-08-23 at 15 07
09\"\r\nsrc=\"https://github.com/elastic/kibana/assets/16084106/ef885d8f-2e68-4695-aa14-1adc2e326ab0\">\r\n\r\nI
think it's acceptable to use the \"security-solution-default\", at
least\r\nit will create the correct tag name.\r\n\r\n### Test\r\nFor
testing I used a package built locally that uses the
`Security\r\nSolution` tag\r\nThe steps are the same as described
in\r\nhttps://github.com//pull/162643\r\n\r\n-
Additionally, check that the `tags` endpoint in the Tags page has
name\r\nand id as described above:\r\n<img width=\"2521\"
alt=\"Screenshot 2023-08-23 at 14 55
05\"\r\nsrc=\"https://github.com/elastic/kibana/assets/16084106/48b3ddd0-3d04-4ff6-8a24-946902687b13\">","sha":"da8d3b25c91deaba383a6d6a40d00522f7c6f463"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164582","number":164582,"mergeCommit":{"message":"[Fleet]
Fix security solution tag id (#164582)\n\nRelated to
https://github.com/elastic/kibana/issues/152814\r\n\r\n##
Summary\r\n\r\nFix for a bug found in
#162643 :\r\nThe security solution
tag is actually created with \"Security Solution\"\r\nname and
\"security-solution-default\" id (instead of
`SecuritySolution`):\r\n\r\n```\r\n {\r\n \"id\":
\"security-solution-default\",\r\n \"name\": \"Security Solution\",\r\n
\"description\": \"\",\r\n \"color\": \"#D36086\"\r\n }\r\n```\r\n\r\nI
found that in same cases the tag is duplicated, since[ is not
created\r\nwith an
unique\r\nid](https://github.com/elastic/kibana/blob/dd0938bea3ebd745a49ac164a7a5f053ba6a138b/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_tags.ts#L44-L51):\r\n\r\n<img
width=\"3079\" alt=\"Screenshot 2023-08-23 at 15 07
09\"\r\nsrc=\"https://github.com/elastic/kibana/assets/16084106/ef885d8f-2e68-4695-aa14-1adc2e326ab0\">\r\n\r\nI
think it's acceptable to use the \"security-solution-default\", at
least\r\nit will create the correct tag name.\r\n\r\n### Test\r\nFor
testing I used a package built locally that uses the
`Security\r\nSolution` tag\r\nThe steps are the same as described
in\r\nhttps://github.com//pull/162643\r\n\r\n-
Additionally, check that the `tags` endpoint in the Tags page has
name\r\nand id as described above:\r\n<img width=\"2521\"
alt=\"Screenshot 2023-08-23 at 14 55
05\"\r\nsrc=\"https://github.com/elastic/kibana/assets/16084106/48b3ddd0-3d04-4ff6-8a24-946902687b13\">","sha":"da8d3b25c91deaba383a6d6a40d00522f7c6f463"}}]}]
BACKPORT-->

Co-authored-by: Cristina Amico <[email protected]>
jloleysens added a commit that referenced this pull request Aug 24, 2023
* main: (3152 commits)
  [Security Solution][Detection Engine] fixes 410 error on index legacy template call (#164682)
  [SavedObjects] Create serverless roots for jest integration tests (#164157)
  Create upselling package and implement EntityAnalytics serverless upselling (#164136)
  [Fleet] Change 'Out-of-date' to 'Outdated policy' in agent list table (#164673)
  [IndexManagement] Use internal base path for API (#164665)
  [Profiling] removing ~ symbol (#164595)
  [Telemetry] Fetch snapshot: allow specifying the version via querystring (#164670)
  [Cases] Show warning when all cases table reaches 10k cases message (#164323)
  [ML] Removing token list from text expansion model testing (#164560)
  [Fleet] Add secrets package API integration test (#164583)
  [Fleet] Fix security solution tag id (#164582)
  [Security Solution] Modal says "duplicating 0 rules" when you duplicate an individual rule (#163908)
  [api-docs] 2023-08-24 Daily api_docs build (#164658)
  [APM] Cleanup alerting api tests (#164438)
  Upgrade EUI to 87.2.0 (#164385)
  [ML] Fix query bar autocompletion for ML and AIOps embeddables (#164485)
  [Fleet] Fix flaky unit test for the details page (#164641)
  [Security Solution] update codeowner for serverless security subdir (#164640)
  [Security Solution] Fixes Assistant Connector and Actions RBAC Flow (#164382)
  [Discover] Removing large string truncation from doc viewer (#164236)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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:Fleet Team label for Observability Data Collection Fleet team v8.10.0 v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants