)]}'
{"oslo_policy/_checks.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        try:"},{"line_number":265,"context_line":"            user_id \u003d creds[\u0027user_id\u0027]"},{"line_number":266,"context_line":"        except KeyError:"},{"line_number":267,"context_line":"            return result"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        try:"},{"line_number":270,"context_line":"            conn \u003d ldap.initialize(conf.ldap_url)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_ecb560d0","line":267,"updated":"2015-12-17 02:17:24.000000000","message":"return False?","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":17862,"name":"Kseniya Tychkova","email":"kseniya.tychkova@gmail.com","username":"ktychkova"},"change_message_id":"4a4e637944a1aec7dd036c2d47a1864de46d8cc7","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        try:"},{"line_number":265,"context_line":"            user_id \u003d creds[\u0027user_id\u0027]"},{"line_number":266,"context_line":"        except KeyError:"},{"line_number":267,"context_line":"            return result"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        try:"},{"line_number":270,"context_line":"            conn \u003d ldap.initialize(conf.ldap_url)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_6e9c9dc0","line":267,"in_reply_to":"3a7e1126_ecb560d0","updated":"2015-12-18 09:00:06.000000000","message":"Done","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        try:"},{"line_number":270,"context_line":"            conn \u003d ldap.initialize(conf.ldap_url)"},{"line_number":271,"context_line":"        except Exception:"},{"line_number":272,"context_line":"            return False"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_2cc4c83e","line":271,"updated":"2015-12-17 02:17:24.000000000","message":"What exceptions can be raised here? Explicitly enumerate the ones you expect.","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":17862,"name":"Kseniya Tychkova","email":"kseniya.tychkova@gmail.com","username":"ktychkova"},"change_message_id":"4a4e637944a1aec7dd036c2d47a1864de46d8cc7","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        try:"},{"line_number":270,"context_line":"            conn \u003d ldap.initialize(conf.ldap_url)"},{"line_number":271,"context_line":"        except Exception:"},{"line_number":272,"context_line":"            return False"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_8e9f89b3","line":271,"in_reply_to":"3a7e1126_2cc4c83e","updated":"2015-12-18 09:00:06.000000000","message":"Done","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        try:"},{"line_number":270,"context_line":"            conn \u003d ldap.initialize(conf.ldap_url)"},{"line_number":271,"context_line":"        except Exception:"},{"line_number":272,"context_line":"            return False"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        try:"},{"line_number":275,"context_line":"            conn.simple_bind_s(conf.ldap_admin, conf.ldap_admin_password)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_acaf587c","line":272,"updated":"2015-12-17 02:17:24.000000000","message":"or return result?","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":17862,"name":"Kseniya Tychkova","email":"kseniya.tychkova@gmail.com","username":"ktychkova"},"change_message_id":"4a4e637944a1aec7dd036c2d47a1864de46d8cc7","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        try:"},{"line_number":270,"context_line":"            conn \u003d ldap.initialize(conf.ldap_url)"},{"line_number":271,"context_line":"        except Exception:"},{"line_number":272,"context_line":"            return False"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        try:"},{"line_number":275,"context_line":"            conn.simple_bind_s(conf.ldap_admin, conf.ldap_admin_password)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_2ea69510","line":272,"in_reply_to":"3a7e1126_acaf587c","updated":"2015-12-18 09:00:06.000000000","message":"Done","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":309,"context_line":"                    result \u003d True"},{"line_number":310,"context_line":"                    break"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        except Exception:"},{"line_number":313,"context_line":"            result \u003d False"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        conn.unbind_s()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_2cf2889b","line":312,"updated":"2015-12-17 02:17:24.000000000","message":"The above is an insanely large try block. Slim down the try block, and enumerate the exceptions you can expect in any given scenario. As-is, you\u0027re silently swallowing a LOT of possible errors, and the result would be a terrible operator/debugging experience.","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":17862,"name":"Kseniya Tychkova","email":"kseniya.tychkova@gmail.com","username":"ktychkova"},"change_message_id":"4a4e637944a1aec7dd036c2d47a1864de46d8cc7","unresolved":false,"context_lines":[{"line_number":309,"context_line":"                    result \u003d True"},{"line_number":310,"context_line":"                    break"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        except Exception:"},{"line_number":313,"context_line":"            result \u003d False"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        conn.unbind_s()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_4ea9a1de","line":312,"in_reply_to":"3a7e1126_2cf2889b","updated":"2015-12-18 09:00:06.000000000","message":"Done","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"}],"oslo_policy/opts.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                           \u0027be searched.  Missing or empty directories are \u0027"},{"line_number":45,"context_line":"                           \u0027ignored.\u0027),"},{"line_number":46,"context_line":"                    deprecated_group\u003d\u0027DEFAULT\u0027),"},{"line_number":47,"context_line":"    cfg.StrOpt(\u0027ldap_url\u0027,"},{"line_number":48,"context_line":"               default\u003d\u0027ldap://localhost\u0027,"},{"line_number":49,"context_line":"               help\u003d_(\u0027LDAP url.\u0027)),"},{"line_number":50,"context_line":"    cfg.StrOpt(\u0027ldap_admin\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_2c4928d1","line":47,"updated":"2015-12-17 02:17:24.000000000","message":"The breadth of options for this is a red flag that A) they should be in their own option group, and B) that the implementation possibly belongs in it\u0027s own repository.","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":17862,"name":"Kseniya Tychkova","email":"kseniya.tychkova@gmail.com","username":"ktychkova"},"change_message_id":"4a4e637944a1aec7dd036c2d47a1864de46d8cc7","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                           \u0027be searched.  Missing or empty directories are \u0027"},{"line_number":45,"context_line":"                           \u0027ignored.\u0027),"},{"line_number":46,"context_line":"                    deprecated_group\u003d\u0027DEFAULT\u0027),"},{"line_number":47,"context_line":"    cfg.StrOpt(\u0027ldap_url\u0027,"},{"line_number":48,"context_line":"               default\u003d\u0027ldap://localhost\u0027,"},{"line_number":49,"context_line":"               help\u003d_(\u0027LDAP url.\u0027)),"},{"line_number":50,"context_line":"    cfg.StrOpt(\u0027ldap_admin\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_2ecbf5a6","line":47,"in_reply_to":"3a7e1126_2c4928d1","updated":"2015-12-18 09:00:06.000000000","message":"Please add this comment to the spec review https://review.openstack.org/#/c/256431/","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"baea16ceb2198a01f125a394c76d08283e5432da","unresolved":false,"context_lines":[{"line_number":55,"context_line":"               help\u003d_(\u0027LDAP admin user.\u0027)),"},{"line_number":56,"context_line":"    cfg.StrOpt(\u0027ldap_admin_password\u0027,"},{"line_number":57,"context_line":"               default\u003d\u0027secret\u0027,"},{"line_number":58,"context_line":"               help\u003d_(\u0027LDAP admin password.\u0027)),"},{"line_number":59,"context_line":"    cfg.StrOpt(\u0027ldap_operation_class\u0027,"},{"line_number":60,"context_line":"               default\u003d\u0027rbacOperation\u0027,"},{"line_number":61,"context_line":"               help\u003d_(\u0027LDAP operation class\u0027)),"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_a8608136","line":58,"updated":"2016-01-12 18:37:35.000000000","message":"Set secret\u003dTrue","commit_id":"04f540c4cfacdc0af31175bdd983d92fd7373ece"}],"oslo_policy/policy.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        return jsonutils.dumps(out_rules, indent\u003d4)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"class Enforcer(object):"},{"line_number":313,"context_line":"    \"\"\"Responsible for loading and enforcing rules."},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    :param conf: A configuration object."}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_6c02d040","side":"PARENT","line":312,"updated":"2015-12-17 02:17:24.000000000","message":"I like this refactor, overall.","commit_id":"80974edc63cea1ce35212fb48dda11023b442fbe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":94,"context_line":"reference another defined rule by its name.  This allows for common"},{"line_number":95,"context_line":"checks to be defined once as a reusable rule, which is then referenced"},{"line_number":96,"context_line":"within other rules.  It also allows one to define a set of checks as a"},{"line_number":97,"context_line":"more descriptive name to aid in readabilty of policy.  A rule check is"},{"line_number":98,"context_line":"expressed as::"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    \"rule:\u003crule_name\u003e\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_ec7800fb","line":97,"updated":"2015-12-17 02:17:24.000000000","message":"Undo - the previous spelling was correct.","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":17862,"name":"Kseniya Tychkova","email":"kseniya.tychkova@gmail.com","username":"ktychkova"},"change_message_id":"4a4e637944a1aec7dd036c2d47a1864de46d8cc7","unresolved":false,"context_lines":[{"line_number":94,"context_line":"reference another defined rule by its name.  This allows for common"},{"line_number":95,"context_line":"checks to be defined once as a reusable rule, which is then referenced"},{"line_number":96,"context_line":"within other rules.  It also allows one to define a set of checks as a"},{"line_number":97,"context_line":"more descriptive name to aid in readabilty of policy.  A rule check is"},{"line_number":98,"context_line":"expressed as::"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    \"rule:\u003crule_name\u003e\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_eec5ed8d","line":97,"in_reply_to":"3a7e1126_ec7800fb","updated":"2015-12-18 09:00:06.000000000","message":"Done","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        \"\"\"Checks authorization of a rule against the target and credentials."},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        :param rule: The rule to evaluate."},{"line_number":327,"context_line":"        :type rule: string or :class:`BaseCheck`"},{"line_number":328,"context_line":"        :param dict target: As much information about the object being operated"},{"line_number":329,"context_line":"                            on as possible."},{"line_number":330,"context_line":"        :param dict creds: As much information about the user performing the"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_6c8970ca","line":327,"updated":"2015-12-17 02:17:24.000000000","message":"++","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        \"\"\"Checks authorization of a string rule against the target and credentials."},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        :param rule: The rule to evaluate."},{"line_number":366,"context_line":"        :type rule: string or :class:`BaseCheck`"},{"line_number":367,"context_line":"        :param dict target: As much information about the object being operated"},{"line_number":368,"context_line":"                            on as possible."},{"line_number":369,"context_line":"        :param dict creds: As much information about the user performing the"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_ec9480e9","line":366,"updated":"2015-12-17 02:17:24.000000000","message":"string only","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":17862,"name":"Kseniya Tychkova","email":"kseniya.tychkova@gmail.com","username":"ktychkova"},"change_message_id":"4a4e637944a1aec7dd036c2d47a1864de46d8cc7","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        \"\"\"Checks authorization of a string rule against the target and credentials."},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        :param rule: The rule to evaluate."},{"line_number":366,"context_line":"        :type rule: string or :class:`BaseCheck`"},{"line_number":367,"context_line":"        :param dict target: As much information about the object being operated"},{"line_number":368,"context_line":"                            on as possible."},{"line_number":369,"context_line":"        :param dict creds: As much information about the user performing the"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_8e3b099c","line":366,"in_reply_to":"3a7e1126_ec9480e9","updated":"2015-12-18 09:00:06.000000000","message":"Done","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"}],"oslo_policy/tests/base.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        self.config_dir \u003d self.useFixture(fixtures.TempDir()).path"},{"line_number":34,"context_line":"        self.conf(args\u003d[\u0027--config-dir\u0027, self.config_dir])"},{"line_number":35,"context_line":"        self.enforcer \u003d policy.Enforcer(self.conf)"},{"line_number":36,"context_line":"        self.ldap_enforcer \u003d policy.LDAPEnforcer(self.conf)"},{"line_number":37,"context_line":"        self.addCleanup(self.enforcer.clear)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def get_config_file_fullname(self, filename):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_ec624016","line":36,"updated":"2015-12-17 02:17:24.000000000","message":"Shouldn\u0027t the ldap enforcer just replace self.enforcer if it\u0027s configured to use LDAP? I don\u0027t understand why you\u0027d need both / why LDAP has to be special.","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"},{"author":{"_account_id":17862,"name":"Kseniya Tychkova","email":"kseniya.tychkova@gmail.com","username":"ktychkova"},"change_message_id":"4a4e637944a1aec7dd036c2d47a1864de46d8cc7","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        self.config_dir \u003d self.useFixture(fixtures.TempDir()).path"},{"line_number":34,"context_line":"        self.conf(args\u003d[\u0027--config-dir\u0027, self.config_dir])"},{"line_number":35,"context_line":"        self.enforcer \u003d policy.Enforcer(self.conf)"},{"line_number":36,"context_line":"        self.ldap_enforcer \u003d policy.LDAPEnforcer(self.conf)"},{"line_number":37,"context_line":"        self.addCleanup(self.enforcer.clear)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def get_config_file_fullname(self, filename):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_0ecb9973","line":36,"in_reply_to":"3a7e1126_ec624016","updated":"2015-12-18 09:00:06.000000000","message":"It is topic for discussion: oslo.policy is a lib. I\u0027m not sure it should have option to select backend. I think oslo.policy should have different backends and keystone or other components should select which backend of oslo.policy they want to use. Let\u0027s continue this discussion in spec review: https://review.openstack.org/#/c/256431/","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"}],"requirements.txt":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8d56bc91aa3cca663d1221b9a308fb85531ea0b4","unresolved":false,"context_lines":[{"line_number":8,"context_line":"oslo.serialization\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":9,"context_line":"oslo.utils!\u003d2.6.0,\u003e\u003d2.4.0 # Apache-2.0"},{"line_number":10,"context_line":"six\u003e\u003d1.9.0"},{"line_number":11,"context_line":"python-ldap\u003e\u003d2.4.21"}],"source_content_type":"text/plain","patch_set":4,"id":"3a7e1126_0c1d4c73","line":11,"updated":"2015-12-17 02:17:24.000000000","message":"This requirement should be added in setup.cfg using [extras], like:\n\n  https://github.com/openstack/keystone/blob/836c11cafc176594c31a4fe4d20459fd52ed6c40/setup.cfg#L23-L26","commit_id":"93f3f21c60f96aba980307294d3fca86149d3287"}]}
