Skip to content

UI > Policies: Team observers get 404 when accessing inherited (global) policies #44949

@lucasmrod

Description

@lucasmrod

Fleet versions

  • Discovered: 4.85.0 (unreleased)
  • Reproduced: 4.85.0

💥 Actual behavior

When a team observer opens an inherited (global) policy from the Policies list while viewing a team, the UI shows a 404 error page.

The frontend calls GET /api/latest/fleet/fleets/:fleet_id/policies/:policy_id (the team-scoped endpoint) for inherited policies. Inherited policies are global, so this returns 404 — they need to be fetched via the global endpoint instead.

🛠️ Expected behavior

Team observers can open inherited (global) policies from the team's Policies list and see the policy details page. The frontend should call the global policy endpoint (GET /api/latest/fleet/policies/:policy_id) when the policy is inherited, regardless of which team is currently selected.

🧑‍💻 Steps to reproduce

These steps:

  • Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
  1. As an admin, create at least one global policy.
  2. Create a team and add a user with the Observer role on that team.
  3. Log in as the team observer.
  4. Navigate to Policies and select the team from the team dropdown.
  5. Click an inherited (global) policy in the list.
  6. Observe the 404 error page. The network tab shows a request to /api/latest/fleet/fleets/:fleet_id/policies/:policy_id returning 404.

🕯️ More info (optional)

The team-scoped endpoint (/api/latest/fleet/fleets/:fleet_id/policies/:policy_id) does not resolve global policies; the global endpoint (/api/latest/fleet/policies/:policy_id) should be used for inherited entries in the team's policy list.

Metadata

Metadata

Assignees

Labels

#g-orchestrationOrchestration product groupbugSomething isn't working as documented~unreleased bugThis bug was found in an unreleased version of Fleet.

Type

Projects

Status

✅ Ready for release

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions