guardicore / monkey

Infection Monkey - An open-source adversary emulation platform
https://www.guardicore.com/infectionmonkey/
GNU General Public License v3.0
6.61k stars 772 forks source link

Leverage flask blueprints for resource registration #3086

Open VakarisZ opened 1 year ago

VakarisZ commented 1 year ago

Refactor

As more code gets segregated into modules on the island side, we can use blueprints to leverage registration of URL's for those modules. Blueprints can improve code quality in the following ways:

Component(s) to be refactored

Resource URL's, resource registration

Explanation

shreyamalviya commented 1 year ago

We can't remove manual registration of resources all over the codebase because of the DI container. With the exception of the authentication resources, all the add_resource methods are being called on the FlaskDIWrapper object. We can probably only leverage this for the authentication resources.