Title
#general
r

Ryan

11/14/2019, 8:30 PM
Getting an error running osquery inside k8s on aws.
Exception making HTTP request to URL (<http://169.254.169.254/latest/meta-data/iam/security-credentials>): Invalid URL
theopolis

theopolis

11/15/2019, 7:59 PM
My knowledge of cloud infra is so poor, so please pardon if I'm way off here: I heard the local metadata endpoints can be flaky and that osquery should implement some re-checking/etc.
r

Ryan

11/15/2019, 8:01 PM
its a bug in osquery in how it handles the redirect its receiving
theopolis

theopolis

11/15/2019, 8:02 PM
ah, I think this is easily fixable -- there is a "follow redirects" option for the internal HTTP client. Can we trace where in code the request is made?
r

Ryan

11/15/2019, 8:04 PM
yeah its the http_client code
theopolis

theopolis

11/15/2019, 8:06 PM
I replied to the issue, I think I see the problem and the fix is easy.
r

Ryan

11/15/2019, 8:12 PM
awesome good to know
8:14 PM
hrm not sure your response is accurate. i dont think its an issue with follow redirects happening as i can see that it happens, its that the http_client attempts to redirect to a non valid URL
8:16 PM
that Location is just a path which is then sent on L421 to uri. uri then bombs because a location doesnt match the URL regex
theopolis

theopolis

11/15/2019, 9:21 PM
I see, perhaps we are not implementing the http client correctly
r

Ryan

11/18/2019, 1:44 PM
just saw your PR, thanks. am pulling it and building it myself to verify it fixes the issue.
theopolis

theopolis

11/19/2019, 12:07 AM
hey @Ryan, did you have a chance to test https://github.com/osquery/osquery/pull/6049
r

Ryan

11/19/2019, 12:08 AM
Yeah commented on the issue. Looks good
theopolis

theopolis

11/19/2019, 12:09 AM
ah, sorry, missed that!
12:09 AM
thank you!