)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"3b121c9c1fe73e927eeb16607374fcff121997d7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the wrong check logic on signature"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In some case the string \"\u003chost\u003e:\u003cport\u003e\" are omitted in HTTP"},{"line_number":10,"context_line":"header, if the port is included in the Host header sent in"},{"line_number":11,"context_line":"the request, it must be included in the generated string."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da86d52c_c6ad8a34","line":9,"updated":"2015-02-13 17:48:07.000000000","message":"(nit) is omitted from the HTTP header","commit_id":"bca46a5185a8bfbc7933314e8efd164e93cacd4a"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"f9c5963502b9916ea4de680a072fbc0f43e06e62","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the wrong check logic on signature"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In some case the string \"\u003chost\u003e:\u003cport\u003e\" are omitted in HTTP"},{"line_number":10,"context_line":"header, if the port is included in the Host header sent in"},{"line_number":11,"context_line":"the request, it must be included in the generated string."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da86d52c_faae9180","line":9,"in_reply_to":"da86d52c_c6ad8a34","updated":"2015-02-14 03:59:13.000000000","message":"Done","commit_id":"bca46a5185a8bfbc7933314e8efd164e93cacd4a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"3b121c9c1fe73e927eeb16607374fcff121997d7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix the wrong check logic on signature"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In some case the string \"\u003chost\u003e:\u003cport\u003e\" are omitted in HTTP"},{"line_number":10,"context_line":"header, if the port is included in the Host header sent in"},{"line_number":11,"context_line":"the request, it must be included in the generated string."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"There is no sanity signature method escapes the colon and port"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da86d52c_66669e2b","line":10,"updated":"2015-02-13 17:48:07.000000000","message":"(nit) s/, i/. I/","commit_id":"bca46a5185a8bfbc7933314e8efd164e93cacd4a"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"f9c5963502b9916ea4de680a072fbc0f43e06e62","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix the wrong check logic on signature"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In some case the string \"\u003chost\u003e:\u003cport\u003e\" are omitted in HTTP"},{"line_number":10,"context_line":"header, if the port is included in the Host header sent in"},{"line_number":11,"context_line":"the request, it must be included in the generated string."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"There is no sanity signature method escapes the colon and port"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da86d52c_1ab445d0","line":10,"in_reply_to":"da86d52c_66669e2b","updated":"2015-02-14 03:59:13.000000000","message":"Done","commit_id":"bca46a5185a8bfbc7933314e8efd164e93cacd4a"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"6f24ca79fbca36878a76ff3a05cc703011ee61ca","unresolved":false,"context_lines":[{"line_number":12,"context_line":"from the dict."},{"line_number":13,"context_line":"- credentials[\u0027signature\u0027] is not guaranteed to be existed,"},{"line_number":14,"context_line":"so check it explicitly."},{"line_number":15,"context_line":"- Need reinitialize \u0027singer\u0027 to avoid contaminated status"},{"line_number":16,"context_line":"of signature."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1289115"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9a80dd14_a11c3678","line":15,"range":{"start_line":15,"start_character":21,"end_line":15,"end_character":27},"updated":"2015-03-20 18:06:35.000000000","message":"s/singer/signer/","commit_id":"8060072d36a98d6d7ade7b3a76699a39daa4b370"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"1543f4b982e81c954b91cae0897ead25e41110b2","unresolved":false,"context_lines":[{"line_number":12,"context_line":"from the dict."},{"line_number":13,"context_line":"- credentials[\u0027signature\u0027] is not guaranteed to be existed,"},{"line_number":14,"context_line":"so check it explicitly."},{"line_number":15,"context_line":"- Need reinitialize \u0027singer\u0027 to avoid contaminated status"},{"line_number":16,"context_line":"of signature."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1289115"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7a75e904_acca476c","line":15,"in_reply_to":"9a80dd14_a11c3678","updated":"2015-03-21 02:17:30.000000000","message":"Done","commit_id":"8060072d36a98d6d7ade7b3a76699a39daa4b370"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"14cfdc398fc93880a99889845822030b41dbd2ec","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Fix the typo, the colon should be got from credentials[\u0027host\u0027]"},{"line_number":10,"context_line":"instead of credentials[\u0027signature\u0027]."},{"line_number":11,"context_line":"- Fix the syntax issue when trying to get from signature"},{"line_number":12,"context_line":"from the dict."},{"line_number":13,"context_line":"- credentials[\u0027signature\u0027] is not guaranteed to existed,"},{"line_number":14,"context_line":"so check it explicitly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"baa041b7_526887f5","line":11,"updated":"2015-04-02 03:38:50.000000000","message":"s/from/the\n\nWill update the commit message sooner.","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"bb0667a83780d77d3290ac50aac3465575c88dc1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dave Chen \u003cwei.d.chen@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-04-02 13:29:02 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the typo and problematic logic on ec2 signature"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Fix the typo, the colon should be got from credentials[\u0027host\u0027]"},{"line_number":10,"context_line":"instead of credentials[\u0027signature\u0027]."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baa041b7_4d20da9b","line":7,"updated":"2015-04-02 13:47:48.000000000","message":"nit: \"Fix the typo\" probably isn\u0027t appropriate....a type is more of a spelling mistake...maybe: \"Fix errors in ec2 signature logic checking\"....and then describe the errors you are fixing below","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"9b77bc42b0b040537a19f927fbb88ed55e592092","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dave Chen \u003cwei.d.chen@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-04-02 13:29:02 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the typo and problematic logic on ec2 signature"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Fix the typo, the colon should be got from credentials[\u0027host\u0027]"},{"line_number":10,"context_line":"instead of credentials[\u0027signature\u0027]."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baa041b7_910ef832","line":7,"in_reply_to":"baa041b7_4d20da9b","updated":"2015-04-02 14:54:53.000000000","message":"Done","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"bb0667a83780d77d3290ac50aac3465575c88dc1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the typo and problematic logic on ec2 signature"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Fix the typo, the colon should be got from credentials[\u0027host\u0027]"},{"line_number":10,"context_line":"instead of credentials[\u0027signature\u0027]."},{"line_number":11,"context_line":"- Fix the syntax issue when trying to get the signature"},{"line_number":12,"context_line":"from the dict."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baa041b7_0d42d23e","line":9,"updated":"2015-04-02 13:47:48.000000000","message":"nit: I\u0027d drop the work typo....maybe just: \"Check for colon in credentials[\u0027host\u0027] instead...\"","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"9b77bc42b0b040537a19f927fbb88ed55e592092","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the typo and problematic logic on ec2 signature"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- Fix the typo, the colon should be got from credentials[\u0027host\u0027]"},{"line_number":10,"context_line":"instead of credentials[\u0027signature\u0027]."},{"line_number":11,"context_line":"- Fix the syntax issue when trying to get the signature"},{"line_number":12,"context_line":"from the dict."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baa041b7_71149443","line":9,"in_reply_to":"baa041b7_0d42d23e","updated":"2015-04-02 14:54:53.000000000","message":"Done","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"671d09654f50b77b648ab557ac91869600761a6c","unresolved":false,"context_lines":[{"line_number":12,"context_line":"from the dict."},{"line_number":13,"context_line":"- credentials[\u0027signature\u0027] is not guaranteed to existed,"},{"line_number":14,"context_line":"so check it explicitly."},{"line_number":15,"context_line":"- Need reinitialize \u0027signer\u0027 to avoid contaminated status"},{"line_number":16,"context_line":"of signature."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1289115"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baa041b7_adb6463b","line":15,"updated":"2015-04-02 13:49:22.000000000","message":"\"Need to reinitialize.....\"","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"9b77bc42b0b040537a19f927fbb88ed55e592092","unresolved":false,"context_lines":[{"line_number":12,"context_line":"from the dict."},{"line_number":13,"context_line":"- credentials[\u0027signature\u0027] is not guaranteed to existed,"},{"line_number":14,"context_line":"so check it explicitly."},{"line_number":15,"context_line":"- Need reinitialize \u0027signer\u0027 to avoid contaminated status"},{"line_number":16,"context_line":"of signature."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1289115"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baa041b7_311e0c64","line":15,"in_reply_to":"baa041b7_adb6463b","updated":"2015-04-02 14:54:53.000000000","message":"Done","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"}],"keystone/contrib/ec2/controllers.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"0887fdb855d1844d63c45600020612465ed433e4","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            return"},{"line_number":61,"context_line":"        # NOTE(vish): Some libraries don\u0027t use the port when signing"},{"line_number":62,"context_line":"        #             requests, so try again without port."},{"line_number":63,"context_line":"        elif \u0027:\u0027 in credentials[\u0027signature\u0027]:"},{"line_number":64,"context_line":"            hostname, _port \u003d credentials[\u0027host\u0027].split(\u0027:\u0027)"},{"line_number":65,"context_line":"            credentials[\u0027host\u0027] \u003d hostname"},{"line_number":66,"context_line":"            signature \u003d signer.generate(credentials)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_378f0130","side":"PARENT","line":63,"updated":"2015-01-05 14:50:13.000000000","message":"Why are you removing this logic?","commit_id":"3a41a9b3490a5993f6eebec1666d72c2367e5009"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"edcfd3c24dbf138c305037ace905d4b9c861ead2","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            return"},{"line_number":61,"context_line":"        # NOTE(vish): Some libraries don\u0027t use the port when signing"},{"line_number":62,"context_line":"        #             requests, so try again without port."},{"line_number":63,"context_line":"        elif \u0027:\u0027 in credentials[\u0027signature\u0027]:"},{"line_number":64,"context_line":"            hostname, _port \u003d credentials[\u0027host\u0027].split(\u0027:\u0027)"},{"line_number":65,"context_line":"            credentials[\u0027host\u0027] \u003d hostname"},{"line_number":66,"context_line":"            signature \u003d signer.generate(credentials)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_ce8c55da","side":"PARENT","line":63,"in_reply_to":"3a961159_12b12101","updated":"2015-01-06 03:38:14.000000000","message":"s/credentials[\u0027signature\u0027/credentials[\u0027signature\u0027]\n\nPrevious issues:\n- syntax issue on dictionary, credentials.signature -\u003e credentials[signature]\n- logic issue on the last \"else\" branch. EC signature not supplied should be different with signature is not correct.\n- typo issue,  credentials[signature]-\u003e credentials[\u0027host\u0027]\n- logic issue, should not check colon in the credentials[signature], so decide to remove the branch.\n\nayoung,\nHope this address your question.","commit_id":"3a41a9b3490a5993f6eebec1666d72c2367e5009"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"284f445a228d61934640c3f8b13f3421bd4088a6","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            return"},{"line_number":61,"context_line":"        # NOTE(vish): Some libraries don\u0027t use the port when signing"},{"line_number":62,"context_line":"        #             requests, so try again without port."},{"line_number":63,"context_line":"        elif \u0027:\u0027 in credentials[\u0027signature\u0027]:"},{"line_number":64,"context_line":"            hostname, _port \u003d credentials[\u0027host\u0027].split(\u0027:\u0027)"},{"line_number":65,"context_line":"            credentials[\u0027host\u0027] \u003d hostname"},{"line_number":66,"context_line":"            signature \u003d signer.generate(credentials)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_12b12101","side":"PARENT","line":63,"in_reply_to":"3a961159_378f0130","updated":"2015-01-06 01:29:04.000000000","message":"Copy my comments here to address your question:\nhttps://github.com/openstack/keystone/blob/master/keystone/contrib/ec2/controllers.py#L63 is not make sense, I think the intention of author would want to check whether the colon and port is existed in credentials[\u0027host\u0027] instead of credentials[\u0027signature\u0027, the colon existed in credentials[\u0027signature\u0027] and check against this sound absurd.\n\nIt\u0027s common to see the colon and port are ommited in the request header, but when they are present there and the signature method is sanity a little bit, there is no case and no reason at all why they are split from the sign request. so the needless check against this will be never get effective.\n\nSo, per my understanding, the code branch here will never be invoked.","commit_id":"3a41a9b3490a5993f6eebec1666d72c2367e5009"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"0b8f7e0618664cbe41f703efe21ad279a9122216","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            return"},{"line_number":62,"context_line":"        # NOTE(vish): Some libraries don\u0027t use the port when signing"},{"line_number":63,"context_line":"        #             requests, so try again without port."},{"line_number":64,"context_line":"        elif \u0027:\u0027 in credentials[\u0027signature\u0027]:"},{"line_number":65,"context_line":"            hostname, _port \u003d credentials[\u0027host\u0027].split(\u0027:\u0027)"},{"line_number":66,"context_line":"            credentials[\u0027host\u0027] \u003d hostname"},{"line_number":67,"context_line":"            signature \u003d signer.generate(credentials)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_53575eca","side":"PARENT","line":64,"updated":"2015-02-16 17:38:32.000000000","message":"The point of this check is that aws itself omits the port number (it is on port 80). The behavior on another port is not defined by amazon, so some client implementations of the signature algorithm include the port number whereas others omit it. This allows us to be compatible with both versions. In other words first we try generating the signature with the port included, then we try without the port and we accept a match on either.","commit_id":"115d9660de21f5520e5c5f6a92364607b368281b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"eeedfdfbe1f1d2985b3d52e7894c5a85b2670e3d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            return"},{"line_number":62,"context_line":"        # NOTE(vish): Some libraries don\u0027t use the port when signing"},{"line_number":63,"context_line":"        #             requests, so try again without port."},{"line_number":64,"context_line":"        elif \u0027:\u0027 in credentials[\u0027signature\u0027]:"},{"line_number":65,"context_line":"            hostname, _port \u003d credentials[\u0027host\u0027].split(\u0027:\u0027)"},{"line_number":66,"context_line":"            credentials[\u0027host\u0027] \u003d hostname"},{"line_number":67,"context_line":"            signature \u003d signer.generate(credentials)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_f35da4ed","side":"PARENT","line":64,"in_reply_to":"da86d52c_53575eca","updated":"2015-02-17 02:11:24.000000000","message":"So, key point is port number is included in credentials[\u0027host\u0027] or included in credentials[\u0027signature\u0027]? that should be a big difference.\n\nIf included in credentials[\u0027host\u0027] it\u0027s easier to understand whereas in credentials[\u0027signature\u0027] it\u0027s difficult for me to provide a testcase to verfiy it.\n\nWould you please share the *signature algorithm* here, maybe I can try to draft the testcase to prove the fix? thx.","commit_id":"115d9660de21f5520e5c5f6a92364607b368281b"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"145b1cd08b95a6cf2b8ea69f889688fcb9a1db4c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            elif \u0027:\u0027 in credentials[\u0027host\u0027]:"},{"line_number":68,"context_line":"                hostname, _port \u003d credentials[\u0027host\u0027].split(\u0027:\u0027)"},{"line_number":69,"context_line":"                credentials[\u0027host\u0027] \u003d hostname"},{"line_number":70,"context_line":"                # NOTE(davechen): we need reinitialize \u0027singer\u0027 to avoid"},{"line_number":71,"context_line":"                # contaminated status of signature, this is similar with"},{"line_number":72,"context_line":"                # other library of programming language, JAVA for example."},{"line_number":73,"context_line":"                signer \u003d ec2_utils.Ec2Signer(creds_ref[\u0027secret\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_61507e2c","line":70,"range":{"start_line":70,"start_character":34,"end_line":70,"end_character":36},"updated":"2015-03-20 18:05:15.000000000","message":"s/singer/signer/","commit_id":"8060072d36a98d6d7ade7b3a76699a39daa4b370"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"1543f4b982e81c954b91cae0897ead25e41110b2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            elif \u0027:\u0027 in credentials[\u0027host\u0027]:"},{"line_number":68,"context_line":"                hostname, _port \u003d credentials[\u0027host\u0027].split(\u0027:\u0027)"},{"line_number":69,"context_line":"                credentials[\u0027host\u0027] \u003d hostname"},{"line_number":70,"context_line":"                # NOTE(davechen): we need reinitialize \u0027singer\u0027 to avoid"},{"line_number":71,"context_line":"                # contaminated status of signature, this is similar with"},{"line_number":72,"context_line":"                # other library of programming language, JAVA for example."},{"line_number":73,"context_line":"                signer \u003d ec2_utils.Ec2Signer(creds_ref[\u0027secret\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a75e904_6cb92fe9","line":70,"in_reply_to":"9a80dd14_61507e2c","updated":"2015-03-21 02:17:30.000000000","message":"Done","commit_id":"8060072d36a98d6d7ade7b3a76699a39daa4b370"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"ea63e00f0b2f72db403092803413f76be484b9fd","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        signer \u003d ec2_utils.Ec2Signer(creds_ref[\u0027secret\u0027])"},{"line_number":59,"context_line":"        signature \u003d signer.generate(credentials)"},{"line_number":60,"context_line":"        # NOTE(davechen): credentials[\u0027signature\u0027] is not guaranteed to"},{"line_number":61,"context_line":"        # be existed, we need check it explicitly."},{"line_number":62,"context_line":"        if credentials[\u0027signature\u0027]:"},{"line_number":63,"context_line":"            if utils.auth_str_equal(credentials[\u0027signature\u0027], signature):"},{"line_number":64,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_876256d7","line":61,"updated":"2015-04-01 23:48:38.000000000","message":"change \"be existed\" to \"exist\"","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"90d15ae1b5b22f4c52b84450c4bb3308ffd269a2","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        signer \u003d ec2_utils.Ec2Signer(creds_ref[\u0027secret\u0027])"},{"line_number":59,"context_line":"        signature \u003d signer.generate(credentials)"},{"line_number":60,"context_line":"        # NOTE(davechen): credentials[\u0027signature\u0027] is not guaranteed to"},{"line_number":61,"context_line":"        # be existed, we need check it explicitly."},{"line_number":62,"context_line":"        if credentials[\u0027signature\u0027]:"},{"line_number":63,"context_line":"            if utils.auth_str_equal(credentials[\u0027signature\u0027], signature):"},{"line_number":64,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_8846e2bd","line":61,"in_reply_to":"baa041b7_876256d7","updated":"2015-04-02 05:32:24.000000000","message":"Done","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"ea63e00f0b2f72db403092803413f76be484b9fd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        signature \u003d signer.generate(credentials)"},{"line_number":60,"context_line":"        # NOTE(davechen): credentials[\u0027signature\u0027] is not guaranteed to"},{"line_number":61,"context_line":"        # be existed, we need check it explicitly."},{"line_number":62,"context_line":"        if credentials[\u0027signature\u0027]:"},{"line_number":63,"context_line":"            if utils.auth_str_equal(credentials[\u0027signature\u0027], signature):"},{"line_number":64,"context_line":"                return True"},{"line_number":65,"context_line":"            # NOTE(vish): Some client libraries don\u0027t use the port when signing"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_a7ac3aee","line":62,"updated":"2015-04-01 23:48:38.000000000","message":"this should be using credentials.get(\u0027signature\u0027) if there might be no signature as the comment says.","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"90d15ae1b5b22f4c52b84450c4bb3308ffd269a2","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        signature \u003d signer.generate(credentials)"},{"line_number":60,"context_line":"        # NOTE(davechen): credentials[\u0027signature\u0027] is not guaranteed to"},{"line_number":61,"context_line":"        # be existed, we need check it explicitly."},{"line_number":62,"context_line":"        if credentials[\u0027signature\u0027]:"},{"line_number":63,"context_line":"            if utils.auth_str_equal(credentials[\u0027signature\u0027], signature):"},{"line_number":64,"context_line":"                return True"},{"line_number":65,"context_line":"            # NOTE(vish): Some client libraries don\u0027t use the port when signing"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_c823ca04","line":62,"in_reply_to":"baa041b7_a7ac3aee","updated":"2015-04-02 05:32:24.000000000","message":"Done","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"ea63e00f0b2f72db403092803413f76be484b9fd","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                # other library of programming language, JAVA for example."},{"line_number":73,"context_line":"                signer \u003d ec2_utils.Ec2Signer(creds_ref[\u0027secret\u0027])"},{"line_number":74,"context_line":"                signature \u003d signer.generate(credentials)"},{"line_number":75,"context_line":"                if not utils.auth_str_equal(credentials[\u0027signature\u0027],"},{"line_number":76,"context_line":"                                            signature):"},{"line_number":77,"context_line":"                    raise exception.Unauthorized("},{"line_number":78,"context_line":"                        message\u003d\u0027Invalid EC2 signature.\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_87e7f63f","line":75,"updated":"2015-04-01 23:48:38.000000000","message":"suggest use a positive check here rather than a negative one like everywhere else in this function.","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"90d15ae1b5b22f4c52b84450c4bb3308ffd269a2","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                # other library of programming language, JAVA for example."},{"line_number":73,"context_line":"                signer \u003d ec2_utils.Ec2Signer(creds_ref[\u0027secret\u0027])"},{"line_number":74,"context_line":"                signature \u003d signer.generate(credentials)"},{"line_number":75,"context_line":"                if not utils.auth_str_equal(credentials[\u0027signature\u0027],"},{"line_number":76,"context_line":"                                            signature):"},{"line_number":77,"context_line":"                    raise exception.Unauthorized("},{"line_number":78,"context_line":"                        message\u003d\u0027Invalid EC2 signature.\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_c8d86af2","line":75,"in_reply_to":"baa041b7_87e7f63f","updated":"2015-04-02 05:32:24.000000000","message":"Done","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"ea63e00f0b2f72db403092803413f76be484b9fd","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            else:"},{"line_number":82,"context_line":"                raise exception.Unauthorized("},{"line_number":83,"context_line":"                    message\u003d\u0027EC2 signature not supplied.\u0027)"},{"line_number":84,"context_line":"        # Raise the exception when credentials[\u0027signature\u0027] is None"},{"line_number":85,"context_line":"        else:"},{"line_number":86,"context_line":"            raise exception.Unauthorized(message\u003d\u0027EC2 signature not supplied.\u0027)"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_e7cec2b3","line":84,"updated":"2015-04-01 23:48:38.000000000","message":"the exception will also be raised if credentials[\u0027signature\u0027] is an empty string. Is this intentional?","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"14cfdc398fc93880a99889845822030b41dbd2ec","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            else:"},{"line_number":82,"context_line":"                raise exception.Unauthorized("},{"line_number":83,"context_line":"                    message\u003d\u0027EC2 signature not supplied.\u0027)"},{"line_number":84,"context_line":"        # Raise the exception when credentials[\u0027signature\u0027] is None"},{"line_number":85,"context_line":"        else:"},{"line_number":86,"context_line":"            raise exception.Unauthorized(message\u003d\u0027EC2 signature not supplied.\u0027)"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_72bcab6c","line":84,"in_reply_to":"baa041b7_e7cec2b3","updated":"2015-04-02 03:38:50.000000000","message":"Brant, IMO, this should be intentional, it not make sense that the signature is empty string, but the comment here may need to be updated.","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"455ddc5fd06973f26be8b5a203406da66452d0cf","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                credentials[\u0027host\u0027] \u003d hostname"},{"line_number":70,"context_line":"                # NOTE(davechen): we need reinitialize \u0027signer\u0027 to avoid"},{"line_number":71,"context_line":"                # contaminated status of signature, this is similar with"},{"line_number":72,"context_line":"                # other library of programming language, JAVA for example."},{"line_number":73,"context_line":"                signer \u003d ec2_utils.Ec2Signer(creds_ref[\u0027secret\u0027])"},{"line_number":74,"context_line":"                signature \u003d signer.generate(credentials)"},{"line_number":75,"context_line":"                if utils.auth_str_equal(credentials[\u0027signature\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa041b7_d617e0eb","line":72,"updated":"2015-04-02 10:24:17.000000000","message":"(nit): maybe better to say: \"other programming language libraries, JAVA for example.\"","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"9b77bc42b0b040537a19f927fbb88ed55e592092","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                credentials[\u0027host\u0027] \u003d hostname"},{"line_number":70,"context_line":"                # NOTE(davechen): we need reinitialize \u0027signer\u0027 to avoid"},{"line_number":71,"context_line":"                # contaminated status of signature, this is similar with"},{"line_number":72,"context_line":"                # other library of programming language, JAVA for example."},{"line_number":73,"context_line":"                signer \u003d ec2_utils.Ec2Signer(creds_ref[\u0027secret\u0027])"},{"line_number":74,"context_line":"                signature \u003d signer.generate(credentials)"},{"line_number":75,"context_line":"                if utils.auth_str_equal(credentials[\u0027signature\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa041b7_2ee6adb4","line":72,"in_reply_to":"baa041b7_d617e0eb","updated":"2015-04-02 14:54:53.000000000","message":"Done","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"99e4c63ecc42c3561c0bf8625640275f3cf5a44b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    def check_signature(self, creds_ref, credentials):"},{"line_number":58,"context_line":"        signer \u003d ec2_utils.Ec2Signer(creds_ref[\u0027secret\u0027])"},{"line_number":59,"context_line":"        signature \u003d signer.generate(credentials)"},{"line_number":60,"context_line":"        # NOTE(davechen): credentials.get(\u0027signature\u0027) is not guaranteed to"},{"line_number":61,"context_line":"        # exist, we need check it explicitly."},{"line_number":62,"context_line":"        if credentials.get(\u0027signature\u0027):"},{"line_number":63,"context_line":"            if utils.auth_str_equal(credentials[\u0027signature\u0027], signature):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa041b7_07e858b3","line":60,"updated":"2015-04-03 01:19:42.000000000","message":"use of .get() indicates that the field or value might not be there. No need for this note.","commit_id":"7ace25e25fafef7809789dc3b799c1943a45301d"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"99e4c63ecc42c3561c0bf8625640275f3cf5a44b","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            else:"},{"line_number":81,"context_line":"                raise exception.Unauthorized("},{"line_number":82,"context_line":"                    message\u003d\u0027EC2 signature not supplied.\u0027)"},{"line_number":83,"context_line":"        # Raise the exception when credentials.get(\u0027signature\u0027) is None"},{"line_number":84,"context_line":"        else:"},{"line_number":85,"context_line":"            raise exception.Unauthorized(message\u003d\u0027EC2 signature not supplied.\u0027)"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baa041b7_a7cd2c5f","line":83,"updated":"2015-04-03 01:19:42.000000000","message":"remove \"the\". This comment can be removed since this is obvious from the code so it adds nothing.","commit_id":"7ace25e25fafef7809789dc3b799c1943a45301d"}],"keystone/tests/test_contrib_ec2.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"3b121c9c1fe73e927eeb16607374fcff121997d7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_f1908a98","line":1,"updated":"2015-02-13 17:48:07.000000000","message":"Do you work for the foundation? If you do you have the wrong year.","commit_id":"bca46a5185a8bfbc7933314e8efd164e93cacd4a"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"f9c5963502b9916ea4de680a072fbc0f43e06e62","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_3ac82956","line":1,"in_reply_to":"da86d52c_f1908a98","updated":"2015-02-14 03:59:13.000000000","message":"Done","commit_id":"bca46a5185a8bfbc7933314e8efd164e93cacd4a"}],"keystone/tests/unit/test_contrib_ec2.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"ea63e00f0b2f72db403092803413f76be484b9fd","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    # TODO(davechen): more testcase for ec2 credential is expected here and"},{"line_number":28,"context_line":"    # the file name would be renamed to \"test_credential\" to correspond with"},{"line_number":29,"context_line":"    # \"test_v3_credential.py\". testcase set up here is only used for"},{"line_number":30,"context_line":"    # verification against bug #1289115."},{"line_number":31,"context_line":"    def setUp(self):"},{"line_number":32,"context_line":"        super(TestCredentialEc2, self).setUp()"},{"line_number":33,"context_line":"        self.useFixture(database.Database())"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_27638ab3","line":30,"updated":"2015-04-01 23:48:38.000000000","message":"remove the bug reference it\u0027s already in the git history.","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"90d15ae1b5b22f4c52b84450c4bb3308ffd269a2","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    # TODO(davechen): more testcase for ec2 credential is expected here and"},{"line_number":28,"context_line":"    # the file name would be renamed to \"test_credential\" to correspond with"},{"line_number":29,"context_line":"    # \"test_v3_credential.py\". testcase set up here is only used for"},{"line_number":30,"context_line":"    # verification against bug #1289115."},{"line_number":31,"context_line":"    def setUp(self):"},{"line_number":32,"context_line":"        super(TestCredentialEc2, self).setUp()"},{"line_number":33,"context_line":"        self.useFixture(database.Database())"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_283b56ed","line":30,"in_reply_to":"baa041b7_27638ab3","updated":"2015-04-02 05:32:24.000000000","message":"Done","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"ea63e00f0b2f72db403092803413f76be484b9fd","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        self.load_fixtures(default_fixtures)"},{"line_number":36,"context_line":"        self.user_id \u003d self.user_foo[\u0027id\u0027]"},{"line_number":37,"context_line":"        self.project_id \u003d self.tenant_bar[\u0027id\u0027]"},{"line_number":38,"context_line":"        self.blob \u003d {\"access\": uuid.uuid4().hex,"},{"line_number":39,"context_line":"                     \"secret\": uuid.uuid4().hex}"},{"line_number":40,"context_line":"        self.controller \u003d controllers.Ec2Controller()"},{"line_number":41,"context_line":"        self.creds_ref \u003d {\u0027user_id\u0027: self.user_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_0741a60b","line":38,"updated":"2015-04-01 23:48:38.000000000","message":"use \u0027 for strings consistently.","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"90d15ae1b5b22f4c52b84450c4bb3308ffd269a2","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        self.load_fixtures(default_fixtures)"},{"line_number":36,"context_line":"        self.user_id \u003d self.user_foo[\u0027id\u0027]"},{"line_number":37,"context_line":"        self.project_id \u003d self.tenant_bar[\u0027id\u0027]"},{"line_number":38,"context_line":"        self.blob \u003d {\"access\": uuid.uuid4().hex,"},{"line_number":39,"context_line":"                     \"secret\": uuid.uuid4().hex}"},{"line_number":40,"context_line":"        self.controller \u003d controllers.Ec2Controller()"},{"line_number":41,"context_line":"        self.creds_ref \u003d {\u0027user_id\u0027: self.user_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_c822aab9","line":38,"in_reply_to":"baa041b7_0741a60b","updated":"2015-04-02 05:32:24.000000000","message":"Done","commit_id":"56383900874a9828cfbaf6e244b7128b2bb58a9b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"455ddc5fd06973f26be8b5a203406da66452d0cf","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class TestCredentialEc2(tests.TestCase):"},{"line_number":27,"context_line":"    # TODO(davechen): more testcase for ec2 credential is expected here and"},{"line_number":28,"context_line":"    # the file name would be renamed to \"test_credential\" to correspond with"},{"line_number":29,"context_line":"    # \"test_v3_credential.py\"."},{"line_number":30,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa041b7_56b070f4","line":27,"updated":"2015-04-02 10:24:17.000000000","message":"(nit) s/is/are/","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"9b77bc42b0b040537a19f927fbb88ed55e592092","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class TestCredentialEc2(tests.TestCase):"},{"line_number":27,"context_line":"    # TODO(davechen): more testcase for ec2 credential is expected here and"},{"line_number":28,"context_line":"    # the file name would be renamed to \"test_credential\" to correspond with"},{"line_number":29,"context_line":"    # \"test_v3_credential.py\"."},{"line_number":30,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa041b7_aee87d7d","line":27,"in_reply_to":"baa041b7_56b070f4","updated":"2015-04-02 14:54:53.000000000","message":"Done","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"455ddc5fd06973f26be8b5a203406da66452d0cf","unresolved":false,"context_lines":[{"line_number":26,"context_line":"class TestCredentialEc2(tests.TestCase):"},{"line_number":27,"context_line":"    # TODO(davechen): more testcase for ec2 credential is expected here and"},{"line_number":28,"context_line":"    # the file name would be renamed to \"test_credential\" to correspond with"},{"line_number":29,"context_line":"    # \"test_v3_credential.py\"."},{"line_number":30,"context_line":"    def setUp(self):"},{"line_number":31,"context_line":"        super(TestCredentialEc2, self).setUp()"},{"line_number":32,"context_line":"        self.useFixture(database.Database())"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa041b7_b688dc23","line":29,"updated":"2015-04-02 10:24:17.000000000","message":"are you planning the other test cases in this patch or a follow on patch (either is fine, just checking)","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"9bbb332fe82fb2085913abb0285dd6e7b01e081d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"class TestCredentialEc2(tests.TestCase):"},{"line_number":27,"context_line":"    # TODO(davechen): more testcase for ec2 credential is expected here and"},{"line_number":28,"context_line":"    # the file name would be renamed to \"test_credential\" to correspond with"},{"line_number":29,"context_line":"    # \"test_v3_credential.py\"."},{"line_number":30,"context_line":"    def setUp(self):"},{"line_number":31,"context_line":"        super(TestCredentialEc2, self).setUp()"},{"line_number":32,"context_line":"        self.useFixture(database.Database())"}],"source_content_type":"text/x-python","patch_set":10,"id":"baa041b7_92b6fdda","line":29,"in_reply_to":"baa041b7_b688dc23","updated":"2015-04-02 13:39:05.000000000","message":"Yep, there will be more testcase on EC2 credentail but not in this patch since it\u0027s not relevant the topic, thanks.","commit_id":"14261ca9b39b0bbb55cf48bcfb92463111ddd8de"}]}
