)]}'
{"barbican/api/middleware/context.py":[{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","username":"liujiong"},"change_message_id":"f97c876ba29b053d140983652054f0745899fe97","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        if req.headers.get(\u0027X-Project-Domain-Id\u0027):"},{"line_number":108,"context_line":"            kwargs[\u0027project_domain\u0027] \u003d req.headers[\u0027X-Project-Domain-Id\u0027]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        return barbican.context.RequestContext(**kwargs)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class UnauthenticatedContextMiddleware(BaseContextMiddleware):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_cdda0fe8","side":"PARENT","line":110,"range":{"start_line":110,"start_character":32,"end_line":110,"end_character":46},"updated":"2017-11-13 06:22:34.000000000","message":"We set policy_enforcer in barbican.context.RequestContext which is not added in oslo.context. Simply use oslo.context should not be enough?","commit_id":"3538f51ef70972db08c2993aa5277619b9426f79"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"9e8ba18afd9306884e66e7904b8ffdc064387008","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        if req.headers.get(\u0027X-Project-Domain-Id\u0027):"},{"line_number":108,"context_line":"            kwargs[\u0027project_domain\u0027] \u003d req.headers[\u0027X-Project-Domain-Id\u0027]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        return barbican.context.RequestContext(**kwargs)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class UnauthenticatedContextMiddleware(BaseContextMiddleware):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_332d8295","side":"PARENT","line":110,"range":{"start_line":110,"start_character":32,"end_line":110,"end_character":46},"in_reply_to":"1f485f77_083b75eb","updated":"2017-11-13 07:53:40.000000000","message":"lol, thanks! I was trying to be clever and got this stuff from nova. Seems I was too hasty in submitting this like it is.","commit_id":"3538f51ef70972db08c2993aa5277619b9426f79"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ff0a86098eb977bb21322d9d3e8274e160e706cc","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        if req.headers.get(\u0027X-Project-Domain-Id\u0027):"},{"line_number":108,"context_line":"            kwargs[\u0027project_domain\u0027] \u003d req.headers[\u0027X-Project-Domain-Id\u0027]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        return barbican.context.RequestContext(**kwargs)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class UnauthenticatedContextMiddleware(BaseContextMiddleware):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_e89db959","side":"PARENT","line":110,"range":{"start_line":110,"start_character":32,"end_line":110,"end_character":46},"in_reply_to":"1f485f77_cdda0fe8","updated":"2017-11-13 07:15:18.000000000","message":"It should, since from_environ is a classmethod, so it should call the constructor if barbican.context.RequestContext which actually builds the policy enforcer in the constructor.\n\nNot sure why this is breaking in the gate. Gotta investigate it further.","commit_id":"3538f51ef70972db08c2993aa5277619b9426f79"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","username":"liujiong"},"change_message_id":"12959fc87ef97d47ee94b51ddba82d32a0be372e","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        if req.headers.get(\u0027X-Project-Domain-Id\u0027):"},{"line_number":108,"context_line":"            kwargs[\u0027project_domain\u0027] \u003d req.headers[\u0027X-Project-Domain-Id\u0027]"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        return barbican.context.RequestContext(**kwargs)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class UnauthenticatedContextMiddleware(BaseContextMiddleware):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_083b75eb","side":"PARENT","line":110,"range":{"start_line":110,"start_character":32,"end_line":110,"end_character":46},"in_reply_to":"1f485f77_e89db959","updated":"2017-11-13 07:48:25.000000000","message":"Oh, yes, stupid question. Seems user_auth_plugin is used in nowhere and it causes barbican.context.RequestContext construction failure.","commit_id":"3538f51ef70972db08c2993aa5277619b9426f79"},{"author":{"_account_id":19853,"name":"Nguyen Hung Phuong","email":"phuongnh@vn.fujitsu.com","username":"phuongnh"},"change_message_id":"d9007c55cebf67907491c4fc7a7cab06c2012c2f","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            LOG.debug(\"Neither X_USER_ID nor X_USER found in request\")"},{"line_number":89,"context_line":"            return webob.exc.HTTPUnauthorized()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        ctx.is_admin \u003d CONF.admin_role.strip().lower() in roles"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        return ctx"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_ec3ecd27","line":91,"range":{"start_line":91,"start_character":58,"end_line":91,"end_character":63},"updated":"2017-11-14 06:55:06.000000000","message":"You have removed \"roles\" in patchset 1.\nroles_header \u003d req.headers.get(\u0027X-Roles\u0027, \u0027\u0027)\n        roles \u003d [r.strip().lower() for r in roles_header.split(\u0027,\u0027)]","commit_id":"8741a9612d24efddfa0f03ca7f6a754250a47bf4"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","username":"liujiong"},"change_message_id":"f1e65353f248a9f22c42985737a2f796aff7110b","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            LOG.debug(\"Neither X_USER_ID nor X_USER found in request\")"},{"line_number":89,"context_line":"            return webob.exc.HTTPUnauthorized()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        ctx.is_admin \u003d CONF.admin_role.strip().lower() in roles"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        return ctx"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_2cd185ce","line":91,"range":{"start_line":91,"start_character":58,"end_line":91,"end_character":63},"updated":"2017-11-14 07:01:09.000000000","message":"`roles` is not defined in anywhere, you may want to retrieve it from ctx.","commit_id":"8741a9612d24efddfa0f03ca7f6a754250a47bf4"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"e79acbd9e792a0e97f71217247402ed99d344771","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            LOG.debug(\"Neither X_USER_ID nor X_USER found in request\")"},{"line_number":89,"context_line":"            return webob.exc.HTTPUnauthorized()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        ctx.is_admin \u003d CONF.admin_role.strip().lower() in roles"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        return ctx"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_6c953de4","line":91,"range":{"start_line":91,"start_character":58,"end_line":91,"end_character":63},"in_reply_to":"1f485f77_2cd185ce","updated":"2017-11-14 07:04:05.000000000","message":"thanks.","commit_id":"8741a9612d24efddfa0f03ca7f6a754250a47bf4"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"b445ef0f4d495ccc25f65a58548d1ba845893738","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            LOG.debug(\"Neither X_USER_ID nor X_USER found in request\")"},{"line_number":89,"context_line":"            return webob.exc.HTTPUnauthorized()"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        ctx.is_admin \u003d CONF.admin_role.strip().lower() in roles"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        return ctx"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_4c7cc1ea","line":91,"range":{"start_line":91,"start_character":58,"end_line":91,"end_character":63},"in_reply_to":"1f485f77_ec3ecd27","updated":"2017-11-14 06:56:18.000000000","message":"Correct. They are parsed in the from_environ call https://github.com/openstack/oslo.context/blob/master/oslo_context/context.py#L438","commit_id":"8741a9612d24efddfa0f03ca7f6a754250a47bf4"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","username":"liujiong"},"change_message_id":"411c053dab10d71a4f915e8c7c0e88ec254c7256","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def _get_authenticated_context(self, req):"},{"line_number":85,"context_line":"        ctx \u003d barbican.context.RequestContext.from_environ(req.environ)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        if ctx.project_id is None:"},{"line_number":88,"context_line":"            LOG.debug(\"X_PROJECT_ID not found in request\")"},{"line_number":89,"context_line":"            return webob.exc.HTTPUnauthorized()"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_0a9ba765","line":87,"range":{"start_line":87,"start_character":11,"end_line":87,"end_character":25},"updated":"2018-04-02 10:42:53.000000000","message":"Test in my env and finally figure out this causes the gate failed.\nIn barbican, we try to get project_id via \"ctx.project\", but actually should via \"ctx.project_id\" in this case. So the external_project_id  is always None.\nI see that usage in \"barbican/api/controllers/__init__.py\" and \"barbican/api/controllers/orders.py\", but not sure if there\u0027s more.","commit_id":"aae31f81efd0956cc33c025bc654a2a4ee58e3c9"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"f32ae6efa86d6bcf716cd74eaacf975887650dfe","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def _get_authenticated_context(self, req):"},{"line_number":85,"context_line":"        ctx \u003d barbican.context.RequestContext.from_environ(req.environ)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        if ctx.project_id is None:"},{"line_number":88,"context_line":"            LOG.debug(\"X_PROJECT_ID not found in request\")"},{"line_number":89,"context_line":"            return webob.exc.HTTPUnauthorized()"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_318b7068","line":87,"range":{"start_line":87,"start_character":11,"end_line":87,"end_character":25},"in_reply_to":"bf659307_0a9ba765","updated":"2018-04-03 05:18:41.000000000","message":"Thanks for checking this out! I was quite confused about it. Lets see if that does the trick.","commit_id":"aae31f81efd0956cc33c025bc654a2a4ee58e3c9"}]}
