- Notifications
You must be signed in to change notification settings - Fork 818
Description
Refactor
Component(s) to be refactored
- configuration
Explanation
There are currently four "resources" responsible for providing access to the agent configuration:
ConfigurationImport
ConfigurationExport
IslandConfiguration
Monkey
We'll use the strangler pattern to replace these with a single resource.
Create a Configuration resource that supports GET /api/configuration and POST /api/configuration. These endpoints should support the new configuration schema only.
Notes
Metadata about exploiters, such as supported operating systems or whether or not the exploiters can propagate is currently part of the config schema. This will change when exploiters become proper plugins, but for now, this is how it is. The POST endpoint should ignore any metadata, and only process configuration options. The GET endpoint should return the configuration with the metadata included. When the UI performs a configuration import (#2002), it will POST to the endpoint and include metadata. The endpoint should disregard this metadata.
Tasks
- Use the concrete repository to implement the get/post endpoints. (0d) - @shreyamalviya
- Don't forget to handle the metadata in
POST(see Notes) - Write unit tests - @shreyamalviya @ilija-lazoroski
- Don't forget to handle the metadata in