elastic / kibana

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

[Fleet]: Able to access Fleet Server policy in Default space when policy is created and available in Secondary space only. #193149

Open amolnater-qasource opened 3 days ago

amolnater-qasource commented 3 days ago

Kibana Build details:

VERSION: 8.16.0
BUILD: 78301
COMMIT: 4773f525586a05e58ca82cffaa66c89c7b0df4c1

Preconditions:

  1. 8.16.0 or above Kibana should be available.
  2. Agent Policy should be created.

Steps to reproduce:

  1. Log into the Secondary Space.
  2. Click Add Fleet Server and add all the required URL etc.
  3. Observe Fleet Server policy is created and is accessible on in Secondary Space.
  4. Now navigate to Default Space.
  5. Navigate to Fleet>Agents>Add Fleet Server.
  6. Click continue.
  7. Observe user is able to access same Fleet server policy and the URL is also added under Fleet Settings.

Expected Result: Fleet Server policy should not be accessible in Default space when policy is created and available in Secondary space only.

Screen Recording:

https://github.com/user-attachments/assets/330944cd-8c94-4f1e-9571-266c13d0516b

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

elasticmachine commented 3 days ago

Pinging @elastic/fleet (Team:Fleet)

amolnater-qasource commented 3 days ago

@muskangulati-qasource Please review.

muskangulati-qasource commented 3 days ago

Secondary review for this ticket is Done!

nchaulet commented 3 days ago

Actually looks like the fleet server policy is not accessible in the default space, when we try to generate the policy in the add fleet server modal the request fails and it's not handled (the errors is silently swallowed), I think we should:

Image