)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"f579b4c511884f83dcd3def8183b40f790c560f7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Creates config options for policy.json paths"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Allows for configuration of policy.json path without manually"},{"line_number":10,"context_line":"changing code."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ifb386511fd533d587d99de6585ddb78bc17cbc94"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"5ff73747_133d5bdc","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":14},"updated":"2017-04-27 21:50:17.000000000","message":"Allows for configuration of policy.json paths by service, including:\n\n  - nova\n  - neutron\n  - glance\n  - cinder\n  - keystone\n\nRemoves ``path`` parameter from ``RbacPolicyParser`` as it is now obsolete.","commit_id":"41709ba47a976af142db3960c104ad984f1e70ab"}],"doc/source/installation.rst":[{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"5c40da76854ef8b3eed9e36ccfdfbcb7ec0a3baa","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    # one exists."},{"line_number":58,"context_line":"    cinder_policy_file \u003d /etc/cinder/policy.json"},{"line_number":59,"context_line":"    glance_policy_file \u003d /etc/glance/policy.json"},{"line_number":60,"context_line":"    heat_policy_file \u003d /etc/heat/policy.json"},{"line_number":61,"context_line":"    keystone_policy_file \u003d /etc/keystone/policy.json"},{"line_number":62,"context_line":"    neutron_policy_file \u003d /etc/neutron/policy.json"},{"line_number":63,"context_line":"    nova_policy_file \u003d /etc/nova/policy.json"}],"source_content_type":"text/x-rst","patch_set":11,"id":"5ff73747_d1604b04","line":60,"updated":"2017-04-26 12:49:49.000000000","message":"Do you want to support heat directly in Tree?","commit_id":"0a2c44c20e834d7fa54071fb00611f5cdc34cee4"}],"patrole_tempest_plugin/config.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"c498e03ce703f358af6331ce696d15513601ec8a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                     \" policies which don\u0027t exist. If false, \""},{"line_number":33,"context_line":"                     \"throws skipException.\"),"},{"line_number":34,"context_line":"    cfg.StrOpt(\u0027cinder_policy_file\u0027,"},{"line_number":35,"context_line":"               default\u003d\u0027/opt/stack/cinder/etc/cinder/policy.json\u0027,"},{"line_number":36,"context_line":"               help\u003d\"Location of the neutron policy file.\"),"},{"line_number":37,"context_line":"    cfg.StrOpt(\u0027glance_policy_file\u0027,"},{"line_number":38,"context_line":"               default\u003d\u0027/opt/stack/glance/etc/policy.json\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_66ffa9aa","line":35,"range":{"start_line":35,"start_character":24,"end_line":35,"end_character":64},"updated":"2017-04-17 18:09:55.000000000","message":"Two problems with this type of path:\n1) /opt/stack is system-dependent.\n2) The policy.json inside the cinder repo is not actually used for policy enforcement, so it makes sense to use /etc/cinder/policy.json instead.\n3) These paths are valid in the gates (so they\u0027d have to be overridden in the test hook because the gates use /opt/stack/new by default).","commit_id":"8f3bce237bc859d77f16e5722f7b3a53ac45c3c9"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"cdc0a68cdcd5e4312a1912cfb5b07f9e2d70f28d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                     \" policies which don\u0027t exist. If false, \""},{"line_number":33,"context_line":"                     \"throws skipException.\"),"},{"line_number":34,"context_line":"    cfg.StrOpt(\u0027cinder_policy_file\u0027,"},{"line_number":35,"context_line":"               default\u003d\u0027/opt/stack/cinder/etc/cinder/policy.json\u0027,"},{"line_number":36,"context_line":"               help\u003d\"Location of the neutron policy file.\"),"},{"line_number":37,"context_line":"    cfg.StrOpt(\u0027glance_policy_file\u0027,"},{"line_number":38,"context_line":"               default\u003d\u0027/opt/stack/glance/etc/policy.json\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_06b225e7","line":35,"range":{"start_line":35,"start_character":24,"end_line":35,"end_character":64},"in_reply_to":"7ffa3b31_66ffa9aa","updated":"2017-04-17 18:10:41.000000000","message":"To clarify: 3) These paths are *NOT* valid in the gates.","commit_id":"8f3bce237bc859d77f16e5722f7b3a53ac45c3c9"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"95baa9b9576ab830df4e6f6e14cc7017a434ec20","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    cfg.StrOpt(\u0027nova_policy_file\u0027,"},{"line_number":47,"context_line":"               default\u003d\u0027/etc/nova/policy.json\u0027,"},{"line_number":48,"context_line":"               help\u003d\"Location of the nova policy file.\"),"},{"line_number":49,"context_line":"    cfg.StrOpt(\u0027swift_policy_file\u0027,"},{"line_number":50,"context_line":"               default\u003d\u0027/etc/swift/policy.json\u0027,"},{"line_number":51,"context_line":"               help\u003d\"Location of the swift policy file.\")"},{"line_number":52,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":13,"id":"5ff73747_e047b84b","line":51,"range":{"start_line":49,"start_character":0,"end_line":51,"end_character":57},"updated":"2017-04-27 18:16:05.000000000","message":"I don\u0027t think we should add this without first supporting swift tests. Otherwise this is misleading.","commit_id":"3aec67a8d6c4b22b2802234f4ee426565a63474b"}],"patrole_tempest_plugin/rbac_policy_parser.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"a52e46490f65b428d8246f256dfca0447643ee95","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    each role, whether a given rule is allowed using oslo policy."},{"line_number":41,"context_line":"    \"\"\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def __init__(self, tenant_id, user_id, service\u003dNone, path\u003dNone):"},{"line_number":44,"context_line":"        \"\"\"Initialization of Rbac Policy Parser."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        Parses a policy file to create a dictionary, mapping policy actions to"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_4f3259a9","line":43,"range":{"start_line":43,"start_character":57,"end_line":43,"end_character":66},"updated":"2017-04-18 21:11:25.000000000","message":"This should be removed. The path should be determined from the name of the service and the corresponding CONF path setting.","commit_id":"fe9f8ba05b21df3538365c6c47335190994732e9"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"a52e46490f65b428d8246f256dfca0447643ee95","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        }"},{"line_number":84,"context_line":"        # Use default path in /etc/\u003cservice_name/policy.json if no path"},{"line_number":85,"context_line":"        # is provided."},{"line_number":86,"context_line":"        if service in policy_files:"},{"line_number":87,"context_line":"            self.path \u003d policy_files[service]"},{"line_number":88,"context_line":"        else:"},{"line_number":89,"context_line":"            self.path \u003d path or os.path.join(\u0027/etc\u0027, service, \u0027policy.json\u0027)"},{"line_number":90,"context_line":"        self.rules \u003d policy.Rules.load(self._get_policy_data(service),"},{"line_number":91,"context_line":"                                       \u0027default\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_afcafd69","line":88,"range":{"start_line":86,"start_character":8,"end_line":88,"end_character":13},"updated":"2017-04-18 21:11:25.000000000","message":"This can be simplified to:\n\npath \u003d getattr(CONF.rbac, \u0027%_policy_file\u0027 % service, None)\nif not path:\n     path \u003d ...\nself.path \u003d path","commit_id":"fe9f8ba05b21df3538365c6c47335190994732e9"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"a52e46490f65b428d8246f256dfca0447643ee95","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        if service in policy_files:"},{"line_number":87,"context_line":"            self.path \u003d policy_files[service]"},{"line_number":88,"context_line":"        else:"},{"line_number":89,"context_line":"            self.path \u003d path or os.path.join(\u0027/etc\u0027, service, \u0027policy.json\u0027)"},{"line_number":90,"context_line":"        self.rules \u003d policy.Rules.load(self._get_policy_data(service),"},{"line_number":91,"context_line":"                                       \u0027default\u0027)"},{"line_number":92,"context_line":"        self.tenant_id \u003d tenant_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_2fdeed3e","line":89,"range":{"start_line":89,"start_character":12,"end_line":89,"end_character":76},"updated":"2017-04-18 21:11:25.000000000","message":"1) Remove \"path or\".\n2) If we want to use this fallback path we should probably use a LOG.info to convey that.","commit_id":"fe9f8ba05b21df3538365c6c47335190994732e9"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"a3b5462a82c56ea51ca6bbe3f8a1057e9981d7a2","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                with open(self.path, \u0027r\u0027) as policy_file:"},{"line_number":106,"context_line":"                    file_policy_data \u003d policy_file.read()"},{"line_number":107,"context_line":"                file_policy_data \u003d json.loads(file_policy_data)"},{"line_number":108,"context_line":"            except (IOError, ValueError):"},{"line_number":109,"context_line":"                file_policy_data \u003d None"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # Check whether policy actions are defined in code. Nova and Keystone,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_9234a1df","line":108,"updated":"2017-04-21 16:04:25.000000000","message":"May we add a LOG.debug here indicating that the policy file couldn\u0027t be read for the service -- or that it\u0027s improperly formatted?","commit_id":"60777d460a835259049e5295037694c3171920a7"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"a3b5462a82c56ea51ca6bbe3f8a1057e9981d7a2","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    file_policy_data \u003d policy_file.read()"},{"line_number":107,"context_line":"                file_policy_data \u003d json.loads(file_policy_data)"},{"line_number":108,"context_line":"            except (IOError, ValueError):"},{"line_number":109,"context_line":"                file_policy_data \u003d None"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # Check whether policy actions are defined in code. Nova and Keystone,"},{"line_number":112,"context_line":"        # for example, define their default policy actions in code."}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_b210bd4f","line":109,"range":{"start_line":109,"start_character":35,"end_line":109,"end_character":39},"updated":"2017-04-21 16:04:25.000000000","message":"{}","commit_id":"60777d460a835259049e5295037694c3171920a7"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"e40100ea132124e4304455700d46e62f3ffb8a8c","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            except (IOError, ValueError) as e:"},{"line_number":109,"context_line":"                err_name \u003d e.__class__.__name__"},{"line_number":110,"context_line":"                msg \u003d \"Failed to read policy file for service. \""},{"line_number":111,"context_line":"                if err_name \u003d\u003d \"IOError\":"},{"line_number":112,"context_line":"                    msg +\u003d \"Please check that policy path exists.\""},{"line_number":113,"context_line":"                else:"},{"line_number":114,"context_line":"                    msg +\u003d \"JSON may be improperly formatted.\""}],"source_content_type":"text/x-python","patch_set":8,"id":"5ff73747_46a3c350","line":111,"range":{"start_line":111,"start_character":19,"end_line":111,"end_character":41},"updated":"2017-04-22 20:23:20.000000000","message":"It\u0027s cleaner to do:\n\n    if isinstance(e, IOError):\n        ...\n\ninstead.","commit_id":"94b9959faf9db0c915fddf1f7129b88a3e1212cb"}]}
