{"action":"closed","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-java/issues/635","repository_url":"https://api.github.com/repos/aws/aws-sdk-java","labels_url":"https://api.github.com/repos/aws/aws-sdk-java/issues/635/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-java/issues/635/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-java/issues/635/events","html_url":"https://github.com/aws/aws-sdk-java/issues/635","id":133849924,"number":635,"title":"Issue verifying signature Subscription","user":{"login":"ggrandes","id":2364301,"avatar_url":"https://avatars.githubusercontent.com/u/2364301?v=3","gravatar_id":"","url":"https://api.github.com/users/ggrandes","html_url":"https://github.com/ggrandes","followers_url":"https://api.github.com/users/ggrandes/followers","following_url":"https://api.github.com/users/ggrandes/following{/other_user}","gists_url":"https://api.github.com/users/ggrandes/gists{/gist_id}","starred_url":"https://api.github.com/users/ggrandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggrandes/subscriptions","organizations_url":"https://api.github.com/users/ggrandes/orgs","repos_url":"https://api.github.com/users/ggrandes/repos","events_url":"https://api.github.com/users/ggrandes/events{/privacy}","received_events_url":"https://api.github.com/users/ggrandes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-java/labels/waiting-reply","name":"waiting-reply","color":"207de5"}],"state":"closed","locked":false,"assignee":{"login":"manikandanrs","id":2710935,"avatar_url":"https://avatars.githubusercontent.com/u/2710935?v=3","gravatar_id":"","url":"https://api.github.com/users/manikandanrs","html_url":"https://github.com/manikandanrs","followers_url":"https://api.github.com/users/manikandanrs/followers","following_url":"https://api.github.com/users/manikandanrs/following{/other_user}","gists_url":"https://api.github.com/users/manikandanrs/gists{/gist_id}","starred_url":"https://api.github.com/users/manikandanrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manikandanrs/subscriptions","organizations_url":"https://api.github.com/users/manikandanrs/orgs","repos_url":"https://api.github.com/users/manikandanrs/repos","events_url":"https://api.github.com/users/manikandanrs/events{/privacy}","received_events_url":"https://api.github.com/users/manikandanrs/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2016-02-16T00:32:18Z","updated_at":"2016-02-17T16:53:22Z","closed_at":"2016-02-17T16:53:22Z","body":"Acording to AWS-SNS [Verifying Message Signatures Doc](http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.verify.signature.html):\r\n\r\nSubscriptionConfirmation and UnsubscribeConfirmation tokens are:\r\n\r\n    Message\r\n    MessageId\r\n    SubscribeURL\r\n    Timestamp\r\n    Token\r\n    TopicArn\r\n    Type\r\n\r\n[com.amazonaws.services.sns.util.SignatureChecker](https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/util/SignatureChecker.java):\r\n\r\n```java\r\nprivate TreeMap<String, String> subscribeMessageValues(Map<String, String> parsedMessage){\r\n    TreeMap<String, String> signables = new TreeMap<String, String>();\r\n    String[] keys = { SUBSCRIBE_URL, MESSAGE, MESSAGE_ID, TYPE, TIMESTAMP, TOKEN, TOPIC };\r\n    for(String key: keys){\r\n        if(parsedMessage.containsKey(key)){\r\n            signables.put(key, parsedMessage.get(key));\r\n        }\r\n    }\r\n    return signables;\r\n}\r\n```\r\n\r\nCorrect order must be:\r\n\r\n```java\r\n    String[] keys = { MESSAGE, MESSAGE_ID, SUBSCRIBE_URL, TIMESTAMP, TOKEN, TOPIC, TYPE };\r\n```"}}