fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Support endpoint-scoped API-only users in fleetctl user create

Open moojomoore opened this issue 4 months ago • 1 comments

  • @noahtalerman: Fleet fell behind on new request triage. To get back on track, on 2026-11-06 all issues older than 30 days (like this one) were put to the side. If this is something you want Fleet to revisit, please add back the :product label to put it into the queue for new request triage.

Problem

I’m a Fleet customer using API-only users for automation, integrations, and least-privilege access.

Fleet now supports endpoint-scoped permissions for API-only users, which is a great improvement for reducing API token blast radius. However, fleetctl user create --api-only does not appear to provide a native way to define those endpoint scopes when creating the API-only user.

Today, I can create an API-only user with fleetctl, including a global or fleet-scoped role:

fleetctl user create \
  --name "Automation user" \
  --api-only \
  --global-role observer

But I do not see a native way to include the API endpoint allowlist as part of that command.

This is especially confusing because Fleet’s CLI output directs Premium users to go to the Fleet UI to further customize which endpoints the API-only user can access.

For API-only users, that workflow feels backwards. API-only users are commonly used for automation, CI/CD, GitOps, and other code-driven workflows. Create the account from the CLI and then switch to the UI to finish configuring its API scopes goes against the GitOps/code-based workflow that Fleet actively encourages.

Why this matters

Endpoint-scoped API-only users are most valuable when they can be created repeatably and non-interactively.

There is a workaround today: customers can call the REST API directly, including through fleetctl api, and pass an api_endpoints array. That works, but it feels like a gap in the first-class fleetctl user create --api-only workflow.

We would like endpoint-scoped API-only user creation to be a first-class citizen in fleetctl, rather than having fleetctl point users back to the UI for the final security-scoping step.

Expected outcome

Fleet customers should be able to create a least-privilege API-only user entirely from fleetctl, including:

  • the API-only user name
  • the global or fleet-scoped role
  • the endpoint allowlist / API scopes

moojomoore avatar Jul 07 '26 17:07 moojomoore

  • @noahtalerman: Fleet fell behind on new request triage. To get back on track, on 2026-11-06 all issues older than 30 days (like this one) were put to the side. If this is something you want Fleet to revisit, please add back the :product label to put it into the queue for new request triage.

FYI @moojomoore thanks for the feedback! Keep it coming

noahtalerman avatar Nov 06 '26 22:11 noahtalerman