Skip to content

Agent plugin upload API endpoint #3417

@mssalvatore

Description

@mssalvatore

Description

Add an API endpoint that allows a user to upload an agent plugins (content-type application/octet-stream): PUT /api/agent-plugins

Tasks

  • Add store_agent_plugin(self, host_operating_system: OperatingSystem, agent_plugin: AgentPlugin) to IAgentPluginRepository (0d) @ilija-lazoroski
    • Remove anything from the vulture ignore list relating to the plugin parser
    • Add a stub implementation in FileAgentPluginRepository
  • Add remove_agent_plugin(self, host_operating_system: Optional[OperatingSystem], agent_plugin_name: str, agent_plugin_type: AgentPluginType) (0d) @ilija-lazoroski
    • This should be idempotent
    • If host_operating_system is None, delete plugin for all operating systems (add to docstring)
    • Add a stub implementation in FileAgentPluginRepository
  • Add install_agent_plugin_archive(self, agent_plugin_archive: bytes) to IAgentPluginService and implement it in AgentPluginService (0d) @ilija-lazoroski
    • Unpack/parse the archive into an AgentPlugin (plugin_archive_parser.parse_plugin)
    • Call IAgentPluginRepository.remove_agent_plugin() to remove the plugin for all operating systems
    • Call IAgentPluginRepository.store_agent_plugin() for each host operating system supported by the plugin
    • Make this method thread-safe
  • Add a new endpoint with PUT /api/agent-plugins (0.25d) @ilija-lazoroski

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions