{"action":"closed","number":21,"pull_request":{"url":"https://api.github.com/repos/mhart/dynalite/pulls/21","id":28969774,"html_url":"https://github.com/mhart/dynalite/pull/21","diff_url":"https://github.com/mhart/dynalite/pull/21.diff","patch_url":"https://github.com/mhart/dynalite/pull/21.patch","issue_url":"https://api.github.com/repos/mhart/dynalite/issues/21","number":21,"state":"closed","locked":false,"title":"Added authorization support for query string","user":{"login":"evalphobia","id":2827521,"avatar_url":"https://avatars.githubusercontent.com/u/2827521?v=3","gravatar_id":"","url":"https://api.github.com/users/evalphobia","html_url":"https://github.com/evalphobia","followers_url":"https://api.github.com/users/evalphobia/followers","following_url":"https://api.github.com/users/evalphobia/following{/other_user}","gists_url":"https://api.github.com/users/evalphobia/gists{/gist_id}","starred_url":"https://api.github.com/users/evalphobia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evalphobia/subscriptions","organizations_url":"https://api.github.com/users/evalphobia/orgs","repos_url":"https://api.github.com/users/evalphobia/repos","events_url":"https://api.github.com/users/evalphobia/events{/privacy}","received_events_url":"https://api.github.com/users/evalphobia/received_events","type":"User","site_admin":false},"body":"This patch enable to use query string as an alternative to request header for AWS authorization.\r\n\r\nhttp://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html\r\n\r\n\r\n## reproduce step\r\n\r\nmake a request with AWS authorization info in query string,\r\n\r\n```bash\r\n$ curl -H \"Accept: application/json\" \\\r\n-H \"Content-type: application/json\" \\\r\n-H \"X-Amz-Target:DynamoDB_20120810.ListTables\" \\\r\n-H \"X-Amz-Content-Sha256:my-sha256\" \\\r\n-X POST -d \"{}\" \\\r\n\"http://localhost:4567/\\\r\n?X-Amz-Algorithm=AWS4-HMAC-SHA256\\\r\n&X-Amz-Credential=cred%2F20150101%2Fus-east-1%2Fdynamodb%2Faws4_request\\\r\n&X-Amz-Date=20150101T100000Z\\\r\n&X-Amz-Expires=300\\\r\n&X-Amz-SignedHeaders=host%3Bx-amz-target\\\r\n&X-Amz-Signature=my-signature\"\r\n\r\n{\"__type\":\"com.amazon.coral.service#MissingAuthenticationTokenException\",\"message\":\"Request is missing Authentication Token\"}\r\n```\r\n\r\nit shows failed to recognize auth info in query string.\r\n\r\n## test steps\r\n\r\nprepare this commit,\r\n\r\n```bash\r\n$ git remote add pr git@github.com:evalphobia/dynalite.git\r\n$ git fetch pr\r\n$ git checkout -b feature/auth-query-string  pr/feature/auth-query-string\r\n```\r\n\r\nand run dynalite server.\r\n\r\nThen, make a request with AWS authorization info in query string,\r\n\r\n```bash\r\n$ curl -H \"Accept: application/json\" \\\r\n-H \"Content-type: application/json\" \\\r\n-H \"X-Amz-Target:DynamoDB_20120810.ListTables\" \\\r\n-H \"X-Amz-Content-Sha256:my-sha256\" \\\r\n-X POST -d \"{}\" \\\r\n\"http://localhost:4567/\\\r\n?X-Amz-Algorithm=AWS4-HMAC-SHA256\\\r\n&X-Amz-Credential=cred%2F20150101%2Fus-east-1%2Fdynamodb%2Faws4_request\\\r\n&X-Amz-Date=20150101T100000Z\\\r\n&X-Amz-Expires=300\\\r\n&X-Amz-SignedHeaders=host%3Bx-amz-target\\\r\n&X-Amz-Signature=my-signature\"\r\n\r\n{\"TableNames\":[]}\r\n```\r\n\r\nIt shows success with `{\"TableNames\":[]}`.\r\n\r\nNext, check the missing paramter request,\r\n\r\n```bash\r\n$ curl -H \"Accept: application/json\" \\\r\n-H \"Content-type: application/json\" \\\r\n-H \"X-Amz-Target:DynamoDB_20120810.ListTables\" \\\r\n-H \"X-Amz-Content-Sha256:my-sha256\" \\\r\n-X POST -d \"{}\" \\\r\n\"http://localhost:4567/\\\r\n?X-Amz-Algorithm=AWS4-HMAC-SHA256\\\r\n&X-Amz-Credential=cred%2F20150101%2Fus-east-1%2Fdynamodb%2Faws4_request\\\r\n&X-Amz-Date=20150101T100000Z\\\r\n&X-Amz-Expires=300\\\r\n&X-Amz-SignedHeaders=host%3Bx-amz-target\"\r\n\r\n{\"__type\":\"com.amazon.coral.service#MissingAuthenticationTokenException\",\"message\":\"Request is missing Authentication Token\"}\r\n```\r\n\r\nIt shows failed to authorize since the rack of necessary parameter.\r\n\r\n----\r\n\r\nactually I'm not a nodejs coder, so my code could be violated some common rules.\r\nWhen that, please tell me  ; )\r\nthanks.","created_at":"2015-02-10T00:14:34Z","updated_at":"2015-03-16T02:00:41Z","closed_at":"2015-03-16T02:00:41Z","merged_at":"2015-03-16T02:00:41Z","merge_commit_sha":"a1bad3f33dfcf751aa4ad7a11286503e0c145799","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mhart/dynalite/pulls/21/commits","review_comments_url":"https://api.github.com/repos/mhart/dynalite/pulls/21/comments","review_comment_url":"https://api.github.com/repos/mhart/dynalite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mhart/dynalite/issues/21/comments","statuses_url":"https://api.github.com/repos/mhart/dynalite/statuses/41af0bc4c6bac0a0eda34818f2d7b85c56eae99c","head":{"label":"evalphobia:feature/auth-query-string","ref":"feature/auth-query-string","sha":"41af0bc4c6bac0a0eda34818f2d7b85c56eae99c","user":{"login":"evalphobia","id":2827521,"avatar_url":"https://avatars.githubusercontent.com/u/2827521?v=3","gravatar_id":"","url":"https://api.github.com/users/evalphobia","html_url":"https://github.com/evalphobia","followers_url":"https://api.github.com/users/evalphobia/followers","following_url":"https://api.github.com/users/evalphobia/following{/other_user}","gists_url":"https://api.github.com/users/evalphobia/gists{/gist_id}","starred_url":"https://api.github.com/users/evalphobia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evalphobia/subscriptions","organizations_url":"https://api.github.com/users/evalphobia/orgs","repos_url":"https://api.github.com/users/evalphobia/repos","events_url":"https://api.github.com/users/evalphobia/events{/privacy}","received_events_url":"https://api.github.com/users/evalphobia/received_events","type":"User","site_admin":false},"repo":{"id":30523367,"name":"dynalite","full_name":"evalphobia/dynalite","owner":{"login":"evalphobia","id":2827521,"avatar_url":"https://avatars.githubusercontent.com/u/2827521?v=3","gravatar_id":"","url":"https://api.github.com/users/evalphobia","html_url":"https://github.com/evalphobia","followers_url":"https://api.github.com/users/evalphobia/followers","following_url":"https://api.github.com/users/evalphobia/following{/other_user}","gists_url":"https://api.github.com/users/evalphobia/gists{/gist_id}","starred_url":"https://api.github.com/users/evalphobia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evalphobia/subscriptions","organizations_url":"https://api.github.com/users/evalphobia/orgs","repos_url":"https://api.github.com/users/evalphobia/repos","events_url":"https://api.github.com/users/evalphobia/events{/privacy}","received_events_url":"https://api.github.com/users/evalphobia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evalphobia/dynalite","description":"A mock implementation of Amazon's DynamoDB built on LevelDB","fork":true,"url":"https://api.github.com/repos/evalphobia/dynalite","forks_url":"https://api.github.com/repos/evalphobia/dynalite/forks","keys_url":"https://api.github.com/repos/evalphobia/dynalite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evalphobia/dynalite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evalphobia/dynalite/teams","hooks_url":"https://api.github.com/repos/evalphobia/dynalite/hooks","issue_events_url":"https://api.github.com/repos/evalphobia/dynalite/issues/events{/number}","events_url":"https://api.github.com/repos/evalphobia/dynalite/events","assignees_url":"https://api.github.com/repos/evalphobia/dynalite/assignees{/user}","branches_url":"https://api.github.com/repos/evalphobia/dynalite/branches{/branch}","tags_url":"https://api.github.com/repos/evalphobia/dynalite/tags","blobs_url":"https://api.github.com/repos/evalphobia/dynalite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evalphobia/dynalite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evalphobia/dynalite/git/refs{/sha}","trees_url":"https://api.github.com/repos/evalphobia/dynalite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evalphobia/dynalite/statuses/{sha}","languages_url":"https://api.github.com/repos/evalphobia/dynalite/languages","stargazers_url":"https://api.github.com/repos/evalphobia/dynalite/stargazers","contributors_url":"https://api.github.com/repos/evalphobia/dynalite/contributors","subscribers_url":"https://api.github.com/repos/evalphobia/dynalite/subscribers","subscription_url":"https://api.github.com/repos/evalphobia/dynalite/subscription","commits_url":"https://api.github.com/repos/evalphobia/dynalite/commits{/sha}","git_commits_url":"https://api.github.com/repos/evalphobia/dynalite/git/commits{/sha}","comments_url":"https://api.github.com/repos/evalphobia/dynalite/comments{/number}","issue_comment_url":"https://api.github.com/repos/evalphobia/dynalite/issues/comments{/number}","contents_url":"https://api.github.com/repos/evalphobia/dynalite/contents/{+path}","compare_url":"https://api.github.com/repos/evalphobia/dynalite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evalphobia/dynalite/merges","archive_url":"https://api.github.com/repos/evalphobia/dynalite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evalphobia/dynalite/downloads","issues_url":"https://api.github.com/repos/evalphobia/dynalite/issues{/number}","pulls_url":"https://api.github.com/repos/evalphobia/dynalite/pulls{/number}","milestones_url":"https://api.github.com/repos/evalphobia/dynalite/milestones{/number}","notifications_url":"https://api.github.com/repos/evalphobia/dynalite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evalphobia/dynalite/labels{/name}","releases_url":"https://api.github.com/repos/evalphobia/dynalite/releases{/id}","created_at":"2015-02-09T07:12:26Z","updated_at":"2015-03-13T02:02:59Z","pushed_at":"2015-03-13T03:24:09Z","git_url":"git://github.com/evalphobia/dynalite.git","ssh_url":"git@github.com:evalphobia/dynalite.git","clone_url":"https://github.com/evalphobia/dynalite.git","svn_url":"https://github.com/evalphobia/dynalite","homepage":"","size":21642,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mhart:master","ref":"master","sha":"14b0f3092f2daf52662d19c5c2fbdc7337351730","user":{"login":"mhart","id":367936,"avatar_url":"https://avatars.githubusercontent.com/u/367936?v=3","gravatar_id":"","url":"https://api.github.com/users/mhart","html_url":"https://github.com/mhart","followers_url":"https://api.github.com/users/mhart/followers","following_url":"https://api.github.com/users/mhart/following{/other_user}","gists_url":"https://api.github.com/users/mhart/gists{/gist_id}","starred_url":"https://api.github.com/users/mhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhart/subscriptions","organizations_url":"https://api.github.com/users/mhart/orgs","repos_url":"https://api.github.com/users/mhart/repos","events_url":"https://api.github.com/users/mhart/events{/privacy}","received_events_url":"https://api.github.com/users/mhart/received_events","type":"User","site_admin":false},"repo":{"id":10733511,"name":"dynalite","full_name":"mhart/dynalite","owner":{"login":"mhart","id":367936,"avatar_url":"https://avatars.githubusercontent.com/u/367936?v=3","gravatar_id":"","url":"https://api.github.com/users/mhart","html_url":"https://github.com/mhart","followers_url":"https://api.github.com/users/mhart/followers","following_url":"https://api.github.com/users/mhart/following{/other_user}","gists_url":"https://api.github.com/users/mhart/gists{/gist_id}","starred_url":"https://api.github.com/users/mhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhart/subscriptions","organizations_url":"https://api.github.com/users/mhart/orgs","repos_url":"https://api.github.com/users/mhart/repos","events_url":"https://api.github.com/users/mhart/events{/privacy}","received_events_url":"https://api.github.com/users/mhart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhart/dynalite","description":"A mock implementation of Amazon's DynamoDB built on LevelDB","fork":false,"url":"https://api.github.com/repos/mhart/dynalite","forks_url":"https://api.github.com/repos/mhart/dynalite/forks","keys_url":"https://api.github.com/repos/mhart/dynalite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhart/dynalite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhart/dynalite/teams","hooks_url":"https://api.github.com/repos/mhart/dynalite/hooks","issue_events_url":"https://api.github.com/repos/mhart/dynalite/issues/events{/number}","events_url":"https://api.github.com/repos/mhart/dynalite/events","assignees_url":"https://api.github.com/repos/mhart/dynalite/assignees{/user}","branches_url":"https://api.github.com/repos/mhart/dynalite/branches{/branch}","tags_url":"https://api.github.com/repos/mhart/dynalite/tags","blobs_url":"https://api.github.com/repos/mhart/dynalite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhart/dynalite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhart/dynalite/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhart/dynalite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhart/dynalite/statuses/{sha}","languages_url":"https://api.github.com/repos/mhart/dynalite/languages","stargazers_url":"https://api.github.com/repos/mhart/dynalite/stargazers","contributors_url":"https://api.github.com/repos/mhart/dynalite/contributors","subscribers_url":"https://api.github.com/repos/mhart/dynalite/subscribers","subscription_url":"https://api.github.com/repos/mhart/dynalite/subscription","commits_url":"https://api.github.com/repos/mhart/dynalite/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhart/dynalite/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhart/dynalite/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhart/dynalite/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhart/dynalite/contents/{+path}","compare_url":"https://api.github.com/repos/mhart/dynalite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhart/dynalite/merges","archive_url":"https://api.github.com/repos/mhart/dynalite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhart/dynalite/downloads","issues_url":"https://api.github.com/repos/mhart/dynalite/issues{/number}","pulls_url":"https://api.github.com/repos/mhart/dynalite/pulls{/number}","milestones_url":"https://api.github.com/repos/mhart/dynalite/milestones{/number}","notifications_url":"https://api.github.com/repos/mhart/dynalite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhart/dynalite/labels{/name}","releases_url":"https://api.github.com/repos/mhart/dynalite/releases{/id}","created_at":"2013-06-17T08:54:51Z","updated_at":"2015-03-13T15:13:00Z","pushed_at":"2015-03-16T02:00:41Z","git_url":"git://github.com/mhart/dynalite.git","ssh_url":"git@github.com:mhart/dynalite.git","clone_url":"https://github.com/mhart/dynalite.git","svn_url":"https://github.com/mhart/dynalite","homepage":"","size":22148,"stargazers_count":79,"watchers_count":79,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":9,"forks":11,"open_issues":9,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mhart/dynalite/pulls/21"},"html":{"href":"https://github.com/mhart/dynalite/pull/21"},"issue":{"href":"https://api.github.com/repos/mhart/dynalite/issues/21"},"comments":{"href":"https://api.github.com/repos/mhart/dynalite/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/mhart/dynalite/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/mhart/dynalite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mhart/dynalite/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/mhart/dynalite/statuses/41af0bc4c6bac0a0eda34818f2d7b85c56eae99c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"mhart","id":367936,"avatar_url":"https://avatars.githubusercontent.com/u/367936?v=3","gravatar_id":"","url":"https://api.github.com/users/mhart","html_url":"https://github.com/mhart","followers_url":"https://api.github.com/users/mhart/followers","following_url":"https://api.github.com/users/mhart/following{/other_user}","gists_url":"https://api.github.com/users/mhart/gists{/gist_id}","starred_url":"https://api.github.com/users/mhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhart/subscriptions","organizations_url":"https://api.github.com/users/mhart/orgs","repos_url":"https://api.github.com/users/mhart/repos","events_url":"https://api.github.com/users/mhart/events{/privacy}","received_events_url":"https://api.github.com/users/mhart/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":132,"deletions":10,"changed_files":2}}