Missing Authorization Header #805
-
I'm attempting to POST a graphql query to an aws appsync application. I'm using the HttpClient extensions (PostAsync) to sign the request before sending it (this is an excellent implementation, by the way - nearly transparent to the user). My request is returning an empty list of objects, even though I know there are objects on the server. While investigating this, I noticed that in my response object, response.RequestMessage.Headers.Authorization is null. If I look in response.RequestMessage.Headers.headerStore, I have an entry:
So it appears that there's something about this signature that the system doesn't like. I don't whether the actual message had a valid Authorization header. Does anyone have any insight to share? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @m-siscogit! I have no experience in sending requests to AWS AppSync, but according to the documentation it should feature Signature version 4 authentication. Do you get any meaningful error messages in CloudWatch? |
Beta Was this translation helpful? Give feedback.
I found my problem. I was creating a set of anonymous credentials to access the user pool and then create my local user. The credentials I was passing to your code were these anonymous credentials and not the user credentials. Duh! Once I started passing the user credentials, everything worked.
I've tried a few different signing tools during this process, and yours is by far the easiest to use and most straightforward. Thanks for publishing this excellent piece of work.