)]}'
{"keystone/common/rbac_enforcer/enforcer.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44b7b45d370a33f0d1ca4a1b6053c04e925c7646","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        # before anything except the \"is this a valid action\" check, ensuring"},{"line_number":292,"context_line":"        # all proper \"after request\" checks pass, showing that the API has"},{"line_number":293,"context_line":"        # enforcement."},{"line_number":294,"context_line":"        setattr(flask.g, _ENFORCEMENT_CHECK_ATTR, True)"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        # Assert we are actually authenticated"},{"line_number":297,"context_line":"        cls._assert_is_authenticated()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_a4b723d8","line":294,"updated":"2018-06-26 21:59:15.000000000","message":"This might be a dumb question, but why wouldn\u0027t we want this done at line 362?","commit_id":"50fa1457c480e494f01b25270e084d797a52f594"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"e6274c97f0ba39da2ac46c3482d50d810df5de28","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        # before anything except the \"is this a valid action\" check, ensuring"},{"line_number":292,"context_line":"        # all proper \"after request\" checks pass, showing that the API has"},{"line_number":293,"context_line":"        # enforcement."},{"line_number":294,"context_line":"        setattr(flask.g, _ENFORCEMENT_CHECK_ATTR, True)"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        # Assert we are actually authenticated"},{"line_number":297,"context_line":"        cls._assert_is_authenticated()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_8481c7c4","line":294,"in_reply_to":"5f7c97a3_a4b723d8","updated":"2018-06-26 22:05:34.000000000","message":"Because we don\u0027t care what the response is. we care enforce_call was called. flask [in theory] will still check to make sure enforce_call was called, and it\u0027s legit to say enforce_call occurred but we failed at ._assert_authenticated.\n\nWe care enforce_call happened esp. when checking \"after_request\" which happens before rendering to the user.","commit_id":"50fa1457c480e494f01b25270e084d797a52f594"}],"keystone/tests/unit/common/test_rbac_enforcer.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44b7b45d370a33f0d1ca4a1b6053c04e925c7646","unresolved":false,"context_lines":[{"line_number":602,"context_line":"            self.assertEqual("},{"line_number":603,"context_line":"                getattr(flask.g,"},{"line_number":604,"context_line":"                        rbac_enforcer.enforcer._ENFORCEMENT_CHECK_ATTR),"},{"line_number":605,"context_line":"                True)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_a405e37b","line":605,"updated":"2018-06-26 21:59:15.000000000","message":"Ahhh... this makes sense and kinda answers my other question.","commit_id":"50fa1457c480e494f01b25270e084d797a52f594"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"6d28fb338ba8cbf7246ff83434b5514bca939cb6","unresolved":false,"context_lines":[{"line_number":568,"context_line":"        # enforce_call has actually been called"},{"line_number":569,"context_line":"        token_path \u003d \u0027/v3/auth/tokens\u0027"},{"line_number":570,"context_line":"        auth_json \u003d self._auth_json()"},{"line_number":571,"context_line":"        with self.test_client() as c:"},{"line_number":572,"context_line":"            # setup/initial call. Note that the request must hit the flask"},{"line_number":573,"context_line":"            # app to have access to g (without an explicit app-context push)"},{"line_number":574,"context_line":"            r \u003d c.post(token_path, json\u003dauth_json, expected_status_code\u003d201)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_1d181c1c","line":571,"range":{"start_line":571,"start_character":7,"end_line":571,"end_character":37},"updated":"2018-07-03 19:20:43.000000000","message":"The more I see this the more I can\u0027t wait to use it.","commit_id":"fb0299f661f590bcaddcb3d363fbec4ea6df7548"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"6d28fb338ba8cbf7246ff83434b5514bca939cb6","unresolved":false,"context_lines":[{"line_number":571,"context_line":"        with self.test_client() as c:"},{"line_number":572,"context_line":"            # setup/initial call. Note that the request must hit the flask"},{"line_number":573,"context_line":"            # app to have access to g (without an explicit app-context push)"},{"line_number":574,"context_line":"            r \u003d c.post(token_path, json\u003dauth_json, expected_status_code\u003d201)"},{"line_number":575,"context_line":"            token_id \u003d r.headers.get(\u0027X-Subject-Token\u0027)"},{"line_number":576,"context_line":"            c.get(\u0027%s/argument/%s\u0027 % ("},{"line_number":577,"context_line":"                self.restful_api_url_prefix, uuid.uuid4().hex),"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_bddc8845","line":574,"range":{"start_line":574,"start_character":51,"end_line":574,"end_character":75},"updated":"2018-07-03 19:20:43.000000000","message":"Since we\u0027re using post I wouldn\u0027t feel bad about assuming 201 is the intended expected_status_code.","commit_id":"fb0299f661f590bcaddcb3d363fbec4ea6df7548"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"5b4336ee2ebd369c0c1b2d0eac4ae71edbcba837","unresolved":false,"context_lines":[{"line_number":571,"context_line":"        with self.test_client() as c:"},{"line_number":572,"context_line":"            # setup/initial call. Note that the request must hit the flask"},{"line_number":573,"context_line":"            # app to have access to g (without an explicit app-context push)"},{"line_number":574,"context_line":"            r \u003d c.post(token_path, json\u003dauth_json, expected_status_code\u003d201)"},{"line_number":575,"context_line":"            token_id \u003d r.headers.get(\u0027X-Subject-Token\u0027)"},{"line_number":576,"context_line":"            c.get(\u0027%s/argument/%s\u0027 % ("},{"line_number":577,"context_line":"                self.restful_api_url_prefix, uuid.uuid4().hex),"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_e5c026e3","line":574,"range":{"start_line":574,"start_character":51,"end_line":574,"end_character":75},"in_reply_to":"5f7c97a3_bddc8845","updated":"2018-07-03 20:29:42.000000000","message":"See the comment on the earlier patch, I\u0027ll add some introspection to the function in a followup.","commit_id":"fb0299f661f590bcaddcb3d363fbec4ea6df7548"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"e9ee33649ef5602b54cb16837048ef84e4c5e961","unresolved":false,"context_lines":[{"line_number":571,"context_line":"        with self.test_client() as c:"},{"line_number":572,"context_line":"            # setup/initial call. Note that the request must hit the flask"},{"line_number":573,"context_line":"            # app to have access to g (without an explicit app-context push)"},{"line_number":574,"context_line":"            r \u003d c.post(token_path, json\u003dauth_json, expected_status_code\u003d201)"},{"line_number":575,"context_line":"            token_id \u003d r.headers.get(\u0027X-Subject-Token\u0027)"},{"line_number":576,"context_line":"            c.get(\u0027%s/argument/%s\u0027 % ("},{"line_number":577,"context_line":"                self.restful_api_url_prefix, uuid.uuid4().hex),"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_a85a037f","line":574,"range":{"start_line":574,"start_character":51,"end_line":574,"end_character":75},"in_reply_to":"5f7c97a3_e5c026e3","updated":"2018-07-03 21:34:11.000000000","message":"Sure - that works. Just so long as we don\u0027t have to do a huge refactor to specify expected_status_code\u003d204 for every self.delete()","commit_id":"fb0299f661f590bcaddcb3d363fbec4ea6df7548"}]}
