elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.63k stars 8.22k forks source link

[Fleet]: Forbidden error is displayed on clicking Get Uninstall command for user role Agents: None. #192055

Closed amolnater-qasource closed 1 month ago

amolnater-qasource commented 2 months ago

Kibana Build details:

VERSION: 8.16.0 SNAPSHOT
BUILD: 77913
COMMIT: f2aba4624160124344e98dac19d5eefd83fa79ce

Role:

Integrations: All
Fleet: Read
Agents: None
Agent policies: All
Settings: All

Image

Preconditions:

  1. 8.16.0-SNAPSHOT Kibana cloud environment should be available.
  2. New User should be created with above defined role.

Steps to reproduce:

  1. Login with the above user.
  2. Navigate to Agent policies tab>policy with Elastic Defend.
  3. Navigate to policy settings enable Tamper protection and click Get Uninstall command.
  4. Observe forbidden error is displayed under Agents tab for custom user with Agent policies: None.

Expected Result: Forbidden error shouldn't displayed on clicking Get Uninstall command/ or Get Uninstall command should be disabled for user role Agents: None.

Screen Recording:

https://github.com/user-attachments/assets/83974ddb-7248-4e96-b27d-c550a4cbe35e

Feature: https://github.com/elastic/ingest-dev/issues/2903

elasticmachine commented 2 months ago

Pinging @elastic/fleet (Team:Fleet)

amolnater-qasource commented 2 months ago

@muskangulati-qasource Please review.

muskangulati-qasource commented 2 months ago

Secondary review on this ticket is Done!

nchaulet commented 1 month ago

Uninstall tokens should only be available for user with Agents:All we should hide the button if the user do not have the required permissions