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

getNodeByUUID can not find node when receiving logs #82

Closed
javuto opened this issue Jul 10, 2020 · 0 comments
Closed

getNodeByUUID can not find node when receiving logs #82

javuto opened this issue Jul 10, 2020 · 0 comments
Assignees
Labels
🐛 bug Something isn't working osctrl-tls osctrl-tls related changes
Milestone

Comments

@javuto
Copy link
Collaborator

javuto commented Jul 10, 2020

Overview

The code to enroll new clients automatically makes the UUID uppercase. In certain environments, for example docker, the UUID is extracted and submitted as lowercase, so the function getNodeByUUID can not find the node when trying to update the metadata or log status/result logs. This is the error seen in the logs:

osquery-ubuntu18    | I0710 17:30:03.995153    26 tls.cpp:253] TLS/HTTPS POST request to URI: https://osctrl-nginx/dev/log
osctrl-nginx        | 172.25.0.3 - - [10/Jul/2020:17:30:04 +0000] "POST /dev/log HTTP/1.1" 200 22 "-" "osquery/4.4.0" "-"
osctrl-tls          | dispatch.go:15: error updating metadata getNodeByUUID record not found
osctrl-tls          | dispatch.go:31: error refreshing last result getNodeByUUID record not found

Proposed solution

Every time the UUID is looked up it will be uppercase'd so consistency will be achieved and this will not affect metadata updates or logging ability.

@javuto javuto added 🐛 bug Something isn't working osctrl-tls osctrl-tls related changes labels Jul 10, 2020
@javuto javuto added this to the v0.2.3 milestone Jul 10, 2020
@javuto javuto self-assigned this Jul 10, 2020
@javuto javuto closed this as completed Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working osctrl-tls osctrl-tls related changes
Projects
None yet
Development

No branches or pull requests

1 participant