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

Accidental newline in AWS creds gives confusing "error parsing header value" message #1589

Open
nicholasbishop opened this issue Nov 14, 2019 · 2 comments · May be fixed by #1892
Open

Accidental newline in AWS creds gives confusing "error parsing header value" message #1589

nicholasbishop opened this issue Nov 14, 2019 · 2 comments · May be fixed by #1892
Labels

Comments

@nicholasbishop
Copy link

I ran into a confusing error message that I thought might be worth improving. (At the very least this bug report might be useful if anyone else makes the same mistake I did.) I'm running an app that uses Rusoto with AWS creds specified in the usual AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY. Due to a bug in the script I was using to run the app, the values for those two vars had \n appended. Naturally this didn't work correctly, but the Error I got was confusing:

error parsing header value: failed to parse header value

There was no logging output from Rusoto, even at the trace level. I'm not sure what the ideal fix would be, but I think either some additional debug- or trace-level logging, or a more specific Error message such as "invalid access_key_id value" would be helpful.

@ctennis
Copy link
Contributor

ctennis commented Nov 17, 2019

Boto surfaces the exception like this:

ValueError: Invalid header value b'AWS4-HMAC-SHA256 Credential=asdf\n/20191117/us-east-1/sts/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=abcdefg...'

@binarylogic
Copy link

We've also had many users over at https://github.com/timberio/vector bump into this. We'll see if we can contribute an improvement.

@ktff ktff linked a pull request Jan 17, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants