Skip to content

[Fleet][Agentless] Improve agentless APIs #240879

@nchaulet

Description

@nchaulet

Description

Currently to create an agentless integration, a user need to create both an agent policy and a package policy, this is not ideal, and could be confusing for the user. (The same happen for the deletion where the user need to delete the package policy, than the agent policy).

There is a lot of orphaned agent policies, as we hide them from the UI.

Proposed solution

We could use introduce a new dedicated API for agentless policies

Creation

If we get an agentless request without an agent policy id we could create one

POST /api/fleet/agentless_policies
{
  ...SimplifiedPackagePolicy,
  ...cloud_connector
}

Instead of

POST /api/fleet/agent_policies
{
 "supports_agentless": true,
}
POST /api/fleet/package_policies
{
 "policy_ids": [<previous_id>]
 "supports_agentless": true,
}

Deletion

Same on deletion we could delete both the package policy and agent policy

DELETE /api/fleet/agentless_policies/{id} => will delete both agent and package policy and 

Instead of

POST /api/fleet/package_policy/delete

DELETE /api/fleet/agent_policies/{id}

Notes

  • We considered using only the package policy API, but that API is already complex, and it seems more future proof to have a dedicated API.
  • This is kind of breaking, but agentless is not GA.

Metadata

Metadata

Assignees

Labels

Team:FleetTeam label for Observability Data Collection Fleet team

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions