{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/68","labels_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/68/comments","events_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/68/events","html_url":"https://github.com/chrsmith/google-api-java-client/issues/68","id":59363728,"number":68,"title":"GoogleStorageAuthentication generates invalid signature","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Component-Google-APIs","name":"Component-Google-APIs","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Milestone-Version1.2.2","name":"Milestone-Version1.2.2","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Priority-High","name":"Priority-High","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-28T22:54:21Z","updated_at":"2015-02-28T22:54:23Z","closed_at":"2015-02-28T22:54:21Z","body":"```\nI'm unable to call the Google Storage API using GoogleStorageAuthentication\n\nMy code:\n-------------------------------------------------------\n\npublic class GoogleStorage \n{\n\tHttpTransport transport;\n\tString apiKey = \"MY_API_KEY\";\n\tString secret = \"MY_SECRET\";\n\t\n\tprivate static final SimpleDateFormat httpDateFormat = new SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss z\", Locale.US);\n\t \n\tstatic{\n\t\thttpDateFormat.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t}\n\t\n\tpublic GoogleStorage() throws IOException\n\t{\n\t\ttransport = setUpTransport();\n\t}\n\n\tprivate HttpTransport setUpTransport() \n\t{\n\t    HttpTransport transport = GoogleTransport.create();\n\t    GoogleHeaders headers = (GoogleHeaders) transport.defaultHeaders;\n\t    transport.addParser(new XmlHttpParser());\n\t    GoogleStorageAuthentication.authorize(transport, apiKey, secret);\n\t    return transport;\n\t}\n\t\n\tpublic ListBucketResult list(String bucketName) throws IOException\n\t{\n\t    HttpRequest request = transport.buildGetRequest();\n\t    request.url = new GenericUrl(\"http://\"+bucketName+\".commondatastorage.googleapis.com\");\n\t    request.headers.put(\"Content-Length\",\"0\");\n\t    request.headers.put(\"Date\",httpDateFormat.format(new Date()));\n\t    request.headers.put(\"Content-Type\",\"text/plain\");\n\t    HttpResponse response = request.execute();\n\t    ListBucketResult bucket = response.parseAs(ListBucketResult.class);\n\t\treturn bucket;\n\t}\n}\n\n\nRequest & Response (from sniffer):\n-------------------------------------------------------\nGET / HTTP/1.1 \nAccept-Encoding: gzip \nAuthorization: GOOG1 GOOGXXXXXXXXXXXXXXXXXXXXXXXXXXX \nContent-Length: 0 \nContent-Type: text/plain \nDate: Thu, 18 Nov 2010 22:56:16 GMT \nUser-Agent: Google-API-Java-Client/1.2.1-alpha \nHost: gigyadb.commondatastorage.googleapis.com \n\n\nHTTP/1.1 403 Forbidden \nContent-Type: application/xml; charset=UTF-8 \nDate: Thu, 18 Nov 2010 22:56:16 GMT \nExpires: Thu, 18 Nov 2010 22:56:16 GMT \nCache-Control: private, max-age=0 \nX-Content-Type-Options: nosniff \nX-Frame-Options: SAMEORIGIN \nX-XSS-Protection: 1; mode=block \nContent-Length: 317 \nServer: GSE \n<?xml version='1.0' encoding='UTF-8'? \n><Error><Code>SignatureDoesNotMatch</Code><Message>The request \n\nsignature we calculated does not match the signature you provided. \nCheck your Google secret key and signing method.</ \nMessage><StringToSign>GET \ntext/plain \nThu, 18 Nov 2010 22:56:16 GMT \n/gigyadb/</StringToSign></Error> \n\n```\n\nOriginal issue reported on code.google.com by `street...@gmail.com` on 19 Nov 2010 at 8:44"},"comment":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/comments/76553850","html_url":"https://github.com/chrsmith/google-api-java-client/issues/68#issuecomment-76553850","issue_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/68","id":76553850,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-28T22:54:22Z","updated_at":"2015-02-28T22:54:22Z","body":"```\nStarted working on this issue. A couple of more issues identified with the \nsigner. Two of them worth mentioning are:\n\n/ (for ListAllMyBuckets)\nGET filename (http://bucketname.commondatastorage.googleapis.com/object?acl\n```\n\nOriginal comment by `api.an...@gmail.com` on 15 Dec 2010 at 10:33\n* Changed state: **Started**"}}