In addition to adding to osctrl-api the ability to query tags and platforms by environment, this PR also adds environment_id to the tags table in the DB.
Keep in mind that existing tags won't have the value set, and the table tagged_nodes will need to be used to keep data integrity. Example of the SQL to be used:
UPDATE admin_tags a SET environment_id = (SELECT environment_id FROM osquery_nodes WHERE id = t.node_id) FROM tagged_nodes t;
In addition to adding to
osctrl-api
the ability to query tags and platforms by environment, this PR also addsenvironment_id
to the tags table in the DB. Keep in mind that existing tags won't have the value set, and the tabletagged_nodes
will need to be used to keep data integrity. Example of the SQL to be used: