)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a658aede376db72035c418eb6e75b1d607acd2d9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"bae84128_22568ed2","line":20,"updated":"2016-02-19 23:21:53.000000000","message":"Might be nice to add a couple Co-Authored-By: lines.\n\nIt\u0027d probably be good to ask the author on https://review.openstack.org/#/c/259273/ what name/email to use, if that isn\u0027t his account.","commit_id":"85552915308b6795171e72b35618a86d35038a7f"},{"author":{"_account_id":9216,"name":"Joel Wright","email":"joel.wright@gmail.com","username":"jjw-sohonet"},"change_message_id":"0132031a02e8140cb495d2e89716364d577efd70","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"bae84128_2d8dd631","line":20,"in_reply_to":"bae84128_22568ed2","updated":"2016-02-19 23:29:01.000000000","message":"Good point - I\u0027ll do that. I have pointed both previous reviews to this one, and they certainly both need to be acknowledged as authors.","commit_id":"85552915308b6795171e72b35618a86d35038a7f"}],"swiftclient/client.py":[{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"35035ae763a45844281616e5ca03e928cee9c52f","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    \u0027reveal_sensitive_prefix\u0027: 16"},{"line_number":76,"context_line":"}"},{"line_number":77,"context_line":"LOGGER_SENSITIVE_HEADERS \u003d ["},{"line_number":78,"context_line":"    \u0027x-auth-token\u0027, \u0027x-service-token\u0027, \u0027x-auth-key\u0027, \u0027set-cookie\u0027"},{"line_number":79,"context_line":"]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_376883f5","line":78,"updated":"2016-02-19 22:43:39.000000000","message":"needs x-storage-token, too\n\nperhaps authorization, too","commit_id":"85552915308b6795171e72b35618a86d35038a7f"},{"author":{"_account_id":9216,"name":"Joel Wright","email":"joel.wright@gmail.com","username":"jjw-sohonet"},"change_message_id":"0132031a02e8140cb495d2e89716364d577efd70","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    \u0027reveal_sensitive_prefix\u0027: 16"},{"line_number":76,"context_line":"}"},{"line_number":77,"context_line":"LOGGER_SENSITIVE_HEADERS \u003d ["},{"line_number":78,"context_line":"    \u0027x-auth-token\u0027, \u0027x-service-token\u0027, \u0027x-auth-key\u0027, \u0027set-cookie\u0027"},{"line_number":79,"context_line":"]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_4dbadae2","line":78,"in_reply_to":"bae84128_376883f5","updated":"2016-02-19 23:29:01.000000000","message":"I\u0027ll add x-storage-token and any more that I/others can think of.","commit_id":"85552915308b6795171e72b35618a86d35038a7f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a658aede376db72035c418eb6e75b1d607acd2d9","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    \u0027reveal_sensitive_prefix\u0027: 16"},{"line_number":76,"context_line":"}"},{"line_number":77,"context_line":"LOGGER_SENSITIVE_HEADERS \u003d ["},{"line_number":78,"context_line":"    \u0027x-auth-token\u0027, \u0027x-service-token\u0027, \u0027x-auth-key\u0027, \u0027set-cookie\u0027"},{"line_number":79,"context_line":"]"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_326371b3","line":78,"in_reply_to":"bae84128_376883f5","updated":"2016-02-19 23:21:53.000000000","message":"Seconding the need for x-storage-token.\n\nI thought of authorization because of something I saw in channel recently[1], but the more I think about it, it doesn\u0027t matter. The only *request* headers we should need to scrub are x-auth-key, x-auth-token, and x-service-token, as those are the only ones swiftclient will actually generate.\n\n[1] https://github.com/CloudVPS/swift-basicauth/blob/master/swift_basicauth/middleware.py#L54","commit_id":"85552915308b6795171e72b35618a86d35038a7f"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"35035ae763a45844281616e5ca03e928cee9c52f","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    :param value: Header value"},{"line_number":89,"context_line":"    :return: Safe (header, value) pair"},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    prefix_length \u003d logger_settings.get(\u0027reveal_sensitive_prefix\u0027, 16)"},{"line_number":92,"context_line":"    if name.lower() in LOGGER_SENSITIVE_HEADERS:"},{"line_number":93,"context_line":"        if value and len(value) \u003e prefix_length:"},{"line_number":94,"context_line":"            return name, value[0:prefix_length] + \u0027...\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_d70cb744","line":91,"updated":"2016-02-19 22:43:39.000000000","message":"what\u0027s supposed to happen if this value is negative?","commit_id":"85552915308b6795171e72b35618a86d35038a7f"},{"author":{"_account_id":9216,"name":"Joel Wright","email":"joel.wright@gmail.com","username":"jjw-sohonet"},"change_message_id":"0132031a02e8140cb495d2e89716364d577efd70","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    :param value: Header value"},{"line_number":89,"context_line":"    :return: Safe (header, value) pair"},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    prefix_length \u003d logger_settings.get(\u0027reveal_sensitive_prefix\u0027, 16)"},{"line_number":92,"context_line":"    if name.lower() in LOGGER_SENSITIVE_HEADERS:"},{"line_number":93,"context_line":"        if value and len(value) \u003e prefix_length:"},{"line_number":94,"context_line":"            return name, value[0:prefix_length] + \u0027...\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_0d0452be","line":91,"in_reply_to":"bae84128_d70cb744","updated":"2016-02-19 23:29:01.000000000","message":"Good point, I had wondered if an on/off setting and a number of characters to remove from the end of the token would be better. If nothing else I\u0027ll document exactly what this setting should do and how it will behave.","commit_id":"85552915308b6795171e72b35618a86d35038a7f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a658aede376db72035c418eb6e75b1d607acd2d9","unresolved":false,"context_lines":[{"line_number":426,"context_line":"    conn.request(method, parsed.path, \u0027\u0027, headers)"},{"line_number":427,"context_line":"    resp \u003d conn.getresponse()"},{"line_number":428,"context_line":"    body \u003d resp.read()"},{"line_number":429,"context_line":"    http_log((url, method,), headers, resp, body)"},{"line_number":430,"context_line":"    url \u003d resp.getheader(\u0027x-storage-url\u0027)"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    # There is a side-effect on current Rackspace 1.0 server where a"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_d2e7a510","line":429,"range":{"start_line":429,"start_character":29,"end_line":429,"end_character":36},"updated":"2016-02-19 23:21:53.000000000","message":"Nice.","commit_id":"85552915308b6795171e72b35618a86d35038a7f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a4734876899afdbf166473dd541de9a7dbb9fb87","unresolved":false,"context_lines":[{"line_number":75,"context_line":"Default behaviour is to redact tokens, removing 16 chars. To disable, set the"},{"line_number":76,"context_line":"value of \u0027redact_sensitive_suffix\u0027 to 0. Negative values will be ignored and"},{"line_number":77,"context_line":"the default value used instead."},{"line_number":78,"context_line":"\"\"\""},{"line_number":79,"context_line":"logger_settings \u003d {"},{"line_number":80,"context_line":"    \u0027redact_sensitive_suffix\u0027: 16"},{"line_number":81,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":4,"id":"bae84128_a17d5cb3","line":78,"updated":"2016-02-20 21:39:52.000000000","message":"IIRC, the autodocs should respond well to something like\n\n #: Default behaviour is to redact tokens, removing 16 chars. To disable, set the\n #: value of \u0027redact_sensitive_suffix\u0027 to 0. Negative values will be ignored and\n #: the default value used instead.\n\nSee, for example, https://github.com/openstack/swift/blob/master/swift/common/middleware/gatekeeper.py#L39-L49 and http://docs.openstack.org/developer/swift/middleware.html#swift.common.middleware.gatekeeper.inbound_exclusions","commit_id":"ecb59e9b647713d93dbae822c21be0b2d7d3cc82"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a4734876899afdbf166473dd541de9a7dbb9fb87","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            # If the token is shorter and remove_length, all data is removed"},{"line_number":102,"context_line":"            return name, value[0:-remove_length] + \u0027...\u0027"},{"line_number":103,"context_line":"        else:"},{"line_number":104,"context_line":"            return name, \u0027...\u0027"},{"line_number":105,"context_line":"    return name, value"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bae84128_6c0fcb2e","line":104,"updated":"2016-02-20 21:39:52.000000000","message":"Do we actually need the condition? If value is \u0027\u0027, value[0:-remove_length] + \u0027...\u0027 still achieves the same thing, right?","commit_id":"ecb59e9b647713d93dbae822c21be0b2d7d3cc82"},{"author":{"_account_id":9216,"name":"Joel Wright","email":"joel.wright@gmail.com","username":"jjw-sohonet"},"change_message_id":"9af1c5bff3177b1cb50fdaeee329d9e60ee346ea","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            # If the token is shorter and remove_length, all data is removed"},{"line_number":102,"context_line":"            return name, value[0:-remove_length] + \u0027...\u0027"},{"line_number":103,"context_line":"        else:"},{"line_number":104,"context_line":"            return name, \u0027...\u0027"},{"line_number":105,"context_line":"    return name, value"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bae84128_acba7308","line":104,"in_reply_to":"bae84128_6c0fcb2e","updated":"2016-02-20 21:53:13.000000000","message":"Yeah, you\u0027re probably right.","commit_id":"ecb59e9b647713d93dbae822c21be0b2d7d3cc82"}],"tests/unit/test_swiftclient.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a658aede376db72035c418eb6e75b1d607acd2d9","unresolved":false,"context_lines":[{"line_number":2210,"context_line":"            outs \u003d \u0027\u0027"},{"line_number":2211,"context_line":"            for _, args, kwargs in mock_log.mock_calls:"},{"line_number":2212,"context_line":"                for arg in args:"},{"line_number":2213,"context_line":"                    outs \u003d outs + str(arg)"},{"line_number":2214,"context_line":"            self.assertIn(\u0027X-Auth-Token\u0027, outs)"},{"line_number":2215,"context_line":"            self.assertIn(token_value[:16] + \u0027...\u0027, outs)"},{"line_number":2216,"context_line":"            self.assertIn(\u0027Set-Cookie\u0027, outs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_0de8d20f","line":2213,"updated":"2016-02-19 23:21:53.000000000","message":"Maybe better?\n\n output \u003d []\n for _, args, kwargs in mock_log.mock_calls:\n     output.extend(str(arg) for arg in args)\n outs \u003d \u0027\u0027.join(output)\n\nNot that I really expect enough output that quadratic string concatenation would make much difference...","commit_id":"85552915308b6795171e72b35618a86d35038a7f"},{"author":{"_account_id":9216,"name":"Joel Wright","email":"joel.wright@gmail.com","username":"jjw-sohonet"},"change_message_id":"0132031a02e8140cb495d2e89716364d577efd70","unresolved":false,"context_lines":[{"line_number":2210,"context_line":"            outs \u003d \u0027\u0027"},{"line_number":2211,"context_line":"            for _, args, kwargs in mock_log.mock_calls:"},{"line_number":2212,"context_line":"                for arg in args:"},{"line_number":2213,"context_line":"                    outs \u003d outs + str(arg)"},{"line_number":2214,"context_line":"            self.assertIn(\u0027X-Auth-Token\u0027, outs)"},{"line_number":2215,"context_line":"            self.assertIn(token_value[:16] + \u0027...\u0027, outs)"},{"line_number":2216,"context_line":"            self.assertIn(\u0027Set-Cookie\u0027, outs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_8db062df","line":2213,"in_reply_to":"bae84128_0de8d20f","updated":"2016-02-19 23:29:01.000000000","message":"It is better style regardless of performance - I\u0027ll modify this.","commit_id":"85552915308b6795171e72b35618a86d35038a7f"}]}
