-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Require AgentPolicies:All to add a fleet server #193014
[Fleet] Require AgentPolicies:All to add a fleet server #193014
Conversation
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
To update your PR or re-run it, just comment with: cc @nchaulet |
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.
I think it makes sense for the "operator"/superuser persona, who has access to all privileges, to be the one that also manages Fleet Server enrollments. cc @nimarezainia for awareness and feedback.
(cherry picked from commit 193935c)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… (#193156) # Backport This will backport the following commits from `main` to `8.x`: - [[Fleet] Require AgentPolicies:All to add a fleet server (#193014)](#193014) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"nicolas.chaulet@elastic.co"},"sourceCommit":{"committedDate":"2024-09-17T12:13:54Z","message":"[Fleet] Require AgentPolicies:All to add a fleet server (#193014)","sha":"193935cbf25c96ae1e6952f7233f001053e60a59","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor","v8.16.0"],"title":"[Fleet] Require AgentPolicies:All to add a fleet server","number":193014,"url":"https://github.com/elastic/kibana/pull/193014","mergeCommit":{"message":"[Fleet] Require AgentPolicies:All to add a fleet server (#193014)","sha":"193935cbf25c96ae1e6952f7233f001053e60a59"}},"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/193014","number":193014,"mergeCommit":{"message":"[Fleet] Require AgentPolicies:All to add a fleet server (#193014)","sha":"193935cbf25c96ae1e6952f7233f001053e60a59"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Resolve #187652
In the flow to add a fleet server, we may need to create a fleet server policy, this is why we should require the
AgentPolicies:All
to add a Fleet server.That PR address that, and add a unit test to compute that role.
Manual tests
You can after enabling subfeaturePrivileges experimental features and with a trial license create a role with access to Agents:all Settings:all and AgentPolicies:read and check you cannot add a fleet server
UI Change
With Agents:all Settings:all and Without AgentPolicies:all
With Agents:all Settings:all AgentPolicies:alll