Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tags and platforms by environment in osctrl-api #478

Merged
merged 3 commits into from
Aug 17, 2024

Conversation

javuto
Copy link
Collaborator

@javuto javuto commented Aug 16, 2024

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 WHERE a.id = t.admin_tag_id;

@javuto javuto added the osctrl-api osctrl-api related changes label Aug 16, 2024
@javuto javuto self-assigned this Aug 16, 2024
@javuto javuto added the osctrl-admin osctrl-admin related changes label Aug 16, 2024
@javuto javuto merged commit 47ed750 into main Aug 17, 2024
52 checks passed
@javuto javuto deleted the api-tags-platforms branch August 17, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
osctrl-admin osctrl-admin related changes osctrl-api osctrl-api related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant