)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"e1c35828292c93643cd5180ae784799c86f7caaf","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mehdi Abaakouk \u003cmehdi.abaakouk@enovance.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-04-09 16:35:04 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Filter meter in API according policy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch allows to define the permission to access to meters throught"},{"line_number":10,"context_line":"the policy system like this:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAW3%2F%2F5iE%3D","line":7,"updated":"2014-04-09 16:30:25.000000000","message":"Maybe something like \u0027Configurable permissions to meters via the API according policy\u0027 would more describe the content of this patch.","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"e1c35828292c93643cd5180ae784799c86f7caaf","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Filter meter in API according policy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch allows to define the permission to access to meters throught"},{"line_number":10,"context_line":"the policy system like this:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"   \u0027have_access_to_meter\u0027: \u0027role:admin or meter:cpu or (meter:instance"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAW3%2F%2F5k0%3D","line":9,"updated":"2014-04-09 16:30:25.000000000","message":"s/throught/through/","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d5111d45ae579451e59c07b62d5dba6796a99079","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch allows to define the permission to access to meters throught"},{"line_number":10,"context_line":"the policy system like this:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"   \u0027have_access_to_meter\u0027: \u0027role:admin or meter:cpu or (meter:instance"},{"line_number":13,"context_line":"   and role:half_powered_user)\u0027"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This example means:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAW3%2F%2F5L8%3D","line":12,"updated":"2014-04-09 16:51:20.000000000","message":"The phrasing of \"have_access_to_meter\" seems a bit odd to me for a number of reasons:\n\n* all RBAC rules implicitly govern access decisions, so the \"\"have_access_to_\" prefix seems redundant\n* IIUC the general openstack style is to name rules in a more imperative way, e.g. named after the actual individual operation(s) being invoked\n* the access decision relates to more than pure meter access, as it also impacts potentially on resource/sample/statistics visibility (obviously all those entities are related to a particular meter or meters, but that\u0027s not immediately clear from the naming of the \"have_access_to_*meter*\" policy IMO)","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"c83ad62e6e542be82db05881b61f3d1f7240c2f9","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This example means:"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"* role admin have access to data about all meters"},{"line_number":18,"context_line":"* everyone have access to cpu meter related data"},{"line_number":19,"context_line":"* role half_powered_user have access to cpu and instance meter related"},{"line_number":20,"context_line":"  data"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAXX%2F%2F6ww%3D","line":17,"updated":"2014-04-25 09:54:41.000000000","message":"has?","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"c83ad62e6e542be82db05881b61f3d1f7240c2f9","unresolved":false,"context_lines":[{"line_number":15,"context_line":"This example means:"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"* role admin have access to data about all meters"},{"line_number":18,"context_line":"* everyone have access to cpu meter related data"},{"line_number":19,"context_line":"* role half_powered_user have access to cpu and instance meter related"},{"line_number":20,"context_line":"  data"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAXX%2F%2F6wo%3D","line":18,"updated":"2014-04-25 09:54:41.000000000","message":"ditto","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"c83ad62e6e542be82db05881b61f3d1f7240c2f9","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"* role admin have access to data about all meters"},{"line_number":18,"context_line":"* everyone have access to cpu meter related data"},{"line_number":19,"context_line":"* role half_powered_user have access to cpu and instance meter related"},{"line_number":20,"context_line":"  data"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"If the user is not admin it continues to be scoped to its own data."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAXX%2F%2F6wk%3D","line":19,"updated":"2014-04-25 09:54:41.000000000","message":"ditto","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"c83ad62e6e542be82db05881b61f3d1f7240c2f9","unresolved":false,"context_lines":[{"line_number":19,"context_line":"* role half_powered_user have access to cpu and instance meter related"},{"line_number":20,"context_line":"  data"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"If the user is not admin it continues to be scoped to its own data."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Co-Authored-By: Ala Rezmerita \u003cala.rezmerita@cloudwatt.com\u003e"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAXX%2F%2F6wY%3D","line":22,"updated":"2014-04-25 09:54:41.000000000","message":"I guess it\u0027s better to use words \u0027it\u0027-\u003e\u0027he\u0027, \u0027its\u0027-\u003e\u0027his\u0027","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"81841e8aa4ae3c4dd7f20c252ad8470551a318e7","unresolved":false,"context_lines":[{"line_number":19,"context_line":"* role half_powered_user have access to cpu and instance meter related"},{"line_number":20,"context_line":"  data"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"If the user is not admin it continues to be scoped to its own data."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Co-Authored-By: Ala Rezmerita \u003cala.rezmerita@cloudwatt.com\u003e"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAXX%2F%2F5u0%3D","line":22,"in_reply_to":"AAAAXX%2F%2F6Po%3D","updated":"2014-04-25 12:29:04.000000000","message":"Exactly, now it will be perfect. :)","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"fc678b302d5aef2caae088776bce1234a50260eb","unresolved":false,"context_lines":[{"line_number":19,"context_line":"* role half_powered_user have access to cpu and instance meter related"},{"line_number":20,"context_line":"  data"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"If the user is not admin it continues to be scoped to its own data."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Co-Authored-By: Ala Rezmerita \u003cala.rezmerita@cloudwatt.com\u003e"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAXX%2F%2F6Po%3D","line":22,"in_reply_to":"AAAAXX%2F%2F6pM%3D","updated":"2014-04-25 11:19:21.000000000","message":"and he/she :D","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"57350a66433136ddafe0fca3f2a4d4f64d9ba542","unresolved":false,"context_lines":[{"line_number":19,"context_line":"* role half_powered_user have access to cpu and instance meter related"},{"line_number":20,"context_line":"  data"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"If the user is not admin it continues to be scoped to its own data."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Co-Authored-By: Ala Rezmerita \u003cala.rezmerita@cloudwatt.com\u003e"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAXX%2F%2F6pM%3D","line":22,"in_reply_to":"AAAAXX%2F%2F6wY%3D","updated":"2014-04-25 10:11:03.000000000","message":"To be correct, the best would be \u0027his/her\u0027. :)","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"}],"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"a0749db1f6a0e760e16b3d0ebb2d1aceff6952d7","unresolved":false,"context_lines":[{"line_number":274,"context_line":"def enforce_access_to_meter(meter_name, entity):"},{"line_number":275,"context_line":"        if not acl.have_access_to_meter(meter_name,"},{"line_number":276,"context_line":"                                        pecan.request.headers):"},{"line_number":277,"context_line":"            raise EntityNotFound(entity, meter_name)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"def filter_out_unauthorized_meter(meter_field, results):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F9SyY%3D","line":277,"updated":"2014-04-07 10:33:32.000000000","message":"Why do we raise a 404 error instead of 403?","commit_id":"91db0960a1b86112dd2a0f86f052e3a450f7ec0a"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"f4e33294be37f7a8934d464e8cde05f2cfdd79b4","unresolved":false,"context_lines":[{"line_number":274,"context_line":"def enforce_access_to_meter(meter_name, entity):"},{"line_number":275,"context_line":"        if not acl.have_access_to_meter(meter_name,"},{"line_number":276,"context_line":"                                        pecan.request.headers):"},{"line_number":277,"context_line":"            raise EntityNotFound(entity, meter_name)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"def filter_out_unauthorized_meter(meter_field, results):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAWH%2F9SoA%3D","line":277,"in_reply_to":"AAAAWH%2F9SyY%3D","updated":"2014-04-07 10:57:54.000000000","message":"Good question :),  I have hesitated, but I have chosen 404 for this reason:\n\nI think that make no sense to tell the user that a meter exists and it cannot access it in any way.\n\nI don\u0027t see how is useful for the user to get a 403 when the deployer have chosen to hide some meters to the user.\n\nWhen we choice 403 instead of 404, we need to think if this results in a leak of information, and this case, it is. 403 is ok when a full endpoint is forbidden, but in this case, some meters are available, some not, so the user can make the difference between hidden meters and not existing meters.","commit_id":"91db0960a1b86112dd2a0f86f052e3a450f7ec0a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d5111d45ae579451e59c07b62d5dba6796a99079","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        return converted_value"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def enforce_access_to_meter(meter_name, entity):"},{"line_number":275,"context_line":"        if not acl.have_access_to_meter(meter_name,"},{"line_number":276,"context_line":"                                        pecan.request.headers):"},{"line_number":277,"context_line":"            raise EntityNotFound(entity, meter_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F5Io%3D","line":274,"updated":"2014-04-09 16:51:20.000000000","message":"Why is the entity name \u0027Meter\u0027 in each case?\n\nWould it make more sense as \u0027Meter\u0027, \u0027Sample\u0027, \u0027Statistic\u0027, \u0027Resource\u0027 etc. depending on the context of the enforcement?","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e967f9c2400a6d33794cdcd7289910592cab006b","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def enforce_access_to_meter(meter_name, entity):"},{"line_number":275,"context_line":"        if not acl.have_access_to_meter(meter_name,"},{"line_number":276,"context_line":"                                        pecan.request.headers):"},{"line_number":277,"context_line":"            raise EntityNotFound(entity, meter_name)"},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F6Zc%3D","line":275,"updated":"2014-04-09 15:11:12.000000000","message":"is this actually indented or is it just gerrit?","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"73fad746886777462afef41cadf8994d99e62510","unresolved":false,"context_lines":[{"line_number":272,"context_line":""},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"def enforce_access_to_meter(meter_name, entity):"},{"line_number":275,"context_line":"        if not acl.have_access_to_meter(meter_name,"},{"line_number":276,"context_line":"                                        pecan.request.headers):"},{"line_number":277,"context_line":"            raise EntityNotFound(entity, meter_name)"},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAXH%2F%2FLN8%3D","line":275,"in_reply_to":"AAAAW3%2F%2F6Zc%3D","updated":"2014-04-23 15:43:59.000000000","message":"it\u0027s Gerrit)","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e967f9c2400a6d33794cdcd7289910592cab006b","unresolved":false,"context_lines":[{"line_number":1499,"context_line":"        #meter doesn\u0027t exist, we can conlude the resource must not be"},{"line_number":1500,"context_line":"        #accessed too."},{"line_number":1501,"context_line":""},{"line_number":1502,"context_line":"        #TODO(sileht): what if no meter_links ?"},{"line_number":1503,"context_line":"        resources_links \u003d six.moves.filter("},{"line_number":1504,"context_line":"            lambda datum: len(datum[1]) !\u003d 1,"},{"line_number":1505,"context_line":"            iter((r, self._resource_links(r.resource_id, meter_links))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F6Pk%3D","line":1502,"updated":"2014-04-09 15:11:12.000000000","message":"is this todo still necessary?","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"e1c35828292c93643cd5180ae784799c86f7caaf","unresolved":false,"context_lines":[{"line_number":1499,"context_line":"        #meter doesn\u0027t exist, we can conlude the resource must not be"},{"line_number":1500,"context_line":"        #accessed too."},{"line_number":1501,"context_line":""},{"line_number":1502,"context_line":"        #TODO(sileht): what if no meter_links ?"},{"line_number":1503,"context_line":"        resources_links \u003d six.moves.filter("},{"line_number":1504,"context_line":"            lambda datum: len(datum[1]) !\u003d 1,"},{"line_number":1505,"context_line":"            iter((r, self._resource_links(r.resource_id, meter_links))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F5Qk%3D","line":1502,"in_reply_to":"AAAAW3%2F%2F6Pk%3D","updated":"2014-04-09 16:30:25.000000000","message":"According to the test results, I would say yes.","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d5111d45ae579451e59c07b62d5dba6796a99079","unresolved":false,"context_lines":[{"line_number":1559,"context_line":"        _validate_query(threshold_rule.query, storage.SampleFilter.__init__,"},{"line_number":1560,"context_line":"                        allow_timestamps\u003dFalse)"},{"line_number":1561,"context_line":""},{"line_number":1562,"context_line":"        enforce_access_to_meter(threshold_rule.meter_name, _(\u0027Meter\u0027))"},{"line_number":1563,"context_line":"        return threshold_rule"},{"line_number":1564,"context_line":""},{"line_number":1565,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F5Ho%3D","line":1562,"updated":"2014-04-09 16:51:20.000000000","message":"If the RBAC config is changed after the alarm is created, then what about the application of the modified rules to ongoing evaluations?\n\nIn a sense, is the check even needed here, as IIUC the enforcement will occur anyway statistics querying is done on each evaluation cycle?","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"}],"ceilometer/tests/api/v2/test_meter_acl_scenarios.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e967f9c2400a6d33794cdcd7289910592cab006b","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        data \u003d self.get_json(\u0027/meters/meter.mine\u0027)"},{"line_number":113,"context_line":"        self.assertEqual(1, len(data))"},{"line_number":114,"context_line":"        self.assertEqual(\u0027meter.mine\u0027, data[0][\u0027counter_name\u0027])"},{"line_number":115,"context_line":"        self.get_json(\u0027/meters/meter.other\u0027, status\u003d404)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_get_all_samples(self):"},{"line_number":118,"context_line":"        self.set_rule(\"meter:meter.mine\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F6Gg%3D","line":115,"updated":"2014-04-09 15:11:12.000000000","message":"expect_errors\u003dTrue\n\nsame for below","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"e1c35828292c93643cd5180ae784799c86f7caaf","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        data \u003d self.get_json(\u0027/meters/meter.mine\u0027)"},{"line_number":113,"context_line":"        self.assertEqual(1, len(data))"},{"line_number":114,"context_line":"        self.assertEqual(\u0027meter.mine\u0027, data[0][\u0027counter_name\u0027])"},{"line_number":115,"context_line":"        self.get_json(\u0027/meters/meter.other\u0027, status\u003d404)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_get_all_samples(self):"},{"line_number":118,"context_line":"        self.set_rule(\"meter:meter.mine\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F5R0%3D","line":115,"in_reply_to":"AAAAW3%2F%2F6Gg%3D","updated":"2014-04-09 16:30:25.000000000","message":"When expect_errors is set to \u0027True\u0027 it means that other status code, than 200/3xx, is also accepted. When status\u003d404 is set, it solves this issue, as the 404 status code will be accepted by the test logic, so basically it does not really count here, if I remember correctly, but it shows more clearly that it is a negative test case, so it is better to add.","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e967f9c2400a6d33794cdcd7289910592cab006b","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                \u0027statistic\u0027: \u0027avg\u0027,"},{"line_number":202,"context_line":"            }"},{"line_number":203,"context_line":"        }"},{"line_number":204,"context_line":"        self.post_json(\u0027/alarms\u0027, params\u003djson, expect_errors\u003dTrue, status\u003d200)"},{"line_number":205,"context_line":"        alarms \u003d list(self.conn.get_alarms())"},{"line_number":206,"context_line":"        self.assertEqual(1, len(alarms))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F6Hs%3D","line":204,"updated":"2014-04-09 15:11:12.000000000","message":"drop expect_errors","commit_id":"c0940e4e961aee978d1ca11915639e5b20011634"}]}
