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] Disable selecting standalone instructions for user without agent policies READ permissions #187517

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Jul 3, 2024

Description

Resolve #184567

User without agent policies read cannot access the full agent policy, so cannot display the add standalone agent, that PR disable the switch (or tab) to display the add standalone agent instructions

UI changes

Screenshot 2024-07-03 at 10 51 10 AM

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team labels Jul 3, 2024
@nchaulet nchaulet self-assigned this Jul 3, 2024
@nchaulet nchaulet requested a review from a team as a code owner July 3, 2024 18:41
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

@@ -144,8 +144,7 @@ export const calculateAuthz = ({
// These are currently used by Fleet Server setup
setup: fleet.all || fleet.setup,
readEnrollmentTokens: (fleet.all || fleet.setup || fleet.agents?.all) ?? false,
readAgentPolicies:
(fleet.all || fleet.read || fleet.setup || fleet.agentPolicies?.read) ?? false,
readAgentPolicies: (fleet.all || fleet.setup) ?? false,
Copy link
Contributor

Choose a reason for hiding this comment

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

why is fleet.agentPolicies?.read removed here?

Copy link
Member Author

@nchaulet nchaulet Jul 3, 2024

Choose a reason for hiding this comment

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

This is the case where the feature flag subfeatureEnabled is not enabled, we should not check for subfeature privileges in that case

Copy link
Contributor

Choose a reason for hiding this comment

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

ah I missed that, thanks

@nchaulet
Copy link
Member Author

nchaulet commented Jul 4, 2024

@elasticmachine merge upstream

@nchaulet nchaulet enabled auto-merge (squash) July 4, 2024 13:20
@nchaulet nchaulet merged commit c27ca40 into elastic:main Jul 4, 2024
19 of 20 checks passed
@kibanamachine kibanamachine added v8.15.0 backport:skip This commit does not require backporting labels Jul 4, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.8MB 1.8MB +481.0B

Page load bundle

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

id before after diff
fleet 167.2KB 167.1KB -66.0B

History

cc @nchaulet

@nchaulet nchaulet deleted the feature-disable-standalone-flyout-without-needed-permissions branch July 4, 2024 13:52
@nchaulet nchaulet added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting labels Jul 4, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 4, 2024
…ent policies READ permissions (elastic#187517)

(cherry picked from commit c27ca40)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.15

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 4, 2024
…hout agent policies READ permissions (#187517) (#187605)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Fleet] Disable selecting standalone instructions for user without
agent policies READ permissions
(#187517)](#187517)

<!--- 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-07-04T13:45:20Z","message":"[Fleet]
Disable selecting standalone instructions for user without agent
policies READ permissions
(#187517)","sha":"c27ca409a4fcfa4a16e44558ab1302fa26f7f3b8","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v8.15.0","v8.16.0"],"title":"[Fleet]
Disable selecting standalone instructions for user without agent
policies READ
permissions","number":187517,"url":"#187517
Disable selecting standalone instructions for user without agent
policies READ permissions
(#187517)","sha":"c27ca409a4fcfa4a16e44558ab1302fa26f7f3b8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"#187517
Disable selecting standalone instructions for user without agent
policies READ permissions
(#187517)","sha":"c27ca409a4fcfa4a16e44558ab1302fa26f7f3b8"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

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
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.15.0 v8.16.0
Projects
None yet
5 participants