)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"a522acf7d2564dadb5905a107f79de7476178903","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If using uppercase hostname for WebSSO trusted_dashboard, the"},{"line_number":10,"context_line":"authentication fails because the origin query URL comes as"},{"line_number":11,"context_line":"lowercase and the comparison between the two is case-sensitive."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1538754"},{"line_number":14,"context_line":"Change-Id: I807a567e7d93c09c5c370065509c106b7d1c973b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7a5de9d1_c796d8ef","line":11,"updated":"2016-01-28 22:44:14.000000000","message":"This is slightly confusing. Is this closer to what you are trying to say?\n\n\"Ensure the hostname in the trusted_dashboard config is lowercase to prevent failures when comparing against the origin query URL.\"","commit_id":"9355ba2f51cdb568ddb530499eb7d142b9b37d1e"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"29f7990f9032545663c23a07334a4257acd31625","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If using uppercase hostname for WebSSO trusted_dashboard, the"},{"line_number":10,"context_line":"authentication fails because the origin query URL comes as"},{"line_number":11,"context_line":"lowercase and the comparison between the two is case-sensitive."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1538754"},{"line_number":14,"context_line":"Change-Id: I807a567e7d93c09c5c370065509c106b7d1c973b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7a5de9d1_0a9b6d73","line":11,"in_reply_to":"7a5de9d1_c796d8ef","updated":"2016-01-29 16:42:58.000000000","message":"Done","commit_id":"9355ba2f51cdb568ddb530499eb7d142b9b37d1e"}],"keystone/common/utils.py":[{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"cb68122cc6de729d4f08877762ef458445fa16bb","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"def lower_case_hostname(url):"},{"line_number":565,"context_line":"    parsed_host \u003d moves.urllib.parse.urlparse(url)"},{"line_number":566,"context_line":"    replaced \u003d parsed_host._replace(netloc\u003dparsed_host.netloc.lower())"},{"line_number":567,"context_line":"    return moves.urllib.parse.urlunparse(replaced)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_72decc40","line":566,"updated":"2016-01-28 20:08:09.000000000","message":"Using a leading underscore method from a library is frowned on. This means \"private\" and could disappear. I know it makes the code smaller but you might be stuck with parse -\u003e list -\u003e edit \u003e unparse. Or you could do: (a,b,c,...) \u003d urllib.parse.urlparse() and then pass all of them to unparse().","commit_id":"4832a4520d44a60ef06d5237d620ba34553f0fd0"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"f368796e85889b9fa633fa462dbf4d3fb918debb","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"def lower_case_hostname(url):"},{"line_number":565,"context_line":"    parsed_host \u003d moves.urllib.parse.urlparse(url)"},{"line_number":566,"context_line":"    replaced \u003d parsed_host._replace(netloc\u003dparsed_host.netloc.lower())"},{"line_number":567,"context_line":"    return moves.urllib.parse.urlunparse(replaced)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_06af1682","line":566,"in_reply_to":"7a5de9d1_72decc40","updated":"2016-01-28 21:40:11.000000000","message":"After further investigation we discovered using _replace function should be good as the underscore is intended to avoid conflicts with named tuple key \u0027replace\u0027","commit_id":"4832a4520d44a60ef06d5237d620ba34553f0fd0"},{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"a522acf7d2564dadb5905a107f79de7476178903","unresolved":false,"context_lines":[{"line_number":561,"context_line":"    return reserved_chars"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"def lower_case_hostname(url):"},{"line_number":565,"context_line":"    parsed_host \u003d moves.urllib.parse.urlparse(url)"},{"line_number":566,"context_line":"    replaced \u003d parsed_host._replace(netloc\u003dparsed_host.netloc.lower())"},{"line_number":567,"context_line":"    return moves.urllib.parse.urlunparse(replaced)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_a70ddc38","line":564,"updated":"2016-01-28 22:44:14.000000000","message":"Where is the function\u0027s docstring?","commit_id":"9355ba2f51cdb568ddb530499eb7d142b9b37d1e"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"29f7990f9032545663c23a07334a4257acd31625","unresolved":false,"context_lines":[{"line_number":561,"context_line":"    return reserved_chars"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":""},{"line_number":564,"context_line":"def lower_case_hostname(url):"},{"line_number":565,"context_line":"    parsed_host \u003d moves.urllib.parse.urlparse(url)"},{"line_number":566,"context_line":"    replaced \u003d parsed_host._replace(netloc\u003dparsed_host.netloc.lower())"},{"line_number":567,"context_line":"    return moves.urllib.parse.urlunparse(replaced)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_c7678e4b","line":564,"in_reply_to":"7a5de9d1_a70ddc38","updated":"2016-01-29 16:42:58.000000000","message":"Done","commit_id":"9355ba2f51cdb568ddb530499eb7d142b9b37d1e"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"74910f30f2671394de78160c1f75e12c690bdcf6","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"def lower_case_hostname(url):"},{"line_number":565,"context_line":"    \"\"\"Change the URL\u0027s hostname to lowercase\"\"\""},{"line_number":566,"context_line":"    parsed_host \u003d moves.urllib.parse.urlparse(url)"},{"line_number":567,"context_line":"    replaced \u003d parsed_host._replace(netloc\u003dparsed_host.netloc.lower())"},{"line_number":568,"context_line":"    return moves.urllib.parse.urlunparse(replaced)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_8e25bf5d","line":566,"range":{"start_line":566,"start_character":4,"end_line":566,"end_character":15},"updated":"2016-02-03 00:56:06.000000000","message":"parsed_host doesn\u0027t sound right. How about just \u0027parsed\u0027?","commit_id":"0d6c7c00a7c6a4f60bfe3e87e202cb97791d4abd"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"ab8de1ad56d7f3b6554d6c3cdf5e03420fac550b","unresolved":false,"context_lines":[{"line_number":563,"context_line":""},{"line_number":564,"context_line":"def lower_case_hostname(url):"},{"line_number":565,"context_line":"    \"\"\"Change the URL\u0027s hostname to lowercase\"\"\""},{"line_number":566,"context_line":"    parsed_host \u003d moves.urllib.parse.urlparse(url)"},{"line_number":567,"context_line":"    replaced \u003d parsed_host._replace(netloc\u003dparsed_host.netloc.lower())"},{"line_number":568,"context_line":"    return moves.urllib.parse.urlunparse(replaced)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_b92a472b","line":566,"range":{"start_line":566,"start_character":4,"end_line":566,"end_character":15},"in_reply_to":"5a5ae5dd_8e25bf5d","updated":"2016-02-03 01:25:05.000000000","message":"Done","commit_id":"0d6c7c00a7c6a4f60bfe3e87e202cb97791d4abd"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"74910f30f2671394de78160c1f75e12c690bdcf6","unresolved":false,"context_lines":[{"line_number":564,"context_line":"def lower_case_hostname(url):"},{"line_number":565,"context_line":"    \"\"\"Change the URL\u0027s hostname to lowercase\"\"\""},{"line_number":566,"context_line":"    parsed_host \u003d moves.urllib.parse.urlparse(url)"},{"line_number":567,"context_line":"    replaced \u003d parsed_host._replace(netloc\u003dparsed_host.netloc.lower())"},{"line_number":568,"context_line":"    return moves.urllib.parse.urlunparse(replaced)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_aeb8bbe6","line":567,"range":{"start_line":567,"start_character":27,"end_line":567,"end_character":35},"updated":"2016-02-03 00:56:06.000000000","message":"should not be calling a private method. How about this?\n\no \u003d moves.urllib.parse.urlparse(url)\nnetloc \u003d o.netloc.lower()\nreturn moves.urllib.parse.urlunparse(\n    (o.scheme, netloc, o.path, o.params, o.query, o.fragment))","commit_id":"0d6c7c00a7c6a4f60bfe3e87e202cb97791d4abd"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"ab8de1ad56d7f3b6554d6c3cdf5e03420fac550b","unresolved":false,"context_lines":[{"line_number":564,"context_line":"def lower_case_hostname(url):"},{"line_number":565,"context_line":"    \"\"\"Change the URL\u0027s hostname to lowercase\"\"\""},{"line_number":566,"context_line":"    parsed_host \u003d moves.urllib.parse.urlparse(url)"},{"line_number":567,"context_line":"    replaced \u003d parsed_host._replace(netloc\u003dparsed_host.netloc.lower())"},{"line_number":568,"context_line":"    return moves.urllib.parse.urlunparse(replaced)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_5920f349","line":567,"range":{"start_line":567,"start_character":27,"end_line":567,"end_character":35},"in_reply_to":"5a5ae5dd_4ef8277d","updated":"2016-02-03 01:25:05.000000000","message":"Done","commit_id":"0d6c7c00a7c6a4f60bfe3e87e202cb97791d4abd"},{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"564fff4ad64356738b41c7c126186b90ab16cf74","unresolved":false,"context_lines":[{"line_number":564,"context_line":"def lower_case_hostname(url):"},{"line_number":565,"context_line":"    \"\"\"Change the URL\u0027s hostname to lowercase\"\"\""},{"line_number":566,"context_line":"    parsed_host \u003d moves.urllib.parse.urlparse(url)"},{"line_number":567,"context_line":"    replaced \u003d parsed_host._replace(netloc\u003dparsed_host.netloc.lower())"},{"line_number":568,"context_line":"    return moves.urllib.parse.urlunparse(replaced)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_4ef8277d","line":567,"range":{"start_line":567,"start_character":27,"end_line":567,"end_character":35},"in_reply_to":"5a5ae5dd_aeb8bbe6","updated":"2016-02-03 01:03:29.000000000","message":"Actually, parsed_host is a NamedTuple. The method _replace() is actually public and defined in the documentation. A comment would be a good idea.","commit_id":"0d6c7c00a7c6a4f60bfe3e87e202cb97791d4abd"}],"keystone/federation/controllers.py":[{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"cb68122cc6de729d4f08877762ef458445fa16bb","unresolved":false,"context_lines":[{"line_number":271,"context_line":"            raise exception.ValidationError(msg)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        # convert hostnames to lowercase for comparison of the URLs"},{"line_number":274,"context_line":"        host \u003d k_utils.lower_case_hostname(host)"},{"line_number":275,"context_line":"        trusted_dashboards \u003d [k_utils.lower_case_hostname(trusted)"},{"line_number":276,"context_line":"                              for trusted in CONF.federation.trusted_dashboard]"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_5292b058","line":274,"updated":"2016-01-28 20:08:09.000000000","message":"does this need to be touched? Is this not always lower case from the network stack?","commit_id":"4832a4520d44a60ef06d5237d620ba34553f0fd0"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"f368796e85889b9fa633fa462dbf4d3fb918debb","unresolved":false,"context_lines":[{"line_number":271,"context_line":"            raise exception.ValidationError(msg)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        # convert hostnames to lowercase for comparison of the URLs"},{"line_number":274,"context_line":"        host \u003d k_utils.lower_case_hostname(host)"},{"line_number":275,"context_line":"        trusted_dashboards \u003d [k_utils.lower_case_hostname(trusted)"},{"line_number":276,"context_line":"                              for trusted in CONF.federation.trusted_dashboard]"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_66c12a80","line":274,"in_reply_to":"7a5de9d1_5292b058","updated":"2016-01-28 21:40:11.000000000","message":"True. Removed that.","commit_id":"4832a4520d44a60ef06d5237d620ba34553f0fd0"},{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"cb68122cc6de729d4f08877762ef458445fa16bb","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        # convert hostnames to lowercase for comparison of the URLs"},{"line_number":274,"context_line":"        host \u003d k_utils.lower_case_hostname(host)"},{"line_number":275,"context_line":"        trusted_dashboards \u003d [k_utils.lower_case_hostname(trusted)"},{"line_number":276,"context_line":"                              for trusted in CONF.federation.trusted_dashboard]"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        if host not in trusted_dashboards:"},{"line_number":279,"context_line":"            msg \u003d _(\u0027%(host)s is not a trusted dashboard host\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_1273d84e","line":276,"updated":"2016-01-28 20:08:09.000000000","message":"Is there no way to fix this when the CONF is loaded? This avoids needing to munge the same records for every single request. Not a big deal, but might help if the problem occurs elsewhere in the code.","commit_id":"4832a4520d44a60ef06d5237d620ba34553f0fd0"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"f368796e85889b9fa633fa462dbf4d3fb918debb","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        # convert hostnames to lowercase for comparison of the URLs"},{"line_number":274,"context_line":"        host \u003d k_utils.lower_case_hostname(host)"},{"line_number":275,"context_line":"        trusted_dashboards \u003d [k_utils.lower_case_hostname(trusted)"},{"line_number":276,"context_line":"                              for trusted in CONF.federation.trusted_dashboard]"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        if host not in trusted_dashboards:"},{"line_number":279,"context_line":"            msg \u003d _(\u0027%(host)s is not a trusted dashboard host\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_061cf610","line":276,"in_reply_to":"7a5de9d1_1273d84e","updated":"2016-01-28 21:40:11.000000000","message":"I\u0027m not sure there\u0027s a straight-forward way to do that actually.","commit_id":"4832a4520d44a60ef06d5237d620ba34553f0fd0"}],"keystone/tests/unit/test_v3_federation.py":[{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"cb68122cc6de729d4f08877762ef458445fa16bb","unresolved":false,"context_lines":[{"line_number":3349,"context_line":"        resp \u003d self.api.federated_sso_auth(context, self.PROTOCOL)"},{"line_number":3350,"context_line":"        self.assertIn(self.TRUSTED_DASHBOARD, resp.body)"},{"line_number":3351,"context_line":""},{"line_number":3352,"context_line":"    def test_federated_sso_auth_case_sensitivity(self):"},{"line_number":3353,"context_line":"        environment \u003d {self.REMOTE_ID_ATTR: self.REMOTE_IDS[0]}"},{"line_number":3354,"context_line":"        context \u003d {\u0027environment\u0027: environment}"},{"line_number":3355,"context_line":"        upper_case_origin \u003d urllib.parse.quote_plus(\u0027http://HORIZON.com\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_b205247b","line":3352,"updated":"2016-01-28 20:08:09.000000000","message":"Isn\u0027t this test at the wrong level? Shouldn\u0027t you be directly testing ``_get_sso_origin_host()``?","commit_id":"4832a4520d44a60ef06d5237d620ba34553f0fd0"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"f368796e85889b9fa633fa462dbf4d3fb918debb","unresolved":false,"context_lines":[{"line_number":3349,"context_line":"        resp \u003d self.api.federated_sso_auth(context, self.PROTOCOL)"},{"line_number":3350,"context_line":"        self.assertIn(self.TRUSTED_DASHBOARD, resp.body)"},{"line_number":3351,"context_line":""},{"line_number":3352,"context_line":"    def test_federated_sso_auth_case_sensitivity(self):"},{"line_number":3353,"context_line":"        environment \u003d {self.REMOTE_ID_ATTR: self.REMOTE_IDS[0]}"},{"line_number":3354,"context_line":"        context \u003d {\u0027environment\u0027: environment}"},{"line_number":3355,"context_line":"        upper_case_origin \u003d urllib.parse.quote_plus(\u0027http://HORIZON.com\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_c689fe27","line":3352,"in_reply_to":"7a5de9d1_b205247b","updated":"2016-01-28 21:40:11.000000000","message":"Done","commit_id":"4832a4520d44a60ef06d5237d620ba34553f0fd0"},{"author":{"_account_id":17026,"name":"Sean Perry","email":"sean.perry@hpe.com","username":"sean_perry"},"change_message_id":"a522acf7d2564dadb5905a107f79de7476178903","unresolved":false,"context_lines":[{"line_number":3349,"context_line":"        resp \u003d self.api.federated_sso_auth(context, self.PROTOCOL)"},{"line_number":3350,"context_line":"        self.assertIn(self.TRUSTED_DASHBOARD, resp.body)"},{"line_number":3351,"context_line":""},{"line_number":3352,"context_line":"    def test_get_sso_origin_host_case_insensitive(self):"},{"line_number":3353,"context_line":"        # test lowercase hostname in trusted_dashboard"},{"line_number":3354,"context_line":"        environment \u003d {self.REMOTE_ID_ATTR: self.REMOTE_IDS[0]}"},{"line_number":3355,"context_line":"        context \u003d {\u0027environment\u0027: environment}"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_47974848","line":3352,"updated":"2016-01-28 22:44:14.000000000","message":"This code can be simpler still.\n\n    context \u003d {\n        \u0027query_string\u0027: {\n            \u0027origin\u0027: \"http://HORIZON.com\",\n        },\n    }\n    host \u003d self.api._get_sso_origin_host(context)\n    self.assertEqual(\"http://horizon.com\", host)\n\nThen duplicate this with a lower case string too.","commit_id":"9355ba2f51cdb568ddb530499eb7d142b9b37d1e"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"29f7990f9032545663c23a07334a4257acd31625","unresolved":false,"context_lines":[{"line_number":3349,"context_line":"        resp \u003d self.api.federated_sso_auth(context, self.PROTOCOL)"},{"line_number":3350,"context_line":"        self.assertIn(self.TRUSTED_DASHBOARD, resp.body)"},{"line_number":3351,"context_line":""},{"line_number":3352,"context_line":"    def test_get_sso_origin_host_case_insensitive(self):"},{"line_number":3353,"context_line":"        # test lowercase hostname in trusted_dashboard"},{"line_number":3354,"context_line":"        environment \u003d {self.REMOTE_ID_ATTR: self.REMOTE_IDS[0]}"},{"line_number":3355,"context_line":"        context \u003d {\u0027environment\u0027: environment}"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_ea8e1178","line":3352,"in_reply_to":"7a5de9d1_47974848","updated":"2016-01-29 16:42:58.000000000","message":"Done","commit_id":"9355ba2f51cdb568ddb530499eb7d142b9b37d1e"}]}
