)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f429ea6f79179df0758860b25983ffdc8efde0a5","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add schema check for authorize request token"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add the schema check for authorize"},{"line_number":10,"context_line":"request token API. It\u0027ll avoding some 500 error"},{"line_number":11,"context_line":"caused by invalid input format."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-bug: #1736875"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df87a7cf_013f2f87","line":10,"range":{"start_line":10,"start_character":25,"end_line":10,"end_character":32},"updated":"2017-12-07 20:44:16.000000000","message":"avoid*","commit_id":"4eac1b850c3ac619bf3b63f282a38ffd05767983"}],"keystone/oauth1/controllers.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"cd4ec3b0d26dd07c34a625a593218aa8be787425","unresolved":false,"context_lines":[{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        # put the roles in a set for easy comparison"},{"line_number":403,"context_line":"        authed_roles \u003d set()"},{"line_number":404,"context_line":"        for role in roles:"},{"line_number":405,"context_line":"            authed_roles.add(role[\u0027id\u0027])"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        # verify the authorizing user has the roles"},{"line_number":408,"context_line":"        user_token \u003d authorization.get_token_ref(request.context_dict)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_7e5d4d13","line":405,"range":{"start_line":404,"start_character":0,"end_line":405,"end_character":40},"updated":"2017-12-10 11:07:13.000000000","message":"If you just want to return \"400\" here, why not add some protection around those code to return \"400\"?\nThe code here does need to be improved since it is making sense to be \"name\" instead of \"id\".","commit_id":"43352a64ab38571b334321766ed4ad5491a144a5"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"3c6fdd4733c60842441790ad24c5ad69a9c634c4","unresolved":false,"context_lines":[{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        # put the roles in a set for easy comparison"},{"line_number":403,"context_line":"        authed_roles \u003d set()"},{"line_number":404,"context_line":"        for role in roles:"},{"line_number":405,"context_line":"            authed_roles.add(role[\u0027id\u0027])"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        # verify the authorizing user has the roles"},{"line_number":408,"context_line":"        user_token \u003d authorization.get_token_ref(request.context_dict)"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_abb4f080","line":405,"range":{"start_line":404,"start_character":0,"end_line":405,"end_character":40},"in_reply_to":"df87a7cf_7e5d4d13","updated":"2017-12-11 01:34:58.000000000","message":"Yes, it\u0027s easy and simple to just add a check here. But I think schema check is stronger for input check.","commit_id":"43352a64ab38571b334321766ed4ad5491a144a5"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"9d5aeb8d4e14a0f20d8f76b0cdfcbfcd4edc5770","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                roles.add(role[\u0027id\u0027])"},{"line_number":378,"context_line":"            else:"},{"line_number":379,"context_line":"                roles.add("},{"line_number":380,"context_line":"                    PROVIDERS.role_api.get_role_by_name(role[\u0027name\u0027])[\u0027id\u0027])"},{"line_number":381,"context_line":"        return roles"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    @controller.protected()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9f91af0f_4d7545f9","line":380,"updated":"2018-01-09 21:05:33.000000000","message":"This got changed to get_unique_role_by_name http://git.openstack.org/cgit/openstack/keystone/tree/keystone/assignment/core.py#n1254","commit_id":"6c1320a44ff30103940f470a9873fc76ec3b070c"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"0377366ccd44a73543e6868c32eadad3cb8b414b","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                roles.add(role[\u0027id\u0027])"},{"line_number":378,"context_line":"            else:"},{"line_number":379,"context_line":"                roles.add("},{"line_number":380,"context_line":"                    PROVIDERS.role_api.get_role_by_name(role[\u0027name\u0027])[\u0027id\u0027])"},{"line_number":381,"context_line":"        return roles"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    @controller.protected()"}],"source_content_type":"text/x-python","patch_set":13,"id":"9f91af0f_66d94320","line":380,"in_reply_to":"9f91af0f_4d7545f9","updated":"2018-01-10 06:34:07.000000000","message":"Done","commit_id":"6c1320a44ff30103940f470a9873fc76ec3b070c"}],"keystone/oauth1/schema.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f429ea6f79179df0758860b25983ffdc8efde0a5","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    \u0027items\u0027: {"},{"line_number":39,"context_line":"        \u0027type\u0027: \u0027object\u0027,"},{"line_number":40,"context_line":"        \u0027properties\u0027: {"},{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"        },"},{"line_number":43,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":44,"context_line":"        \u0027additionalProperties\u0027: False"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_e1724b7b","line":41,"range":{"start_line":41,"start_character":13,"end_line":41,"end_character":15},"updated":"2017-12-07 20:44:16.000000000","message":"At the moment, this is actually a required parameter according to keystone business logic.\n\nhttps://github.com/openstack/keystone/blob/master/keystone/oauth1/controllers.py#L402-L404\n\nWe could tell the schema to always expect this, at least until we add support for role names.","commit_id":"4eac1b850c3ac619bf3b63f282a38ffd05767983"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"cd4ec3b0d26dd07c34a625a593218aa8be787425","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    \u0027items\u0027: {"},{"line_number":39,"context_line":"        \u0027type\u0027: \u0027object\u0027,"},{"line_number":40,"context_line":"        \u0027properties\u0027: {"},{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"        },"},{"line_number":43,"context_line":"        \u0027required\u0027: [\u0027id\u0027, ],"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_7eb22d4b","line":41,"range":{"start_line":41,"start_character":12,"end_line":41,"end_character":44},"updated":"2017-12-10 11:07:13.000000000","message":"maybe \"name\" as well? I think the hard-coded \"id\" is not the reason of the definition of schema as this.","commit_id":"43352a64ab38571b334321766ed4ad5491a144a5"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"3c6fdd4733c60842441790ad24c5ad69a9c634c4","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    \u0027items\u0027: {"},{"line_number":39,"context_line":"        \u0027type\u0027: \u0027object\u0027,"},{"line_number":40,"context_line":"        \u0027properties\u0027: {"},{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"        },"},{"line_number":43,"context_line":"        \u0027required\u0027: [\u0027id\u0027, ],"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_ab8b90c0","line":41,"range":{"start_line":41,"start_character":12,"end_line":41,"end_character":44},"in_reply_to":"df87a7cf_7eb22d4b","updated":"2017-12-11 01:34:58.000000000","message":"yeah. Name could be added as well. But It\u0027s not related to this bug. Mind I upload a new patch to make it more clear to review?","commit_id":"43352a64ab38571b334321766ed4ad5491a144a5"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"cd4ec3b0d26dd07c34a625a593218aa8be787425","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        \u0027properties\u0027: {"},{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"        },"},{"line_number":43,"context_line":"        \u0027required\u0027: [\u0027id\u0027, ],"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":45,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":46,"context_line":"    },"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_1e876164","line":43,"range":{"start_line":43,"start_character":8,"end_line":43,"end_character":29},"updated":"2017-12-10 11:07:13.000000000","message":"why?","commit_id":"43352a64ab38571b334321766ed4ad5491a144a5"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"3c6fdd4733c60842441790ad24c5ad69a9c634c4","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        \u0027properties\u0027: {"},{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"        },"},{"line_number":43,"context_line":"        \u0027required\u0027: [\u0027id\u0027, ],"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":45,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":46,"context_line":"    },"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_0b6f1cfc","line":43,"range":{"start_line":43,"start_character":8,"end_line":43,"end_character":29},"in_reply_to":"df87a7cf_1e876164","updated":"2017-12-11 01:34:58.000000000","message":"It\u0027s actually duplicated with L44. If we want to add \"name\" as well. This could be removed.","commit_id":"43352a64ab38571b334321766ed4ad5491a144a5"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"cd4ec3b0d26dd07c34a625a593218aa8be787425","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        },"},{"line_number":43,"context_line":"        \u0027required\u0027: [\u0027id\u0027, ],"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":45,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":46,"context_line":"    },"},{"line_number":47,"context_line":"    \u0027additionalProperties\u0027: False"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_de7c9973","line":47,"range":{"start_line":45,"start_character":0,"end_line":47,"end_character":33},"updated":"2017-12-10 11:07:13.000000000","message":"I nearly forgot the format, but why you duplicated the \"additionalProperties\" here?","commit_id":"43352a64ab38571b334321766ed4ad5491a144a5"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"3c6fdd4733c60842441790ad24c5ad69a9c634c4","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        },"},{"line_number":43,"context_line":"        \u0027required\u0027: [\u0027id\u0027, ],"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":45,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":46,"context_line":"    },"},{"line_number":47,"context_line":"    \u0027additionalProperties\u0027: False"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_eb12f861","line":47,"range":{"start_line":45,"start_character":0,"end_line":47,"end_character":33},"in_reply_to":"df87a7cf_de7c9973","updated":"2017-12-11 01:34:58.000000000","message":"Oh, My mistake here. additionalProperties doesn\u0027t work for \"array\".","commit_id":"43352a64ab38571b334321766ed4ad5491a144a5"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"a755c0b06db790fa73407bcf5c276f2dc2446ccf","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"            \u0027name\u0027: parameter_types.name,"},{"line_number":43,"context_line":"        },"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":45,"context_line":"        \u0027maxProperties\u0027: 1,"},{"line_number":46,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":47,"context_line":"    }"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_4ccb8771","line":45,"range":{"start_line":44,"start_character":0,"end_line":45,"end_character":27},"updated":"2017-12-24 12:57:28.000000000","message":"The schema here only allow one Property, any reason why role \"id\" and \"name\" cannot be presented together?","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"94ba2b83c53fb44c78230d5f9009afba885118f7","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"            \u0027name\u0027: parameter_types.name,"},{"line_number":43,"context_line":"        },"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":45,"context_line":"        \u0027maxProperties\u0027: 1,"},{"line_number":46,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":47,"context_line":"    }"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_cdca3119","line":45,"range":{"start_line":44,"start_character":0,"end_line":45,"end_character":27},"in_reply_to":"bf8cb3f7_2d95dd40","updated":"2017-12-25 02:45:56.000000000","message":"I can find other two APIs whose input can contain id and name:\n\n1. issue a token with password:\nin this API, user\u0027s, project\u0027s domain\u0027s id and name can be put together, but Keystone doesn\u0027t raise error, it just use name and ignore id. https://github.com/openstack/keystone/blob/master/keystone/auth/plugins/core.py#L150-L179\n\n2. create trust with role id and name, it\u0027s rejected by schema:\nhttps://github.com/openstack/keystone/blob/master/keystone/trust/schema.py#L16-L28\n\nNow if we raise an other error here if id and name are specified together, it\u0027ll be an other new behavior.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"e0e6d5b32ff412805ceededcaa56199c8dc9cb3c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"            \u0027name\u0027: parameter_types.name,"},{"line_number":43,"context_line":"        },"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":45,"context_line":"        \u0027maxProperties\u0027: 1,"},{"line_number":46,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":47,"context_line":"    }"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_4daaa1d2","line":45,"range":{"start_line":44,"start_character":0,"end_line":45,"end_character":27},"in_reply_to":"bf8cb3f7_4ccb8771","updated":"2017-12-25 01:30:36.000000000","message":"a valid input is like:\n\n{\n   \"roles\": [\n        {\"id\": xxx},\n        {\"name\": admin}\n   ] \n}\n\nyou mean it could be like this?\n\n{\n   \"roles\": [\n        {\"id\": admin\u0027s id,\n         \"name\": admin}\n   ] \n}\n\nI think it\u0027s a little redundant.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"e2b743e61995e29460c1d8d845cfe33296741fb6","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"            \u0027name\u0027: parameter_types.name,"},{"line_number":43,"context_line":"        },"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":45,"context_line":"        \u0027maxProperties\u0027: 1,"},{"line_number":46,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":47,"context_line":"    }"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_2d95dd40","line":45,"range":{"start_line":44,"start_character":0,"end_line":45,"end_character":27},"in_reply_to":"bf8cb3f7_4daaa1d2","updated":"2017-12-25 01:52:03.000000000","message":"Agreed, it\u0027s redundant here, but if user gives \"id\" as well as \"name\", should it be an exception? we can see many examples in this project.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"faf28e41914ead67649f7fee54720f6acc8805b2","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"            \u0027name\u0027: parameter_types.name,"},{"line_number":43,"context_line":"        },"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":45,"context_line":"        \u0027maxProperties\u0027: 1,"},{"line_number":46,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":47,"context_line":"    }"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_74771404","line":45,"range":{"start_line":44,"start_character":0,"end_line":45,"end_character":27},"in_reply_to":"bf8cb3f7_b1d61527","updated":"2017-12-27 10:43:05.000000000","message":"Agree, redundant and not make sense, but it\u0027s possible. It depends on how we see the severity of the behavior, raise exception here means user\u0027s request will be rejected even both role id and name are correct.\n\nEnd user won\u0027t know the hard requirement for the schema here unless this is documented anywhere or overwrite \"SchemaValidationError\" in order to let us know what exactly wrong in the body.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6181ea95afc102f09d5615ba19681514c8582628","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            \u0027id\u0027: parameter_types.id_string,"},{"line_number":42,"context_line":"            \u0027name\u0027: parameter_types.name,"},{"line_number":43,"context_line":"        },"},{"line_number":44,"context_line":"        \u0027minProperties\u0027: 1,"},{"line_number":45,"context_line":"        \u0027maxProperties\u0027: 1,"},{"line_number":46,"context_line":"        \u0027additionalProperties\u0027: False"},{"line_number":47,"context_line":"    }"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_b1d61527","line":45,"range":{"start_line":44,"start_character":0,"end_line":45,"end_character":27},"in_reply_to":"bf8cb3f7_cdca3119","updated":"2017-12-26 19:21:14.000000000","message":"I don\u0027t really think it makes sense to allow both id and name, I don\u0027t know why someone would want to use that. Currently the trust schema only allows one property for role so I think following that makes sense.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"}],"keystone/tests/unit/test_validation.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"a755c0b06db790fa73407bcf5c276f2dc2446ccf","unresolved":false,"context_lines":[{"line_number":2398,"context_line":"            }"},{"line_number":2399,"context_line":"        ]"},{"line_number":2400,"context_line":""},{"line_number":2401,"context_line":"        self.assertRaises(exception.SchemaValidationError,"},{"line_number":2402,"context_line":"                          self.authorize_request_token_validator.validate,"},{"line_number":2403,"context_line":"                          request_to_validate)"},{"line_number":2404,"context_line":""},{"line_number":2405,"context_line":"    def test_validate_authorize_request_token_with_non_id_or_name(self):"},{"line_number":2406,"context_line":"        request_to_validate \u003d ["}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_8c874f10","line":2403,"range":{"start_line":2401,"start_character":0,"end_line":2403,"end_character":46},"updated":"2017-12-24 12:57:28.000000000","message":"Properly, provide two properties together is not necessary but should be an exception except the case \"id\" and \"name\" are not consistent with each other.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"faf28e41914ead67649f7fee54720f6acc8805b2","unresolved":false,"context_lines":[{"line_number":2398,"context_line":"            }"},{"line_number":2399,"context_line":"        ]"},{"line_number":2400,"context_line":""},{"line_number":2401,"context_line":"        self.assertRaises(exception.SchemaValidationError,"},{"line_number":2402,"context_line":"                          self.authorize_request_token_validator.validate,"},{"line_number":2403,"context_line":"                          request_to_validate)"},{"line_number":2404,"context_line":""},{"line_number":2405,"context_line":"    def test_validate_authorize_request_token_with_non_id_or_name(self):"},{"line_number":2406,"context_line":"        request_to_validate \u003d ["}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_d4f5c084","line":2403,"range":{"start_line":2401,"start_character":0,"end_line":2403,"end_character":46},"in_reply_to":"bf8cb3f7_51b6a9fc","updated":"2017-12-27 10:43:05.000000000","message":"yes, that kind of comparison is somehow complex, but even ignore either of them is better than raise an exception IMO.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"6181ea95afc102f09d5615ba19681514c8582628","unresolved":false,"context_lines":[{"line_number":2398,"context_line":"            }"},{"line_number":2399,"context_line":"        ]"},{"line_number":2400,"context_line":""},{"line_number":2401,"context_line":"        self.assertRaises(exception.SchemaValidationError,"},{"line_number":2402,"context_line":"                          self.authorize_request_token_validator.validate,"},{"line_number":2403,"context_line":"                          request_to_validate)"},{"line_number":2404,"context_line":""},{"line_number":2405,"context_line":"    def test_validate_authorize_request_token_with_non_id_or_name(self):"},{"line_number":2406,"context_line":"        request_to_validate \u003d ["}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_51b6a9fc","line":2403,"range":{"start_line":2401,"start_character":0,"end_line":2403,"end_character":46},"in_reply_to":"bf8cb3f7_8c874f10","updated":"2017-12-26 19:21:14.000000000","message":"Validating that would require two lookups, one to get by ID and one to find by name, in order to compare. I think that adds unnecessary complexity when it could be just validated at the schema layer by rejecting multiple properties.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"e0e6d5b32ff412805ceededcaa56199c8dc9cb3c","unresolved":false,"context_lines":[{"line_number":2398,"context_line":"            }"},{"line_number":2399,"context_line":"        ]"},{"line_number":2400,"context_line":""},{"line_number":2401,"context_line":"        self.assertRaises(exception.SchemaValidationError,"},{"line_number":2402,"context_line":"                          self.authorize_request_token_validator.validate,"},{"line_number":2403,"context_line":"                          request_to_validate)"},{"line_number":2404,"context_line":""},{"line_number":2405,"context_line":"    def test_validate_authorize_request_token_with_non_id_or_name(self):"},{"line_number":2406,"context_line":"        request_to_validate \u003d ["}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_add24d5b","line":2403,"range":{"start_line":2401,"start_character":0,"end_line":2403,"end_character":46},"in_reply_to":"bf8cb3f7_8c874f10","updated":"2017-12-25 01:30:36.000000000","message":"We could do this if we support id and name together here. But I can\u0027t see some case for it. Is there any usage. IMHO, either id or name is enough.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"a755c0b06db790fa73407bcf5c276f2dc2446ccf","unresolved":false,"context_lines":[{"line_number":2404,"context_line":""},{"line_number":2405,"context_line":"    def test_validate_authorize_request_token_with_non_id_or_name(self):"},{"line_number":2406,"context_line":"        request_to_validate \u003d ["},{"line_number":2407,"context_line":"            {"},{"line_number":2408,"context_line":"                \"id\": \"711aa6371a6343a9a43e8a310fbe4a6f\""},{"line_number":2409,"context_line":"            },"},{"line_number":2410,"context_line":"            {"},{"line_number":2411,"context_line":"                \"name\": \"test_role\""},{"line_number":2412,"context_line":"            },"},{"line_number":2413,"context_line":"            {"},{"line_number":2414,"context_line":"                \"fake_key\": \"fake_value\""},{"line_number":2415,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_2ca3a3a0","line":2412,"range":{"start_line":2407,"start_character":0,"end_line":2412,"end_character":14},"updated":"2017-12-24 12:57:28.000000000","message":"Those test can be removed, I cannot see they have anything to do here.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"e0e6d5b32ff412805ceededcaa56199c8dc9cb3c","unresolved":false,"context_lines":[{"line_number":2404,"context_line":""},{"line_number":2405,"context_line":"    def test_validate_authorize_request_token_with_non_id_or_name(self):"},{"line_number":2406,"context_line":"        request_to_validate \u003d ["},{"line_number":2407,"context_line":"            {"},{"line_number":2408,"context_line":"                \"id\": \"711aa6371a6343a9a43e8a310fbe4a6f\""},{"line_number":2409,"context_line":"            },"},{"line_number":2410,"context_line":"            {"},{"line_number":2411,"context_line":"                \"name\": \"test_role\""},{"line_number":2412,"context_line":"            },"},{"line_number":2413,"context_line":"            {"},{"line_number":2414,"context_line":"                \"fake_key\": \"fake_value\""},{"line_number":2415,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf8cb3f7_8df669f9","line":2412,"range":{"start_line":2407,"start_character":0,"end_line":2412,"end_character":14},"in_reply_to":"bf8cb3f7_2ca3a3a0","updated":"2017-12-25 01:30:36.000000000","message":"I\u0027ll remove it in the next ps.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ee645b6f49a2aebe87b5e3b04b91099c7e0d85e9","unresolved":false,"context_lines":[{"line_number":2378,"context_line":""},{"line_number":2379,"context_line":"        self.authorize_request_token_validator.validate(request_to_validate)"},{"line_number":2380,"context_line":""},{"line_number":2381,"context_line":"    def test_validate_authorize_request_token_with_additionalproperties(self):"},{"line_number":2382,"context_line":"        request_to_validate \u003d ["},{"line_number":2383,"context_line":"            {"},{"line_number":2384,"context_line":"                \"id\": \"711aa6371a6343a9a43e8a310fbe4a6f\","}],"source_content_type":"text/x-python","patch_set":10,"id":"9f91af0f_a9401809","line":2381,"range":{"start_line":2381,"start_character":51,"end_line":2381,"end_character":61},"updated":"2018-01-02 19:23:03.000000000","message":"_extra_properties? \n\nI assume the space was omitted between \u0027additional\u0027 and \u0027properties\u0027 because of the 80 character line limit?","commit_id":"9d13719b1cc2ff959a91bd54c0319b818f1b327b"}],"releasenotes/notes/bug-1736875-c790f568c5f4d671.yaml":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"a755c0b06db790fa73407bcf5c276f2dc2446ccf","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - \u003e"},{"line_number":4,"context_line":"    [`bug 1736875 \u003chttps://bugs.launchpad.net/keystone/+bug/1736875\u003e`_]"},{"line_number":5,"context_line":"    Add schema check to return a 400 status code instead of a 500 when"},{"line_number":6,"context_line":"    authorize a request token with extra attributes in the roles parameter."},{"line_number":7,"context_line":"other:"},{"line_number":8,"context_line":"  - \u003e"},{"line_number":9,"context_line":"    Now Keystone supports to authorize request token with role name."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"bf8cb3f7_acb813c8","line":6,"range":{"start_line":6,"start_character":35,"end_line":6,"end_character":51},"updated":"2017-12-24 12:57:28.000000000","message":"To be more clear, extra attributes here mean a non-id/none-name property.","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"a755c0b06db790fa73407bcf5c276f2dc2446ccf","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - \u003e"},{"line_number":4,"context_line":"    [`bug 1736875 \u003chttps://bugs.launchpad.net/keystone/+bug/1736875\u003e`_]"},{"line_number":5,"context_line":"    Add schema check to return a 400 status code instead of a 500 when"},{"line_number":6,"context_line":"    authorize a request token with extra attributes in the roles parameter."},{"line_number":7,"context_line":"other:"},{"line_number":8,"context_line":"  - \u003e"},{"line_number":9,"context_line":"    Now Keystone supports to authorize request token with role name."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"bf8cb3f7_ccbb17c2","line":6,"range":{"start_line":6,"start_character":59,"end_line":6,"end_character":64},"updated":"2017-12-24 12:57:28.000000000","message":"`roles`","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"e0e6d5b32ff412805ceededcaa56199c8dc9cb3c","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - \u003e"},{"line_number":4,"context_line":"    [`bug 1736875 \u003chttps://bugs.launchpad.net/keystone/+bug/1736875\u003e`_]"},{"line_number":5,"context_line":"    Add schema check to return a 400 status code instead of a 500 when"},{"line_number":6,"context_line":"    authorize a request token with extra attributes in the roles parameter."},{"line_number":7,"context_line":"other:"},{"line_number":8,"context_line":"  - \u003e"},{"line_number":9,"context_line":"    Now Keystone supports to authorize request token with role name."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"bf8cb3f7_2ddddd6f","line":6,"range":{"start_line":6,"start_character":59,"end_line":6,"end_character":64},"in_reply_to":"bf8cb3f7_ccbb17c2","updated":"2017-12-25 01:30:36.000000000","message":"I\u0027ll update it in the next PS","commit_id":"c0124a9299ab079b3541dd7aef9f7a7f3a87f446"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"be5f8233228cedf1f5a47855c52701a718a986a5","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    authorize a request token with non-id attributes in the `roles` parameter."},{"line_number":7,"context_line":"other:"},{"line_number":8,"context_line":"  - \u003e"},{"line_number":9,"context_line":"    Now Keystone supports to authorize request token with role name."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"9f91af0f_e7ffdffe","line":9,"range":{"start_line":9,"start_character":4,"end_line":9,"end_character":68},"updated":"2018-01-05 20:54:30.000000000","message":"I wonder if we could change this to something like\n\n\"Keystone now supports authorizing a request token by providing a role name. A `role` in the `roles` parameter can include either a role name or role id, but not both.\"\n\nto provide better clarity on what role parameter should be passed in.","commit_id":"5a3cd9f269fc3d6715236886aec98aa0bb7a5f36"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"afe5cb13b586d46c70ae1f28cae36bfd8280e875","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    authorize a request token with non-id attributes in the `roles` parameter."},{"line_number":7,"context_line":"other:"},{"line_number":8,"context_line":"  - \u003e"},{"line_number":9,"context_line":"    Now Keystone supports to authorize request token with role name."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"9f91af0f_d1f5a7ee","line":9,"range":{"start_line":9,"start_character":4,"end_line":9,"end_character":68},"in_reply_to":"9f91af0f_e7ffdffe","updated":"2018-01-08 01:37:38.000000000","message":"Done","commit_id":"5a3cd9f269fc3d6715236886aec98aa0bb7a5f36"}]}
