)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"84ca6b4eec0f21eea3b07fcebe980eb4ed2abe5f","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2017-11-22 12:20:24 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add missing volume RBAC test"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adding missing rbac test for \u0027show_group_type\u0027"},{"line_number":10,"context_line":"API ref:"},{"line_number":11,"context_line":"[1]https://developer.openstack.org/api-ref/block-storage/v3/#show-one-specific-group-spec-for-a-group-type"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"And fixing a spelling mistake"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ff82abbf_b20857d9","line":11,"range":{"start_line":8,"start_character":0,"end_line":11,"end_character":106},"updated":"2017-11-22 18:01:02.000000000","message":"This link isn\u0027t correct. And the formatting can be improved. Example:\n\nAdd missing RBAC test for \u0027show_group_type\u0027 API [0] which enforces \"group:access_group_type_specs\" according to policy in code docs [1].\n\n[0] https://developer.openstack.org/api-ref/block-storage/v3/#show-group-type-details\n[1] https://github.com/openstack/cinder/blob/76231f3ad2828fe7bb60ecd9686db807622bbb7a/cinder/policies/group_types.py#L53","commit_id":"e777103029a64083865fd01a9b068e1332f184c1"}],"patrole_tempest_plugin/tests/api/volume/test_groups_rbac.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"1095b8bdc0ae14e01110eabc723f21640c82cfd6","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    @decorators.idempotent_id(\u00278d9e2831-24c3-47b7-a76a-2e563287f12f\u0027)"},{"line_number":157,"context_line":"    @rbac_rule_validation.action("},{"line_number":158,"context_line":"        service\u003d\"cinder\","},{"line_number":159,"context_line":"        rule\u003d\"group:group_types_manage\")"},{"line_number":160,"context_line":"    def test_show_group_type(self):"},{"line_number":161,"context_line":"        group_type \u003d self.create_group_type(ignore_notfound\u003dTrue)"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_648250cb","line":159,"range":{"start_line":159,"start_character":14,"end_line":159,"end_character":37},"updated":"2017-11-20 18:32:45.000000000","message":"This endpoint enforces \"group:access_group_types_specs\" instead.\n\n.. https://github.com/openstack/cinder/blob/master/cinder/policies/group_types.py#L47","commit_id":"fad239ebe950536c4ee52bb31b2596d811581c75"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"1095b8bdc0ae14e01110eabc723f21640c82cfd6","unresolved":false,"context_lines":[{"line_number":170,"context_line":"    def test_list_group_type(self):"},{"line_number":171,"context_line":"        self.create_group_type(ignore_notfound\u003dTrue)"},{"line_number":172,"context_line":"        self.rbac_utils.switch_role(self, toggle_rbac_role\u003dTrue)"},{"line_number":173,"context_line":"        self.group_types_client.list_group_types()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_645b3087","line":173,"updated":"2017-11-20 18:32:45.000000000","message":"This endpoint doesn\u0027t appear to enforce anything according to policy in code docs. So this test should be removed.","commit_id":"fad239ebe950536c4ee52bb31b2596d811581c75"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"ac7bd3eefaa76dc10cfa3717bfa0a67db0faa9a4","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        service\u003d\"cinder\","},{"line_number":159,"context_line":"        rule\u003d\"group:access_group_types_specs\")"},{"line_number":160,"context_line":"    def test_show_group_type(self):"},{"line_number":161,"context_line":"        group_type \u003d self.create_group_type(ignore_notfound\u003dTrue)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        self.rbac_utils.switch_role(self, toggle_rbac_role\u003dTrue)"},{"line_number":164,"context_line":"        self.group_types_client.show_group_type(group_type[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_2af398a0","line":161,"range":{"start_line":161,"start_character":44,"end_line":161,"end_character":64},"updated":"2017-11-21 15:04:33.000000000","message":"This should be removed.","commit_id":"6964717a3becffe83e435ac9e58e20fa330ad806"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"ac7bd3eefaa76dc10cfa3717bfa0a67db0faa9a4","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        group_type \u003d self.create_group_type(ignore_notfound\u003dTrue)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        self.rbac_utils.switch_role(self, toggle_rbac_role\u003dTrue)"},{"line_number":164,"context_line":"        self.group_types_client.show_group_type(group_type[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_2afdd839","line":164,"range":{"start_line":164,"start_character":8,"end_line":164,"end_character":65},"updated":"2017-11-21 15:04:33.000000000","message":"This is throwing OverPermission because the policy description [0] says this: \"Show group type with type specs attributes.\"\n\nThis means that the response body contains \"group_specs\" kwarg with permissions, and no \"group_specs\" kwarg without permissions.\n\nI quickly tested this in Tempest with:\n\nfetched_group_type_admin \u003d self.admin_group_types_client.show_group_type(\n            body[\u0027id\u0027])[\u0027group_type\u0027]\n        fetched_group_type_primary \u003d self.os_primary.group_types_v3_client.show_group_type(\n            body[\u0027id\u0027])[\u0027group_type\u0027]\n\nWith breakpoint this results in:\n\n(Pdb) fetched_group_type_admin\n{u\u0027is_public\u0027: True, u\u0027description\u0027: u\u0027tempest-group-type-description-1603547251\u0027, u\u0027id\u0027: u\u002716d1c7b2-2d94-4f81-84b6-1070030489d6\u0027, u\u0027name\u0027: u\u0027tempest-GroupTypesTest-group-type-2037228523\u0027, u\u0027group_specs\u0027: {u\u0027consistent_group_snapshot_enabled\u0027: u\u0027\u003cis\u003e False\u0027}}\n(Pdb) fetched_group_type_primary\n{u\u0027is_public\u0027: True, u\u0027description\u0027: u\u0027tempest-group-type-description-1603547251\u0027, u\u0027id\u0027: u\u002716d1c7b2-2d94-4f81-84b6-1070030489d6\u0027, u\u0027name\u0027: u\u0027tempest-GroupTypesTest-group-type-2037228523\u0027}\n(Pdb) \n\nAs you can see, admin has \"group_specs\", non-admin has no \"group_specs\".\n\nSo this test needs to be refactored to:\n\n    resp_body \u003d self.group_types_client.show_group_type(group_type[\u0027id\u0027])[\u0027group_type\u0027]\n    if \u0027group_specs\u0027 not in resp_body:\n        raise rbac_exceptions.RbacMalformedResponse(attribute\u003d\u0027group_specs\u0027)\n\n[0] https://github.com/openstack/cinder/blob/9fbf236dc17d67404e2ce9ced517182716d72e6f/cinder/policies/group_types.py#L49","commit_id":"6964717a3becffe83e435ac9e58e20fa330ad806"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"16a362a9bda7ec276ec63570b38d2c4ddbc6ed50","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def test_show_group_type(self):"},{"line_number":161,"context_line":"        group_type \u003d self.create_group_type()"},{"line_number":162,"context_line":"        self.rbac_utils.switch_role(self, toggle_rbac_role\u003dTrue)"},{"line_number":163,"context_line":"        group_type \u003d self.create_group_type()"},{"line_number":164,"context_line":"        self.rbac_utils.switch_role(self, toggle_rbac_role\u003dTrue)"},{"line_number":165,"context_line":"        resp_body \u003d \\"},{"line_number":166,"context_line":"            self.group_types_client.show_group_type("},{"line_number":167,"context_line":"                group_type[\u0027id\u0027])[\u0027group_type\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_14fee4ad","line":164,"range":{"start_line":163,"start_character":8,"end_line":164,"end_character":64},"updated":"2017-11-22 06:49:53.000000000","message":"Why is this repeated? This should be removed.","commit_id":"c36b85da23112a63edca1f4014ca740912247996"}]}
