[Fleet] Adjust privileges for GET output and GET download_source endpoints#194951
[Fleet] Adjust privileges for GET output and GET download_source endpoints#194951criamico merged 7 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/fleet (Team:Fleet) |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💔 Build FailedFailed CI StepsTest Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @criamico |
|
@elasticmachine merge upstream |
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11237782308 |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
cc @criamico |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…oints (elastic#194951) Fixes elastic#191266 ## Summary Updating the authz for following endpoints: - `GET /agent_download_sources` - `GET /agent_download_sources/{id}` - `GET /outputs` - `GET /outputs/{id}` They need to have `authz.fleet.readSettings || authz.fleet.readAgentPolicies` as they should be visible in the agent policy settings page as well. ### Testing - Enable feature flag `subfeaturePrivileges` - Create a role with following privileges:  - Create a user that has the previous role - Log in and go to any agent policy > settings - The download source and output fields should be filled and editable. They were previously empty, as the GET endpoints were failing with 403 Forbidden ### Checklist - [ ] [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 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 14d5677) # Conflicts: # x-pack/plugins/fleet/server/routes/download_source/index.ts
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
1 similar comment
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
…e endpoints (#194951) (#195536) # Backport This will backport the following commits from `main` to `8.x`: - [[Fleet] Adjust privileges for GET output and GET download_source endpoints (#194951)](#194951) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Cristina Amico","email":"criamico@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-08T14:36:19Z","message":"[Fleet] Adjust privileges for GET output and GET download_source endpoints (#194951)\n\nFixes https://github.com/elastic/kibana/issues/191266\r\n\r\n## Summary\r\nUpdating the authz for following endpoints:\r\n- `GET /agent_download_sources`\r\n- `GET /agent_download_sources/{id}`\r\n- `GET /outputs`\r\n- `GET /outputs/{id}`\r\nThey need to have `authz.fleet.readSettings ||\r\nauthz.fleet.readAgentPolicies` as they should be visible in the agent\r\npolicy settings page as well.\r\n\r\n\r\n### Testing\r\n- Enable feature flag `subfeaturePrivileges`\r\n- Create a role with following privileges:\r\n\r\n- Create a user that has the previous role\r\n- Log in and go to any agent policy > settings\r\n- The download source and output fields should be filled and editable.\r\nThey were previously empty, as the GET endpoints were failing with 403\r\nForbidden\r\n\r\n### Checklist\r\n- [ ] [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---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"14d5677d073838845074f76f0d9c0edce50533f0","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","v8.16.0","backport:version"],"number":194951,"url":"https://github.com/elastic/kibana/pull/194951","mergeCommit":{"message":"[Fleet] Adjust privileges for GET output and GET download_source endpoints (#194951)\n\nFixes https://github.com/elastic/kibana/issues/191266\r\n\r\n## Summary\r\nUpdating the authz for following endpoints:\r\n- `GET /agent_download_sources`\r\n- `GET /agent_download_sources/{id}`\r\n- `GET /outputs`\r\n- `GET /outputs/{id}`\r\nThey need to have `authz.fleet.readSettings ||\r\nauthz.fleet.readAgentPolicies` as they should be visible in the agent\r\npolicy settings page as well.\r\n\r\n\r\n### Testing\r\n- Enable feature flag `subfeaturePrivileges`\r\n- Create a role with following privileges:\r\n\r\n- Create a user that has the previous role\r\n- Log in and go to any agent policy > settings\r\n- The download source and output fields should be filled and editable.\r\nThey were previously empty, as the GET endpoints were failing with 403\r\nForbidden\r\n\r\n### Checklist\r\n- [ ] [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---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"14d5677d073838845074f76f0d9c0edce50533f0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194951","number":194951,"mergeCommit":{"message":"[Fleet] Adjust privileges for GET output and GET download_source endpoints (#194951)\n\nFixes https://github.com/elastic/kibana/issues/191266\r\n\r\n## Summary\r\nUpdating the authz for following endpoints:\r\n- `GET /agent_download_sources`\r\n- `GET /agent_download_sources/{id}`\r\n- `GET /outputs`\r\n- `GET /outputs/{id}`\r\nThey need to have `authz.fleet.readSettings ||\r\nauthz.fleet.readAgentPolicies` as they should be visible in the agent\r\npolicy settings page as well.\r\n\r\n\r\n### Testing\r\n- Enable feature flag `subfeaturePrivileges`\r\n- Create a role with following privileges:\r\n\r\n- Create a user that has the previous role\r\n- Log in and go to any agent policy > settings\r\n- The download source and output fields should be filled and editable.\r\nThey were previously empty, as the GET endpoints were failing with 403\r\nForbidden\r\n\r\n### Checklist\r\n- [ ] [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---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"14d5677d073838845074f76f0d9c0edce50533f0"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Fixes #191266
Summary
Updating the authz for following endpoints:
GET /agent_download_sourcesGET /agent_download_sources/{id}GET /outputsGET /outputs/{id}They need to have
authz.fleet.readSettings || authz.fleet.readAgentPoliciesas they should be visible in the agent policy settings page as well.Testing
subfeaturePrivilegesChecklist