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: allow Universal Profiling symbolizer permissions on indices #155642

Merged
merged 4 commits into from
Apr 24, 2023

Conversation

inge4pres
Copy link
Contributor

Summary

For the introduction of the Universal Profiling symbolizer in Cloud, Fleet needs an update.
The reason for Universal Profiling symbolizer to be different from other packages running via Fleet is that:

  1. it ingests data into indicesm not only data-streams
  2. it uses a non-conventional naming scheme for indices

Checklist

Delete any items that are not applicable to this PR.

  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list

For maintainers

Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
@inge4pres inge4pres requested a review from kpollich April 24, 2023 15:28
@inge4pres inge4pres self-assigned this Apr 24, 2023
@inge4pres inge4pres requested a review from a team as a code owner April 24, 2023 15:28
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Apr 24, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@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.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@inge4pres inge4pres added the release_note:skip Skip the PR/issue when compiling release notes label Apr 24, 2023
@@ -42,6 +52,12 @@ export async function storedPackagePoliciesToAgentPermissions(

const pkg = packageInfoCache.get(pkgToPkgKey(packagePolicy.package))!;

// Special handling for Universal Profiling packages, as it does not use data streams _only_,
// but also indices that do not adhere to the convention.
if (pkg.name==='profiler_symbolizer') {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! Thanks for the suggestion, will do

inge4pres and others added 2 commits April 24, 2023 17:44
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
@inge4pres inge4pres enabled auto-merge (squash) April 24, 2023 16:20
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 17 19 +2
securitySolution 395 398 +3
total +5

Total ESLint disabled count

id before after diff
enterpriseSearch 18 20 +2
securitySolution 475 478 +3
total +5

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

cc @inge4pres

@inge4pres inge4pres merged commit d2c4c32 into elastic:main Apr 24, 2023
@kibanamachine kibanamachine added v8.8.0 backport:skip This commit does not require backporting labels Apr 24, 2023
@inge4pres inge4pres deleted the profiling/fleet-permissions-indices branch April 24, 2023 19:51
jbcrail pushed a commit that referenced this pull request May 2, 2023
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>

## Summary

Include the creation of symbolizer package policy in the setup initiated
by users when they opt-in Universal Profiling.

### Checklist

- [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

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Related issues or PRs
* #155642
* #150885

---------

Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
kibanamachine pushed a commit that referenced this pull request May 2, 2023
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>

## Summary

Include the creation of symbolizer package policy in the setup initiated
by users when they opt-in Universal Profiling.

### Checklist

- [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

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Related issues or PRs
* #155642
* #150885

---------

Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
(cherry picked from commit d4f6cf7)
kibanamachine referenced this pull request May 2, 2023
)

# Backport

This will backport the following commits from `main` to `8.8`:
- [Profiling: symbolization created on user opt-in
(#156089)](#156089)

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

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

<!--BACKPORT [{"author":{"name":"Francesco
Gualazzi","email":"inge4pres@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-05-02T18:24:54Z","message":"Profiling:
symbolization created on user opt-in (#156089)\n\nSigned-off-by:
inge4pres <francesco.gualazzi@elastic.co>\r\n\r\n##
Summary\r\n\r\nInclude the creation of symbolizer package policy in the
setup initiated\r\nby users when they opt-in Universal
Profiling.\r\n\r\n### Checklist\r\n\r\n-
[X]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [X] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Related issues or PRs\r\n*
https://github.com/elastic/kibana/pull/155642\r\n*
https://github.com/elastic/kibana/pull/150885\r\n\r\n---------\r\n\r\nSigned-off-by:
inge4pres <francesco.gualazzi@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Jen
Huang
<its.jenetic@gmail.com>","sha":"d4f6cf703da8022aeedfabca6ff7689faf67e071","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","auto-backport","ci:build-cloud-image","8.8
candidate","v8.8.0","v8.9.0"],"number":156089,"url":"https://github.com/elastic/kibana/pull/156089","mergeCommit":{"message":"Profiling:
symbolization created on user opt-in (#156089)\n\nSigned-off-by:
inge4pres <francesco.gualazzi@elastic.co>\r\n\r\n##
Summary\r\n\r\nInclude the creation of symbolizer package policy in the
setup initiated\r\nby users when they opt-in Universal
Profiling.\r\n\r\n### Checklist\r\n\r\n-
[X]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [X] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Related issues or PRs\r\n*
https://github.com/elastic/kibana/pull/155642\r\n*
https://github.com/elastic/kibana/pull/150885\r\n\r\n---------\r\n\r\nSigned-off-by:
inge4pres <francesco.gualazzi@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Jen
Huang
<its.jenetic@gmail.com>","sha":"d4f6cf703da8022aeedfabca6ff7689faf67e071"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156089","number":156089,"mergeCommit":{"message":"Profiling:
symbolization created on user opt-in (#156089)\n\nSigned-off-by:
inge4pres <francesco.gualazzi@elastic.co>\r\n\r\n##
Summary\r\n\r\nInclude the creation of symbolizer package policy in the
setup initiated\r\nby users when they opt-in Universal
Profiling.\r\n\r\n### Checklist\r\n\r\n-
[X]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [X] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Related issues or PRs\r\n*
https://github.com/elastic/kibana/pull/155642\r\n*
https://github.com/elastic/kibana/pull/150885\r\n\r\n---------\r\n\r\nSigned-off-by:
inge4pres <francesco.gualazzi@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Jen
Huang
<its.jenetic@gmail.com>","sha":"d4f6cf703da8022aeedfabca6ff7689faf67e071"}}]}]
BACKPORT-->

Co-authored-by: Francesco Gualazzi <inge4pres@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.8 candidate backport:skip This commit does not require backporting ci:build-cloud-image release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants