elastic / elastic/fleet-server
Service account role missing `\maintenance` privilege on fleet data stream patterns
- Dominant language
- Go
- Stars
- 113
- Forks
- 117
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 112
Description
## Problem Statement
The `elastic/fleet-server` built-in service account role does not grant `maintenance` privilege on fleet data stream index patterns. In deployments where index shards are unpromotable (all serverless deployments, and standard deployments where backing indices land on stateless nodes), ES routes index refresh calls through `indices:admin/refresh/unpromotable`, which requires `maintenance` privilege. Without it, fleet-server receives a 403 on every output health write, silently breaking output health reporting for affected deployments.
This was surfaced during an active incident on a customer deployment and is not self-resolving.
## Acceptance Criteria
- [ ] The `elastic/fleet-server` service account role includes `maintenance` privilege on `logs-fleet_server.*` and `metrics-fleet_server.*` index patterns
- [ ] Fleet-server can successfully write and refresh output health data on a serverless deployment **without** a 403
- [ ] Fleet-server can successfully write and refresh output health data on a standard deployment with unpromotable shards **without** a 403
- [ ] No regression on deployments where shards are promotable
Spike / Investigation Notes
Triggered by a customer incident where `indices:admin/refresh/unpromotable` was denied for `elastic/fleet-server` on `.ds-logs-fleet_server.output_health-*`. The action is required when the write index has unpromotable shards, which is always the case on serverless and can occur on standard deployments depending on tier allocation. Granting `maintenance` at the role definition level is the correct fix; per-index grants are not viable as they must be reapplied after every rollover.
Contributor guide
Research direction
Start at the elastic/fleet-server built-in service account role definition and inspect the permissions for logs-fleet_server.* and metrics-fleet_server.*. Verify that output health writes and refreshes on serverless and standard deployments with unpromotable shards return no 403, while deployments with promotable shards remain unaffected.
Written by the indexing model from the issue text.
Assessment
- Domain
- authorization, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100