)]}'
{"barbican/api/controllers/orders.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a684019ca74ba8462071e897f8194db185d856f1","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            _order_cannot_be_updated_if_not_pending(order_model.status)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        updated_meta \u003d body.get(\u0027meta\u0027)"},{"line_number":121,"context_line":"        validators.validate_ca_id("},{"line_number":122,"context_line":"            order_type, external_project_id, updated_meta,"},{"line_number":123,"context_line":"            self.ca_repo, self.project_ca_repo)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_5d48bfb2","line":121,"updated":"2015-02-05 22:45:38.000000000","message":"I\u0027m thinking that changing CA plugins after the fact would be bad news...so a check of current metadata ca_if to enforce the same as updated ca_id would be needed as well.","commit_id":"0dbff105c901308605da81d4dceb0c5404dd2406"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a684019ca74ba8462071e897f8194db185d856f1","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        order_type \u003d body.get(\u0027type\u0027)"},{"line_number":214,"context_line":"        LOG.debug(\u0027Processing order type %s\u0027, order_type)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        validators.validate_ca_id("},{"line_number":217,"context_line":"            order_type, external_project_id, body.get(\u0027meta\u0027),"},{"line_number":218,"context_line":"            self.ca_repo, self.project_ca_repo)"},{"line_number":219,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_1d000733","line":216,"updated":"2015-02-05 22:45:38.000000000","message":"Since this flow is used for all order types I\u0027d prefer to explicitly check here if it\u0027s a certificate type and then call the validation.","commit_id":"0dbff105c901308605da81d4dceb0c5404dd2406"}],"barbican/common/exception.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"3bee174c482249cf6c139a85099e5f2fe6462fed","unresolved":false,"context_lines":[{"line_number":390,"context_line":"class CANotDefinedForProject(BarbicanHTTPException):"},{"line_number":391,"context_line":"    message \u003d u._(\"CA specified by ca_id %(ca_id) not defined for project: \""},{"line_number":392,"context_line":"                  \"%(project_id)\")"},{"line_number":393,"context_line":"    status_code \u003d 403"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_78cfe8b3","line":393,"updated":"2015-03-17 21:16:55.000000000","message":"message is the message that will be logged in the server-side. client_message is missing here, and it\u0027s what will be returned to the client along with the status code.","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3ef4497c903d40335064cada54c8a9bdf9831aaa","unresolved":false,"context_lines":[{"line_number":390,"context_line":"class CANotDefinedForProject(BarbicanHTTPException):"},{"line_number":391,"context_line":"    message \u003d u._(\"CA specified by ca_id %(ca_id) not defined for project: \""},{"line_number":392,"context_line":"                  \"%(project_id)\")"},{"line_number":393,"context_line":"    status_code \u003d 403"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_0a45a942","line":393,"in_reply_to":"9a80dd14_78cfe8b3","updated":"2015-03-18 04:12:34.000000000","message":"done","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"}],"barbican/common/validators.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"77207a4574d34586483f389fca597b76e2f167ce","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def validate_ca_id(project_id, order_meta):"},{"line_number":63,"context_line":"    ca_id \u003d order_meta.get(\u0027ca_id\u0027, None)"},{"line_number":64,"context_line":"    if not ca_id:"},{"line_number":65,"context_line":"        return"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_ce856ed0","line":63,"updated":"2015-03-17 23:06:03.000000000","message":"\u0027, None\u0027 is not required here.","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3ef4497c903d40335064cada54c8a9bdf9831aaa","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def validate_ca_id(project_id, order_meta):"},{"line_number":63,"context_line":"    ca_id \u003d order_meta.get(\u0027ca_id\u0027, None)"},{"line_number":64,"context_line":"    if not ca_id:"},{"line_number":65,"context_line":"        return"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_4a76c1a4","line":63,"in_reply_to":"9a80dd14_ce856ed0","updated":"2015-03-18 04:12:34.000000000","message":"done","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"}],"barbican/plugin/dogtag.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a684019ca74ba8462071e897f8194db185d856f1","unresolved":false,"context_lines":[{"line_number":591,"context_line":"        except pki.CertNotFoundException:"},{"line_number":592,"context_line":"            return None"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"    def check_certificate_status(self, order_id, order_meta, plugin_meta,"},{"line_number":595,"context_line":"                                 barbican_meta):"},{"line_number":596,"context_line":"        \"\"\"Check the status of a certificate request."},{"line_number":597,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_4019b420","line":594,"updated":"2015-02-05 22:45:38.000000000","message":"I\u0027ve rethought this a bit, but I\u0027m thinking we should keep Barbican metadata separate from clients and plugins alike, as we might put things in there plugins don\u0027t care about. A more explicit contract where we spell out what is passes in the plugin methods would be better overall.","commit_id":"0dbff105c901308605da81d4dceb0c5404dd2406"}],"barbican/plugin/interface/certificate_manager.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"77207a4574d34586483f389fca597b76e2f167ce","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    \"\"\""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def __init__(self):"},{"line_number":237,"context_line":"        self.ca_name \u003d \"Base CA\"  # pragma: no cover"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    @abc.abstractmethod"},{"line_number":240,"context_line":"    def issue_certificate_request(self, order_id, order_meta, plugin_meta,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_b1c97bae","line":237,"updated":"2015-03-17 23:06:03.000000000","message":"I\u0027d prefer having this as an abstract method...so \u0027get_default_ca_name()\u0027 or \u0027get_default_ca_identifier()\u0027 or some such. I\u0027m concerned plugin developers will forget to override this property, and the abstract method would make things more explicit. This is probably likewise for the default/base signing cert and intermediates. Then the \u0027get_ca_info()\u0027 method would just be a template method to pull that data together into the response dict (for the cases when the plugin only returns one CA dict group...I think the typical case?).","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3ef4497c903d40335064cada54c8a9bdf9831aaa","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    \"\"\""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def __init__(self):"},{"line_number":237,"context_line":"        self.ca_name \u003d \"Base CA\"  # pragma: no cover"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    @abc.abstractmethod"},{"line_number":240,"context_line":"    def issue_certificate_request(self, order_id, order_meta, plugin_meta,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_d56092d1","line":237,"in_reply_to":"9a80dd14_b1c97bae","updated":"2015-03-18 04:12:34.000000000","message":"Done","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"77207a4574d34586483f389fca597b76e2f167ce","unresolved":false,"context_lines":[{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        default_info \u003d {"},{"line_number":370,"context_line":"            INFO_NAME: self.ca_name,"},{"line_number":371,"context_line":"            INFO_DESCRIPTION: \"Certificate Authority {0}\".format(self.ca_name),"},{"line_number":372,"context_line":"            INFO_CA_SIGNING_CERT: \"Undefined\","},{"line_number":373,"context_line":"            INFO_INTERMEDIATES: \"Undefined\","},{"line_number":374,"context_line":"            INFO_EXPIRATION: expiration.isoformat()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_2e052a14","line":371,"updated":"2015-03-17 23:06:03.000000000","message":"Please add a \u0027: \u0027 or \u0027 - \u0027 after \u0027Certificate Authority\u0027.","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3ef4497c903d40335064cada54c8a9bdf9831aaa","unresolved":false,"context_lines":[{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        default_info \u003d {"},{"line_number":370,"context_line":"            INFO_NAME: self.ca_name,"},{"line_number":371,"context_line":"            INFO_DESCRIPTION: \"Certificate Authority {0}\".format(self.ca_name),"},{"line_number":372,"context_line":"            INFO_CA_SIGNING_CERT: \"Undefined\","},{"line_number":373,"context_line":"            INFO_INTERMEDIATES: \"Undefined\","},{"line_number":374,"context_line":"            INFO_EXPIRATION: expiration.isoformat()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_159a2ac5","line":371,"in_reply_to":"9a80dd14_2e052a14","updated":"2015-03-18 04:12:34.000000000","message":"Done","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"3bee174c482249cf6c139a85099e5f2fe6462fed","unresolved":false,"context_lines":[{"line_number":370,"context_line":"            INFO_NAME: self.ca_name,"},{"line_number":371,"context_line":"            INFO_DESCRIPTION: \"Certificate Authority {0}\".format(self.ca_name),"},{"line_number":372,"context_line":"            INFO_CA_SIGNING_CERT: \"Undefined\","},{"line_number":373,"context_line":"            INFO_INTERMEDIATES: \"Undefined\","},{"line_number":374,"context_line":"            INFO_EXPIRATION: expiration.isoformat()"},{"line_number":375,"context_line":"        }"},{"line_number":376,"context_line":"        return {self.ca_name: default_info}"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_d8dff438","line":373,"updated":"2015-03-17 21:16:55.000000000","message":"why have it as undefined and not just empty?","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3ef4497c903d40335064cada54c8a9bdf9831aaa","unresolved":false,"context_lines":[{"line_number":370,"context_line":"            INFO_NAME: self.ca_name,"},{"line_number":371,"context_line":"            INFO_DESCRIPTION: \"Certificate Authority {0}\".format(self.ca_name),"},{"line_number":372,"context_line":"            INFO_CA_SIGNING_CERT: \"Undefined\","},{"line_number":373,"context_line":"            INFO_INTERMEDIATES: \"Undefined\","},{"line_number":374,"context_line":"            INFO_EXPIRATION: expiration.isoformat()"},{"line_number":375,"context_line":"        }"},{"line_number":376,"context_line":"        return {self.ca_name: default_info}"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_55a4a207","line":373,"in_reply_to":"9a80dd14_d1598f36","updated":"2015-03-18 04:12:34.000000000","message":"Done","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"77207a4574d34586483f389fca597b76e2f167ce","unresolved":false,"context_lines":[{"line_number":370,"context_line":"            INFO_NAME: self.ca_name,"},{"line_number":371,"context_line":"            INFO_DESCRIPTION: \"Certificate Authority {0}\".format(self.ca_name),"},{"line_number":372,"context_line":"            INFO_CA_SIGNING_CERT: \"Undefined\","},{"line_number":373,"context_line":"            INFO_INTERMEDIATES: \"Undefined\","},{"line_number":374,"context_line":"            INFO_EXPIRATION: expiration.isoformat()"},{"line_number":375,"context_line":"        }"},{"line_number":376,"context_line":"        return {self.ca_name: default_info}"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_d1598f36","line":373,"in_reply_to":"9a80dd14_d8dff438","updated":"2015-03-17 23:06:03.000000000","message":"I\u0027d prefer None here as well.","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"77207a4574d34586483f389fca597b76e2f167ce","unresolved":false,"context_lines":[{"line_number":530,"context_line":"            show_expired\u003dTrue)"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"        for old_ca in old_cas:"},{"line_number":533,"context_line":"            plugin_ca_id \u003d old_ca.plugin_ca_id"},{"line_number":534,"context_line":"            if plugin_ca_id not in new_ca_infos.keys():"},{"line_number":535,"context_line":"                self._delete_ca(old_ca)"},{"line_number":536,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_715f0376","line":533,"updated":"2015-03-17 23:06:03.000000000","message":"Yeah, the \u0027id\u0027 naming here is a bit confusing (seems like a FK)...plugin_ca_name or plugin_ca_identifier would be clearer to me, but alas already in the data model that way...","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"77207a4574d34586483f389fca597b76e2f167ce","unresolved":false,"context_lines":[{"line_number":538,"context_line":"                    old_ca,"},{"line_number":539,"context_line":"                    new_ca_infos[plugin_ca_id])"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        old_plugin_ca_id_list \u003d [ca.plugin_ca_id for ca in old_cas]"},{"line_number":542,"context_line":"        for new_plugin_ca_id, new_ca_info in new_ca_infos.items():"},{"line_number":543,"context_line":"            if new_plugin_ca_id not in old_plugin_ca_id_list:"},{"line_number":544,"context_line":"                self._add_ca(plugin_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_111fa771","line":541,"updated":"2015-03-17 23:06:03.000000000","message":"It might be cleaner to do something like this instead?:\n\nold_ids \u003d set([ca.plugin_ca_id for ca in old_cas])\nnew_ids \u003d set(new_ca_infos.keys())\nadd_ids \u003d new_ids - old_ids\nfor add_id in add_ids:\n    self._add_ca(plugin_name, add_id, new_ca_infos[add_id])","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3ef4497c903d40335064cada54c8a9bdf9831aaa","unresolved":false,"context_lines":[{"line_number":538,"context_line":"                    old_ca,"},{"line_number":539,"context_line":"                    new_ca_infos[plugin_ca_id])"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        old_plugin_ca_id_list \u003d [ca.plugin_ca_id for ca in old_cas]"},{"line_number":542,"context_line":"        for new_plugin_ca_id, new_ca_info in new_ca_infos.items():"},{"line_number":543,"context_line":"            if new_plugin_ca_id not in old_plugin_ca_id_list:"},{"line_number":544,"context_line":"                self._add_ca(plugin_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_9038e8d5","line":541,"in_reply_to":"9a80dd14_111fa771","updated":"2015-03-18 04:12:34.000000000","message":"Done","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ba729b1fa705d654da4802cfbd7b62ad1b7424a8","unresolved":false,"context_lines":[{"line_number":360,"context_line":"            }"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        \"\"\""},{"line_number":363,"context_line":"        name \u003d type(self).__name__"},{"line_number":364,"context_line":"        expiration \u003d (datetime.datetime.utcnow() +"},{"line_number":365,"context_line":"                      datetime.timedelta(days\u003dCA_INFO_DEFAULT_EXPIRATION_DAYS))"},{"line_number":366,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_ac4cc29e","line":363,"updated":"2015-03-17 23:16:16.000000000","message":"I think this works, although the plugin name utility might give a more fool-proof name, guaranteed to not collide with other plugins in different application/folder paths even if the class names are the same?","commit_id":"42bc74bc35aceb3c45a8562174a1ce247d7d3a05"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"2d75d001f6bdb8a4474bca2c14fb7d72cbfbff1e","unresolved":false,"context_lines":[{"line_number":360,"context_line":"            }"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        \"\"\""},{"line_number":363,"context_line":"        name \u003d type(self).__name__"},{"line_number":364,"context_line":"        expiration \u003d (datetime.datetime.utcnow() +"},{"line_number":365,"context_line":"                      datetime.timedelta(days\u003dCA_INFO_DEFAULT_EXPIRATION_DAYS))"},{"line_number":366,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_f044c448","line":363,"in_reply_to":"9a80dd14_ac4cc29e","updated":"2015-03-18 04:14:13.000000000","message":"will go back to the old way of doing it - along the lines of your suggestions","commit_id":"42bc74bc35aceb3c45a8562174a1ce247d7d3a05"}],"barbican/tasks/certificate_resources.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"77207a4574d34586483f389fca597b76e2f167ce","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    # for a plugin are expired."},{"line_number":82,"context_line":"    cert.CertificatePluginManager(repos).refresh_ca_table()"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    ca_id \u003d _get_ca_id(order_model.meta, project_model.id)"},{"line_number":85,"context_line":"    if ca_id:"},{"line_number":86,"context_line":"        barbican_meta_dto.plugin_ca_id \u003d ca_id"},{"line_number":87,"context_line":"        cert_plugin \u003d cert.CertificatePluginManager().get_plugin_by_ca_id("}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_ccaf367c","line":84,"updated":"2015-03-17 23:06:03.000000000","message":"I\u0027m thinking of retry cases when this method could be called multiple times if the CA is not available...could you pass the barbican_meta_dto into this method, and try to get the ca_id from it first? If it\u0027s in there, just return it. Otherwise do the rest of the logic in that method...","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"77207a4574d34586483f389fca597b76e2f167ce","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"def _get_ca_id(order_meta, project_id):"},{"line_number":202,"context_line":"    ca_id \u003d order_meta.get(cert.CA_ID, None)"},{"line_number":203,"context_line":"    if ca_id:"},{"line_number":204,"context_line":"        return ca_id"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_2cc8d274","line":202,"updated":"2015-03-17 23:06:03.000000000","message":"\u0027, None\u0027 is not required with get().","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3ef4497c903d40335064cada54c8a9bdf9831aaa","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"def _get_ca_id(order_meta, project_id):"},{"line_number":202,"context_line":"    ca_id \u003d order_meta.get(cert.CA_ID, None)"},{"line_number":203,"context_line":"    if ca_id:"},{"line_number":204,"context_line":"        return ca_id"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_ea8e9578","line":202,"in_reply_to":"9a80dd14_2cc8d274","updated":"2015-03-18 04:12:34.000000000","message":"Done","commit_id":"f7e198a50ed1fbab4f52952e4bebb6b845194139"}]}
