wazuh / wazuh-agent

Wazuh agent, the Wazuh agent for endpoints.
GNU Affero General Public License v3.0
32 stars 18 forks source link

Unify the usage of the sqlite manager in the new agent #122

Open TomasTurina opened 2 months ago

TomasTurina commented 2 months ago

Description

With the development of the new sqlite_manager, we have a centralized place to manage database queries.

Currently this component is only being used by command_store, but we also need to start using it in the following components:

This issue consists of starting to use the new database manager in the mentioned components to avoid having duplicate code and centralize access to the databases.

Considerations

jr0me commented 2 weeks ago

Update

I've reviewed the existing components related to persistence:

I'm examining these classes to develop a structured plan moving forward.

jr0me commented 2 weeks ago

Update

Created branch and started doing a preparatory cleanup. Created outline for a common interface that can implement different relational db.

jr0me commented 2 weeks ago

Update

Worked on modifying AgentInfoPersistence to use the SQLiteManager.

jr0me commented 1 week ago

Update

AgentInfoPersistence now is fully implemented with SQLiteManager. Currently working on moving MultiTypeQueue and Persistence to use it too.

jr0me commented 1 week ago

Update

Made several fixes and separated what was ready for merging from the other developments. Branch was merged and issue is now on hold.