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] Use elastic_agent package to build monitoring permissions for elastic agent #112730

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Sep 21, 2021

Description

Resolve #107738

Currently we hardcode the permissions we gave to the agent for monitoring, that PR use the data streams defined by the elastic_agent package to build the permissions instead.

Implementations details

If the elastic_agent package is not installed we still return an hardcoded version of the permissions (similar of what we are currently returning for permissions)

Tests

  • added unit tests
  • Manual tests:
    • Create a policy with the different monitoring settings possible (logs enabled, metrics, enabled), than enroll an agent the agent should be able to send monitoring data (logs, metrics). You can verify that the policy contains the permissions too in the agent policy details view.

@nchaulet nchaulet self-assigned this Sep 21, 2021
@nchaulet nchaulet changed the title [Fleet] Use elastic_agent package to build monitoring permissions for… [Fleet] Use elastic_agent package to build monitoring permissions for elastic agent Sep 21, 2021
@nchaulet nchaulet force-pushed the feature-use-elastic-agent-package-permissions branch from 55b67e4 to 77e7c2d Compare September 22, 2021 13:06
@nchaulet nchaulet added auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes v7.16.0 v8.0.0 Team:Fleet Team label for Observability Data Collection Fleet team labels Sep 22, 2021
@nchaulet nchaulet marked this pull request as ready for review September 22, 2021 13:07
@nchaulet nchaulet requested a review from a team as a code owner September 22, 2021 13:07
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@nchaulet
Copy link
Member Author

nchaulet commented Oct 1, 2021

@elasticmachine merge upstream

@nchaulet
Copy link
Member Author

nchaulet commented Oct 4, 2021

@elasticmachine merge upstream

@nchaulet nchaulet requested review from kpollich and hop-dev October 4, 2021 12:52
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1096 1097 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 125.7KB 126.1KB +415.0B
Unknown metric groups

API count

id before after diff
fleet 1197 1198 +1

History

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

cc @nchaulet

Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 - things seem well thought out in how we fall back to our previous hard coded permissions in case we can't resolve permissions from the package.

@nchaulet nchaulet merged commit a4eab44 into elastic:master Oct 4, 2021
@nchaulet nchaulet deleted the feature-use-elastic-agent-package-permissions branch October 4, 2021 17:36
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 4, 2021
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Oct 4, 2021
… agent (#112730) (#113813)

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Use elastic_agent package for agent monitoring permissions
4 participants