Getting an error running osquery inside k8s on aws...
# general
r
Getting an error running osquery inside k8s on aws.
Copy code
Exception making HTTP request to URL (<http://169.254.169.254/latest/meta-data/iam/security-credentials>): Invalid URL
t
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
its a bug in osquery in how it handles the redirect its receiving
t
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
yeah its the http_client code
t
I replied to the issue, I think I see the problem and the fix is easy.
r
awesome good to know
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
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
t
I see, perhaps we are not implementing the http client correctly
r
just saw your PR, thanks. am pulling it and building it myself to verify it fixes the issue.
👍 1
t
hey @Ryan, did you have a chance to test https://github.com/osquery/osquery/pull/6049
r
Yeah commented on the issue. Looks good
t
ah, sorry, missed that!
thank you!