)]}'
{"barbican/plugin/interface/secret_store.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9b29a3d082c0c66e8967197d86a2fa2756911e57","unresolved":false,"context_lines":[{"line_number":216,"context_line":"            raise ValueError(u._(\"Algorithm cannot be None\"))"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        if alg not in KeyAlgorithm()._get_list():"},{"line_number":219,"context_line":"            raise ValueError(u._(\"Algorithm \u0027{0}\u0027 is not supported by \""},{"line_number":220,"context_line":"                             \"Barbican\").format(alg))"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        if bit_length is None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_1fb99516","line":219,"updated":"2014-08-05 19:07:36.000000000","message":"I think this is failing the tempest gating tests because the algorithm is somewhere getting uppercased to \"AES\" which then can\u0027t be found in this list (which has lowercased \"aes\").\n\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources Traceback (most recent call last):\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources   File \"/opt/stack/new/barbican/barbican/tasks/resources.py\", line 68, in process\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources     self.handle_processing(entity, *args, **kwargs)\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources   File \"/opt/stack/new/barbican/barbican/tasks/resources.py\", line 165, in handle_processing\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources     self.handle_order(order)\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources   File \"/opt/stack/new/barbican/barbican/tasks/resources.py\", line 198, in handle_order\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources     tenant, self.repos)\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources   File \"/opt/stack/new/barbican/barbican/plugin/resources.py\", line 103, in generate_secret\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources     mode\u003dspec.get(\u0027mode\u0027))\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources   File \"/opt/stack/new/barbican/barbican/plugin/interface/secret_store.py\", line 220, in __init__\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources     \"Barbican\").format(alg))\n2014-07-28 19:16:42.379 25326 TRACE barbican.tasks.resources ValueError: Algorithm \u0027AES\u0027 is not supported by Barbican","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":216,"context_line":"            raise ValueError(u._(\"Algorithm cannot be None\"))"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        if alg not in KeyAlgorithm()._get_list():"},{"line_number":219,"context_line":"            raise ValueError(u._(\"Algorithm \u0027{0}\u0027 is not supported by \""},{"line_number":220,"context_line":"                             \"Barbican\").format(alg))"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        if bit_length is None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_a3723310","line":219,"in_reply_to":"baada198_1fb99516","updated":"2014-08-06 15:11:12.000000000","message":"Ok, thanks!","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9b29a3d082c0c66e8967197d86a2fa2756911e57","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        if bit_length is None:"},{"line_number":223,"context_line":"            raise ValueError(u._(\"Bit length cannot be None\"))"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        #if type(bit_length) !\u003d int:"},{"line_number":226,"context_line":"        #    raise SecretMethodArgumentSuppliedInvalid("},{"line_number":227,"context_line":"        #        int, type(bit_length))"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_9f3cc594","line":225,"updated":"2014-08-05 19:07:36.000000000","message":"why commented out?","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        if bit_length is None:"},{"line_number":223,"context_line":"            raise ValueError(u._(\"Bit length cannot be None\"))"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        #if type(bit_length) !\u003d int:"},{"line_number":226,"context_line":"        #    raise SecretMethodArgumentSuppliedInvalid("},{"line_number":227,"context_line":"        #        int, type(bit_length))"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_03611f38","line":225,"in_reply_to":"baada198_606e5402","updated":"2014-08-06 15:11:12.000000000","message":"will do","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7879df88afde52cd28486937baa296b61c8e22c","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        if bit_length is None:"},{"line_number":223,"context_line":"            raise ValueError(u._(\"Bit length cannot be None\"))"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        #if type(bit_length) !\u003d int:"},{"line_number":226,"context_line":"        #    raise SecretMethodArgumentSuppliedInvalid("},{"line_number":227,"context_line":"        #        int, type(bit_length))"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_606e5402","line":225,"in_reply_to":"baada198_9f3cc594","updated":"2014-08-06 13:52:00.000000000","message":"Please remove dead code","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"}],"barbican/plugin/kmip_secret_store.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9b29a3d082c0c66e8967197d86a2fa2756911e57","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.secret_factory \u003d SecretFactory()"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        credential_type \u003d CredentialType.USERNAME_AND_PASSWORD"},{"line_number":89,"context_line":"        credential_value \u003d {\u0027Username\u0027: conf.kmip.username,"},{"line_number":90,"context_line":"                            \u0027Password\u0027: conf.kmip.password}"},{"line_number":91,"context_line":"        self.credential \u003d self.credential_factory.create_credential("},{"line_number":92,"context_line":"            credential_type,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_3ffbb9bf","line":89,"updated":"2014-08-05 19:07:36.000000000","message":"nit - do these key names have to start with uppercase?  If not I think it looks better with all lowercase.  Just my $0.02","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        self.secret_factory \u003d SecretFactory()"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        credential_type \u003d CredentialType.USERNAME_AND_PASSWORD"},{"line_number":89,"context_line":"        credential_value \u003d {\u0027Username\u0027: conf.kmip.username,"},{"line_number":90,"context_line":"                            \u0027Password\u0027: conf.kmip.password}"},{"line_number":91,"context_line":"        self.credential \u003d self.credential_factory.create_credential("},{"line_number":92,"context_line":"            credential_type,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_2331c359","line":89,"in_reply_to":"baada198_3ffbb9bf","updated":"2014-08-06 15:11:12.000000000","message":"Yes, though that might be a good idea to make them case insensitive in pyKMIP in the future.","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7879df88afde52cd28486937baa296b61c8e22c","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            credential_value)"},{"line_number":94,"context_line":"        self.client \u003d KMIPProxy(conf.kmip.host, conf.kmip.port)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def generate_symmetric_key(self, key_spec, context\u003dNone):"},{"line_number":97,"context_line":"        if type(key_spec) !\u003d secret_store.KeySpec:"},{"line_number":98,"context_line":"            raise secret_store.SecretMethodArgumentSuppliedInvalid("},{"line_number":99,"context_line":"                secret_store.KeySpec, type(key_spec))"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_db12b1fc","line":96,"updated":"2014-08-06 13:52:00.000000000","message":"Some log statements for each of the interface methods would be helpful for debugging.","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            credential_value)"},{"line_number":94,"context_line":"        self.client \u003d KMIPProxy(conf.kmip.host, conf.kmip.port)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def generate_symmetric_key(self, key_spec, context\u003dNone):"},{"line_number":97,"context_line":"        if type(key_spec) !\u003d secret_store.KeySpec:"},{"line_number":98,"context_line":"            raise secret_store.SecretMethodArgumentSuppliedInvalid("},{"line_number":99,"context_line":"                secret_store.KeySpec, type(key_spec))"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8337ef4a","line":96,"in_reply_to":"baada198_db12b1fc","updated":"2014-08-06 15:11:12.000000000","message":"Ok, will do","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7879df88afde52cd28486937baa296b61c8e22c","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        attributes \u003d [algorithm, usage_mask, length]"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            self.client.open()"},{"line_number":129,"context_line":"            result \u003d self.client.create(object_type,"},{"line_number":130,"context_line":"                                        attributes,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_5b278163","line":127,"updated":"2014-08-06 13:52:00.000000000","message":"Add log statement for opening client connection.","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        attributes \u003d [algorithm, usage_mask, length]"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        try:"},{"line_number":128,"context_line":"            self.client.open()"},{"line_number":129,"context_line":"            result \u003d self.client.create(object_type,"},{"line_number":130,"context_line":"                                        attributes,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_0313dfb7","line":127,"in_reply_to":"baada198_5b278163","updated":"2014-08-06 15:11:12.000000000","message":"will do","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7879df88afde52cd28486937baa296b61c8e22c","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        mask_flags \u003d [enums.CryptographicUsageMask.ENCRYPT,"},{"line_number":171,"context_line":"                      enums.CryptographicUsageMask.DECRYPT]"},{"line_number":172,"context_line":"        usage_mask \u003d self.attribute_factory.create_attribute(attribute_type,"},{"line_number":173,"context_line":"                                                             mask_flags)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        attributes \u003d [usage_mask]"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_7b90c54f","line":173,"updated":"2014-08-06 13:52:00.000000000","message":"This is duplicate of lines 114-119. You could add a helper method to retrieve the usage mask.","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        mask_flags \u003d [enums.CryptographicUsageMask.ENCRYPT,"},{"line_number":171,"context_line":"                      enums.CryptographicUsageMask.DECRYPT]"},{"line_number":172,"context_line":"        usage_mask \u003d self.attribute_factory.create_attribute(attribute_type,"},{"line_number":173,"context_line":"                                                             mask_flags)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        attributes \u003d [usage_mask]"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_430dd78e","line":173,"in_reply_to":"baada198_7b90c54f","updated":"2014-08-06 15:11:12.000000000","message":"will do!","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9b29a3d082c0c66e8967197d86a2fa2756911e57","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        else:"},{"line_number":317,"context_line":"            return None"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def _map_algorithm_ss_to_kmip(self, algorithm):"},{"line_number":320,"context_line":"        if algorithm \u003d\u003d secret_store.KeyAlgorithm.AES:"},{"line_number":321,"context_line":"            return enums.CryptographicAlgorithm.AES"},{"line_number":322,"context_line":"        elif algorithm \u003d\u003d secret_store.KeyAlgorithm.DES:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_7fba91e1","line":319,"updated":"2014-08-05 19:07:36.000000000","message":"would you consider building a dict and using that rather than a big if/then/else?","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7879df88afde52cd28486937baa296b61c8e22c","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        else:"},{"line_number":317,"context_line":"            return None"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def _map_algorithm_ss_to_kmip(self, algorithm):"},{"line_number":320,"context_line":"        if algorithm \u003d\u003d secret_store.KeyAlgorithm.AES:"},{"line_number":321,"context_line":"            return enums.CryptographicAlgorithm.AES"},{"line_number":322,"context_line":"        elif algorithm \u003d\u003d secret_store.KeyAlgorithm.DES:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_9bc2f933","line":319,"in_reply_to":"baada198_7fba91e1","updated":"2014-08-06 13:52:00.000000000","message":"+1","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        else:"},{"line_number":317,"context_line":"            return None"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def _map_algorithm_ss_to_kmip(self, algorithm):"},{"line_number":320,"context_line":"        if algorithm \u003d\u003d secret_store.KeyAlgorithm.AES:"},{"line_number":321,"context_line":"            return enums.CryptographicAlgorithm.AES"},{"line_number":322,"context_line":"        elif algorithm \u003d\u003d secret_store.KeyAlgorithm.DES:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_831e0fbb","line":319,"in_reply_to":"baada198_9bc2f933","updated":"2014-08-06 15:11:12.000000000","message":"Will do","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9b29a3d082c0c66e8967197d86a2fa2756911e57","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        else:"},{"line_number":339,"context_line":"            return None"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def _map_algorithm_kmip_to_ss(self, algorithm_num):"},{"line_number":342,"context_line":"        algorithm \u003d enums.CryptographicAlgorithm(algorithm_num)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        if algorithm \u003d\u003d enums.CryptographicAlgorithm.AES:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_1fc35559","line":341,"updated":"2014-08-05 19:07:36.000000000","message":"same as above","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"920005b0aa98acf43964fe45078ada9c32e70d1f","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import collections"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from kmip.core import enums"},{"line_number":27,"context_line":"from kmip.core.factories.attributes import AttributeFactory"},{"line_number":28,"context_line":"from kmip.core.factories.credentials import CredentialFactory"},{"line_number":29,"context_line":"from kmip.core.factories.credentials import CredentialType"},{"line_number":30,"context_line":"from kmip.core.factories.secrets import SecretFactory"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_75b27897","line":27,"updated":"2014-08-07 04:36:06.000000000","message":"We have been trying to make imports hacking friendly, so something like this:\nfrom kmip.core.factories import attributes\nAnd then prepend AttributeFactory below with \u0027attributes\u0027.","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"783a6641ba2f923e2c4af8a91dfd26d824beba7c","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import collections"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from kmip.core import enums"},{"line_number":27,"context_line":"from kmip.core.factories.attributes import AttributeFactory"},{"line_number":28,"context_line":"from kmip.core.factories.credentials import CredentialFactory"},{"line_number":29,"context_line":"from kmip.core.factories.credentials import CredentialType"},{"line_number":30,"context_line":"from kmip.core.factories.secrets import SecretFactory"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_d04500b5","line":27,"in_reply_to":"baada198_75b27897","updated":"2014-08-07 15:49:15.000000000","message":"Ok, will change","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"920005b0aa98acf43964fe45078ada9c32e70d1f","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            ss.KeyAlgorithm.DES: enums.CryptographicAlgorithm.DES,"},{"line_number":87,"context_line":"            ss.KeyAlgorithm.DESEDE: enums.CryptographicAlgorithm.TRIPLE_DES}"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        self.attribute_factory \u003d AttributeFactory()"},{"line_number":90,"context_line":"        self.credential_factory \u003d CredentialFactory()"},{"line_number":91,"context_line":"        self.secret_factory \u003d SecretFactory()"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_f57cc8b8","line":89,"updated":"2014-08-07 04:36:06.000000000","message":"Just making sure that these stateful members are ok to call in a multi-threaded, multi API/Worker node deployment vs creating/using within the generate method calls below.","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"783a6641ba2f923e2c4af8a91dfd26d824beba7c","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            ss.KeyAlgorithm.DES: enums.CryptographicAlgorithm.DES,"},{"line_number":87,"context_line":"            ss.KeyAlgorithm.DESEDE: enums.CryptographicAlgorithm.TRIPLE_DES}"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        self.attribute_factory \u003d AttributeFactory()"},{"line_number":90,"context_line":"        self.credential_factory \u003d CredentialFactory()"},{"line_number":91,"context_line":"        self.secret_factory \u003d SecretFactory()"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_b0d24ccd","line":89,"in_reply_to":"baada198_f57cc8b8","updated":"2014-08-07 15:49:15.000000000","message":"I don\u0027t know why they wouldn\u0027t be, but I can move them into the method calls anyway","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"920005b0aa98acf43964fe45078ada9c32e70d1f","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        algorithm_name \u003d self._map_algorithm_ss_to_kmip(key_spec.alg)"},{"line_number":116,"context_line":"        algorithm \u003d self.attribute_factory.create_attribute(attribute_type,"},{"line_number":117,"context_line":"                                                            algorithm_name)"},{"line_number":118,"context_line":"        LOG.debug(attribute_debug_msg"},{"line_number":119,"context_line":"                  .format(attribute_type.value, algorithm_name.name))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # Create usage mask attribute"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_3514804f","line":118,"updated":"2014-08-07 04:36:06.000000000","message":"I think there is a more effiicient format available here, whereby the attribute_debug_msg is passed in to the debug() call, and then args are passed into as comma separated args to the debug() call. So only if log debug is activated will the format processing occur.","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"783a6641ba2f923e2c4af8a91dfd26d824beba7c","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        algorithm_name \u003d self._map_algorithm_ss_to_kmip(key_spec.alg)"},{"line_number":116,"context_line":"        algorithm \u003d self.attribute_factory.create_attribute(attribute_type,"},{"line_number":117,"context_line":"                                                            algorithm_name)"},{"line_number":118,"context_line":"        LOG.debug(attribute_debug_msg"},{"line_number":119,"context_line":"                  .format(attribute_type.value, algorithm_name.name))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        # Create usage mask attribute"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_50e570a2","line":118,"in_reply_to":"baada198_3514804f","updated":"2014-08-07 15:49:15.000000000","message":"Ok, I\u0027ll look into that!","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"920005b0aa98acf43964fe45078ada9c32e70d1f","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        attribute_type \u003d enums.AttributeType.CRYPTOGRAPHIC_LENGTH"},{"line_number":126,"context_line":"        length \u003d self.attribute_factory.create_attribute(attribute_type,"},{"line_number":127,"context_line":"                                                         key_spec.bit_length)"},{"line_number":128,"context_line":"        LOG.debug(attribute_debug_msg"},{"line_number":129,"context_line":"                  .format(attribute_type.value, key_spec.bit_length))"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        attributes \u003d [algorithm, usage_mask, length]"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_58fe8b05","line":128,"updated":"2014-08-07 04:36:06.000000000","message":"Same as above please","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"920005b0aa98acf43964fe45078ada9c32e70d1f","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            raise ss.SecretMethodArgumentSuppliedInvalid("},{"line_number":167,"context_line":"                type(ss.SecretDTO), type(secret_dto))"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        if not self.store_secret_supports(secret_dto.key_spec):"},{"line_number":170,"context_line":"            raise ss.SecretAlgorithmNotSupportedException("},{"line_number":171,"context_line":"                secret_dto.key_spec.alg)"},{"line_number":172,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_d85e1b14","line":169,"updated":"2014-08-07 04:36:06.000000000","message":"The contract with barbican core is to first call the store_secret_supports method, and then only if that is true should store_secret() be called. So this test/block is not necessary and adds more load to the synchronous API node.","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"920005b0aa98acf43964fe45078ada9c32e70d1f","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        try:"},{"line_number":205,"context_line":"            self.client.open()"},{"line_number":206,"context_line":"            LOG.debug(\"Opened connection to KMIP client\")"},{"line_number":207,"context_line":"            result \u003d self.client.register(object_type,"},{"line_number":208,"context_line":"                                          template_attribute,"},{"line_number":209,"context_line":"                                          secret,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_d8d37b61","line":206,"updated":"2014-08-07 04:36:06.000000000","message":"Please make this message (and similar .open() debug messages) specific to the flow...so this one could say:\nOpened connection to KMIP client for secret store","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"920005b0aa98acf43964fe45078ada9c32e70d1f","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    def get_secret(self, secret_metadata, context\u003dNone):"},{"line_number":231,"context_line":"        LOG.debug(\"Starting secret retreival\")"},{"line_number":232,"context_line":"        if type(secret_metadata) !\u003d dict:"},{"line_number":233,"context_line":"            raise ss.SecretMethodArgumentSuppliedInvalid("},{"line_number":234,"context_line":"                dict, type(secret_metadata))"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_f88bdf66","line":232,"updated":"2014-08-07 04:36:06.000000000","message":"Per contract, this will always be a dict.","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":59,"context_line":"               )"},{"line_number":60,"context_line":"]"},{"line_number":61,"context_line":"CONF.register_group(kmip_opt_group)"},{"line_number":62,"context_line":"CONF.register_opts(kmip_opts, group\u003dkmip_opt_group)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"attribute_debug_msg \u003d \"Created attribute type %s with value %s\""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_4e6f7761","line":62,"updated":"2014-08-08 09:56:38.000000000","message":"shouldn\u0027t these options also be documented in the barbican configuration file in the etc directory?","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"bab7468b2165514ec2afc13d76c6ae6452c589eb","unresolved":false,"context_lines":[{"line_number":59,"context_line":"               )"},{"line_number":60,"context_line":"]"},{"line_number":61,"context_line":"CONF.register_group(kmip_opt_group)"},{"line_number":62,"context_line":"CONF.register_opts(kmip_opts, group\u003dkmip_opt_group)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"attribute_debug_msg \u003d \"Created attribute type %s with value %s\""},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_438665bb","line":62,"in_reply_to":"baada198_4e6f7761","updated":"2014-08-08 14:36:38.000000000","message":"The plugin will use these default values if the options aren\u0027t defined in the config file, but I will add them to the config file for documentation\u0027s sake.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.valid_alg_dict[ss.KeyAlgorithm.DES] \\"},{"line_number":79,"context_line":"            .extend([56])"},{"line_number":80,"context_line":"        self.valid_alg_dict[ss.KeyAlgorithm.DESEDE] \\"},{"line_number":81,"context_line":"            .extend([56, 112, 168])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        self.ss_to_kmip_dict \u003d {"},{"line_number":84,"context_line":"            ss.KeyAlgorithm.AES: enums.CryptographicAlgorithm.AES,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_eeb4cb82","line":81,"updated":"2014-08-08 09:56:38.000000000","message":"even though I think your defaultdict approach is alright. I think it might end up being a bit confusing. You should either change the variable name or the approach, since it\u0027s not very clear from only the name that this is actually a dict that maps the algorithm to the valid bit lengths; So the name should reflect that.\n\nEither that, or you could convine these two dicts (the bit length mapping, to the kmip cryptographic enum). For example, the AES entry could look like the following:\n\n{\nss.KeyAlgorithm.AES: {\n                                \u0027valid_bit_lengths\u0027: [128, 192, 256],\n                                \u0027kmip_algorithm_enum\u0027: \\\n                                    enums.CryptographicAlgorithm.AES\n                                },\n}\n\nOf course, you could find better names than the ones I thought of :).","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"bab7468b2165514ec2afc13d76c6ae6452c589eb","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.valid_alg_dict[ss.KeyAlgorithm.DES] \\"},{"line_number":79,"context_line":"            .extend([56])"},{"line_number":80,"context_line":"        self.valid_alg_dict[ss.KeyAlgorithm.DESEDE] \\"},{"line_number":81,"context_line":"            .extend([56, 112, 168])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        self.ss_to_kmip_dict \u003d {"},{"line_number":84,"context_line":"            ss.KeyAlgorithm.AES: enums.CryptographicAlgorithm.AES,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_a3a02137","line":81,"in_reply_to":"baada198_eeb4cb82","updated":"2014-08-08 14:36:38.000000000","message":"Fair, I\u0027ll change it.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.valid_alg_dict[ss.KeyAlgorithm.DESEDE] \\"},{"line_number":81,"context_line":"            .extend([56, 112, 168])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        self.ss_to_kmip_dict \u003d {"},{"line_number":84,"context_line":"            ss.KeyAlgorithm.AES: enums.CryptographicAlgorithm.AES,"},{"line_number":85,"context_line":"            ss.KeyAlgorithm.DES: enums.CryptographicAlgorithm.DES,"},{"line_number":86,"context_line":"            ss.KeyAlgorithm.DESEDE: enums.CryptographicAlgorithm.TRIPLE_DES}"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_8e60af0e","line":83,"updated":"2014-08-08 09:56:38.000000000","message":"the name of this dict is also a bit confusing, so you could either change the name of this, or take the approach that I mentioned earlier.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            credential_value)"},{"line_number":94,"context_line":"        self.client \u003d KMIPProxy(conf.kmip.host, conf.kmip.port)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def generate_symmetric_key(self, key_spec, context\u003dNone):"},{"line_number":97,"context_line":"        LOG.debug(\"Starting symmetric key generation with KMIP plugin\")"},{"line_number":98,"context_line":"        if not self.generate_supports(key_spec):"},{"line_number":99,"context_line":"            raise ss.SecretAlgorithmNotSupportedException("}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_313b82c9","line":96,"updated":"2014-08-08 09:56:38.000000000","message":"documentation? Don\u0027t forget to state the exceptions that could occur directly from this function.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        object_type \u003d enums.ObjectType.SYMMETRIC_KEY"},{"line_number":103,"context_line":"        attribute_factory \u003d attributes.AttributeFactory()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        # Create algorithm attribute"},{"line_number":106,"context_line":"        attribute_type \u003d enums.AttributeType.CRYPTOGRAPHIC_ALGORITHM"},{"line_number":107,"context_line":"        algorithm_name \u003d self._map_algorithm_ss_to_kmip(key_spec.alg)"},{"line_number":108,"context_line":"        algorithm \u003d attribute_factory.create_attribute(attribute_type,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_2e7163de","line":105,"updated":"2014-08-08 09:56:38.000000000","message":"Instead of having a comment here, you could write a separate function. This would make this whole function shorter, and at the same time easier to read.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                  attribute_type.value,"},{"line_number":112,"context_line":"                  algorithm_name.name)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        # Create usage mask attribute"},{"line_number":115,"context_line":"        usage_mask \u003d self._create_usage_mask_attribute()"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # Create bit length attribute"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_6e77dbd1","line":114,"updated":"2014-08-08 09:56:38.000000000","message":"I think this comment is unnecessary","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        # Create usage mask attribute"},{"line_number":115,"context_line":"        usage_mask \u003d self._create_usage_mask_attribute()"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # Create bit length attribute"},{"line_number":118,"context_line":"        attribute_type \u003d enums.AttributeType.CRYPTOGRAPHIC_LENGTH"},{"line_number":119,"context_line":"        length \u003d attribute_factory.create_attribute(attribute_type,"},{"line_number":120,"context_line":"                                                    key_spec.bit_length)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_0e5bbf55","line":117,"updated":"2014-08-08 09:56:38.000000000","message":"even though this is short, this could be a function.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"bab7468b2165514ec2afc13d76c6ae6452c589eb","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        # Create usage mask attribute"},{"line_number":115,"context_line":"        usage_mask \u003d self._create_usage_mask_attribute()"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # Create bit length attribute"},{"line_number":118,"context_line":"        attribute_type \u003d enums.AttributeType.CRYPTOGRAPHIC_LENGTH"},{"line_number":119,"context_line":"        length \u003d attribute_factory.create_attribute(attribute_type,"},{"line_number":120,"context_line":"                                                    key_spec.bit_length)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_033e2de3","line":117,"in_reply_to":"baada198_0e5bbf55","updated":"2014-08-08 14:36:38.000000000","message":"Ok I\u0027ll rework this whole attributes section","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        template_attribute \u003d kmip_objects.TemplateAttribute("},{"line_number":127,"context_line":"            attributes\u003dattribute_list)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        try:"},{"line_number":130,"context_line":"            self.client.open()"},{"line_number":131,"context_line":"            LOG.debug(\"Opened connection to KMIP client for secret store\")"},{"line_number":132,"context_line":"            result \u003d self.client.create(object_type,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_712a5a79","line":129,"updated":"2014-08-08 09:56:38.000000000","message":"All of this try...catch...else...finally could be a separate function, maybe something such as _do_create_symmetric_key or something else","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        LOG.debug(\"Starting secret storage with KMIP plugin\")"},{"line_number":160,"context_line":"        if not self.store_secret_supports(secret_dto.key_spec):"},{"line_number":161,"context_line":"            raise ss.SecretAlgorithmNotSupportedException("},{"line_number":162,"context_line":"                secret_dto.key_spec.alg)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        object_type \u003d self._map_type_ss_to_kmip(secret_dto.type)"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_f16caad1","line":162,"updated":"2014-08-08 09:56:38.000000000","message":"This could be moved to something called _assert_algorithm_is_supported, or something of the sort.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        algorithm_value \u003d self._map_algorithm_ss_to_kmip("},{"line_number":167,"context_line":"            secret_dto.key_spec.alg)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # Create usage mask attribute"},{"line_number":170,"context_line":"        usage_mask \u003d self._create_usage_mask_attribute()"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        attribute_list \u003d [usage_mask]"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_11659ee1","line":169,"updated":"2014-08-08 09:56:38.000000000","message":"same comment about making this another function.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        template_attribute \u003d kmip_objects.TemplateAttribute("},{"line_number":174,"context_line":"            attributes\u003dattribute_list)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        # Create secret object"},{"line_number":177,"context_line":"        secret_features \u003d {}"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        key_format_type \u003d enums.KeyFormatType.RAW"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_917fee68","line":176,"updated":"2014-08-08 09:56:38.000000000","message":"This whole filling of the attributes for the secret object, to the getting the secret from the factory, could be a function by itself, since it\u0027s not relevant for the understanding of this whole function.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        LOG.debug(\"Created secret object to be stored: %s\","},{"line_number":193,"context_line":"                  \u0027, \u0027.join(map(str, secret_features.values())))"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        try:"},{"line_number":196,"context_line":"            self.client.open()"},{"line_number":197,"context_line":"            LOG.debug(\"Opened connection to KMIP client for secret store\")"},{"line_number":198,"context_line":"            result \u003d self.client.register(object_type,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_f17aea74","line":195,"updated":"2014-08-08 09:56:38.000000000","message":"same statement as for the function above, this could be separated.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"614588d1319886624e38d81dffb8144349aa32c3","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        except Exception as e:"},{"line_number":230,"context_line":"            LOG.exception(\"Error opening or writing to client\")"},{"line_number":231,"context_line":"            raise ss.SecretGeneralException(str(e))"},{"line_number":232,"context_line":"        else:"},{"line_number":233,"context_line":"            if result.result_status.enum \u003d\u003d enums.ResultStatus.SUCCESS:"},{"line_number":234,"context_line":"                secret_block \u003d result.secret.key_block"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_516556ae","line":232,"updated":"2014-08-08 09:56:38.000000000","message":"This whole block in the else could be a functio by itself, to make its intent more obvious. This, I guess is the whole beef of this function, and it seems pretty hidden because of the nesting. This could be something like... _do_get_secret_dto(result, ...) or something like that.","commit_id":"5e6d801d50666b4d260d96c604cd4acefe8cf733"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                          \"uuid: %s\", result.uuid.value)"},{"line_number":141,"context_line":"                return {KMIPSecretStore.KEY_UUID: result.uuid.value}"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                msg \u003d \"Status: %s, Reason: %s, Message: %s\" % ("},{"line_number":144,"context_line":"                    result.result_status,"},{"line_number":145,"context_line":"                    result.result_reason,"},{"line_number":146,"context_line":"                    result.result_message)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_48fb9d47","line":143,"updated":"2014-08-11 19:20:19.000000000","message":"Ha, so since this generates a string outside of logging, this should be the newer \u0027.format()\u0027 based approach.  The %s in the LOG.debug below is fine though.","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"87366da0e6a8bd2ff547697e59a8f4beda77eadd","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                          \"uuid: %s\", result.uuid.value)"},{"line_number":141,"context_line":"                return {KMIPSecretStore.KEY_UUID: result.uuid.value}"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                msg \u003d \"Status: %s, Reason: %s, Message: %s\" % ("},{"line_number":144,"context_line":"                    result.result_status,"},{"line_number":145,"context_line":"                    result.result_reason,"},{"line_number":146,"context_line":"                    result.result_message)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_7ca2df97","line":143,"in_reply_to":"baada198_48fb9d47","updated":"2014-08-11 21:11:24.000000000","message":"Courtesy of Donald Stufft:\n\nSo, it\u0027s better to use the % formatting here, but not use the modulous operator itself.\nIOW do:\nLOG.debug(\"\u003d\u003d Getting transport key for %s\", keystone_id)\nIt will only do the interopolation if the log message will actually be written. Further more custom log handlers can get access to the keystone_id instead of just getting access to the string. This allows tools like Sentry to deduplicate log messages based on the string before it gets interpolated and the like.","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"5c3f9fd5b7fdf7332b11947e902751caed289ef8","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                          \"uuid: %s\", result.uuid.value)"},{"line_number":141,"context_line":"                return {KMIPSecretStore.KEY_UUID: result.uuid.value}"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                msg \u003d \"Status: %s, Reason: %s, Message: %s\" % ("},{"line_number":144,"context_line":"                    result.result_status,"},{"line_number":145,"context_line":"                    result.result_reason,"},{"line_number":146,"context_line":"                    result.result_message)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_a9aef8e1","line":143,"in_reply_to":"baada198_7ca2df97","updated":"2014-08-11 21:44:01.000000000","message":"Done","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"87366da0e6a8bd2ff547697e59a8f4beda77eadd","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        To store a secret in KMIP, the attributes must be known."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        :param secret_dto: SecretDTO of the secret to be stored"},{"line_number":163,"context_line":"        :returns: Dictionary holding the key_uuid assigned by KMIP"},{"line_number":164,"context_line":"        :raises: SecretGeneralException"},{"line_number":165,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_bc05577a","line":162,"updated":"2014-08-11 21:11:24.000000000","message":"also there is a context parameter","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"5c3f9fd5b7fdf7332b11947e902751caed289ef8","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        To store a secret in KMIP, the attributes must be known."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        :param secret_dto: SecretDTO of the secret to be stored"},{"line_number":163,"context_line":"        :returns: Dictionary holding the key_uuid assigned by KMIP"},{"line_number":164,"context_line":"        :raises: SecretGeneralException"},{"line_number":165,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_c9808c4b","line":162,"in_reply_to":"baada198_bc05577a","updated":"2014-08-11 21:44:01.000000000","message":"Done","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        secret \u003d secrets.SecretFactory().create_secret(object_type,"},{"line_number":196,"context_line":"                                                       secret_features)"},{"line_number":197,"context_line":"        LOG.debug(\"Created secret object to be stored: %s\","},{"line_number":198,"context_line":"                  \u0027, \u0027.join(map(str, secret_features.values())))"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_8824d5c3","line":197,"updated":"2014-08-11 19:20:19.000000000","message":"This would also output the plain text secret (via \u0027key_value\u0027), which is dangerous to do via logs. I think outputting the other metadata would be OK though. I\u0027ll ask Paul to make a comment as well...","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"5c3f9fd5b7fdf7332b11947e902751caed289ef8","unresolved":false,"context_lines":[{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        secret \u003d secrets.SecretFactory().create_secret(object_type,"},{"line_number":196,"context_line":"                                                       secret_features)"},{"line_number":197,"context_line":"        LOG.debug(\"Created secret object to be stored: %s\","},{"line_number":198,"context_line":"                  \u0027, \u0027.join(map(str, secret_features.values())))"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_e9839052","line":197,"in_reply_to":"baada198_8824d5c3","updated":"2014-08-11 21:44:01.000000000","message":"Good point, will change this.","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                          result.uuid.value)"},{"line_number":214,"context_line":"                return {KMIPSecretStore.KEY_UUID: result.uuid.value}"},{"line_number":215,"context_line":"            else:"},{"line_number":216,"context_line":"                msg \u003d \"Status: %s, Reason: %s, Message %s\" % ("},{"line_number":217,"context_line":"                    result.result_status,"},{"line_number":218,"context_line":"                    result.result_reason,"},{"line_number":219,"context_line":"                    result.result_message)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_8be68f11","line":216,"updated":"2014-08-11 19:20:19.000000000","message":"Similar to comment above...so what you had before was better I think. :)","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"5c3f9fd5b7fdf7332b11947e902751caed289ef8","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                          result.uuid.value)"},{"line_number":214,"context_line":"                return {KMIPSecretStore.KEY_UUID: result.uuid.value}"},{"line_number":215,"context_line":"            else:"},{"line_number":216,"context_line":"                msg \u003d \"Status: %s, Reason: %s, Message %s\" % ("},{"line_number":217,"context_line":"                    result.result_status,"},{"line_number":218,"context_line":"                    result.result_reason,"},{"line_number":219,"context_line":"                    result.result_message)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_a9851854","line":216,"in_reply_to":"baada198_8be68f11","updated":"2014-08-11 21:44:01.000000000","message":"haha, oops!","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        :returns: SecretDTO of the retreived Secret"},{"line_number":232,"context_line":"        :raises: SecretGeneralException"},{"line_number":233,"context_line":"        \"\"\""},{"line_number":234,"context_line":"        LOG.debug(\"Starting secret retreival with KMIP plugin\")"},{"line_number":235,"context_line":"        uuid \u003d secret_metadata[KMIPSecretStore.KEY_UUID]"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_0ba99f8e","line":234,"updated":"2014-08-11 19:20:19.000000000","message":"retreival -\u003e retrieval","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        try:"},{"line_number":238,"context_line":"            self.client.open()"},{"line_number":239,"context_line":"            LOG.debug(\"Opened connection to KMIP client for secret store\")"},{"line_number":240,"context_line":"            result \u003d self.client.get(uuid, self.credential)"},{"line_number":241,"context_line":"        except Exception as e:"},{"line_number":242,"context_line":"            LOG.exception(\"Error opening or writing to client\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_8b6bef52","line":239,"updated":"2014-08-11 19:20:19.000000000","message":"\u0027secret store\u0027 -\u003e \u0027secret retrieve\u0027","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                          uuid)"},{"line_number":270,"context_line":"                return ret_secret_dto"},{"line_number":271,"context_line":"            else:"},{"line_number":272,"context_line":"                msg \u003d \"Status: %s, Reason: %s, Message %s\" % ("},{"line_number":273,"context_line":"                    result.result_status,"},{"line_number":274,"context_line":"                    result.result_reason,"},{"line_number":275,"context_line":"                    result.result_message)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_8ba20f95","line":272,"updated":"2014-08-11 19:20:19.000000000","message":"Same as above...previous version was correct.","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                    result.result_status,"},{"line_number":274,"context_line":"                    result.result_reason,"},{"line_number":275,"context_line":"                    result.result_message)"},{"line_number":276,"context_line":"                LOG.debug(\"ERROR from KMIP server: %s\", msg)"},{"line_number":277,"context_line":"                raise ss.SecretGeneralException(msg)"},{"line_number":278,"context_line":"        finally:"},{"line_number":279,"context_line":"            self.client.close()"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_abb433d4","line":276,"updated":"2014-08-11 19:20:19.000000000","message":"Yep, this looks good.","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"87366da0e6a8bd2ff547697e59a8f4beda77eadd","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        \"\"\"Key generation supported?"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        Specifies whether the plugin supports key generation with the"},{"line_number":286,"context_line":"        given key_spec."},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        Checks both the algorithm and the bit length. Only symmetric"},{"line_number":289,"context_line":"        algorithms are currently supported."}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_dccbeb1a","line":286,"updated":"2014-08-11 21:11:24.000000000","message":":param and :returns would be great here.","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"5c3f9fd5b7fdf7332b11947e902751caed289ef8","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        \"\"\"Key generation supported?"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        Specifies whether the plugin supports key generation with the"},{"line_number":286,"context_line":"        given key_spec."},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        Checks both the algorithm and the bit length. Only symmetric"},{"line_number":289,"context_line":"        algorithms are currently supported."}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_e9eab00c","line":286,"in_reply_to":"baada198_dccbeb1a","updated":"2014-08-11 21:44:01.000000000","message":"Done","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        try:"},{"line_number":310,"context_line":"            self.client.open()"},{"line_number":311,"context_line":"            LOG.debug(\"Opened connection to KMIP client for secret store\")"},{"line_number":312,"context_line":"            result \u003d self.client.destroy(uuid, self.credential)"},{"line_number":313,"context_line":"        except Exception as e:"},{"line_number":314,"context_line":"            LOG.exception(\"Error opening or writing to client\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_cb05e779","line":311,"updated":"2014-08-11 19:20:19.000000000","message":"\u0027secret store\u0027 -\u003e \u0027secret delete\u0027","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            if result.result_status.enum \u003d\u003d enums.ResultStatus.SUCCESS:"},{"line_number":318,"context_line":"                LOG.debug(\"SUCCESS: Key with uuid %s deleted\", uuid)"},{"line_number":319,"context_line":"            else:"},{"line_number":320,"context_line":"                msg \u003d \"Status: %s, Reason: %s, Message %s\" % ("},{"line_number":321,"context_line":"                    result.result_status,"},{"line_number":322,"context_line":"                    result.result_reason,"},{"line_number":323,"context_line":"                    result.result_message)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_cbdec70f","line":320,"updated":"2014-08-11 19:20:19.000000000","message":"Same as above.","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                raise ss.SecretGeneralException(msg)"},{"line_number":326,"context_line":"        finally:"},{"line_number":327,"context_line":"            self.client.close()"},{"line_number":328,"context_line":"            LOG.debug(\"Closed connection to KMIP client for secret store\")"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def store_secret_supports(self, key_spec):"},{"line_number":331,"context_line":"        \"\"\"Key storage supported?"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_ab02736f","line":328,"updated":"2014-08-11 19:20:19.000000000","message":"\u0027secret store\u0027 -\u003e \u0027secret delete\u0027.","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a9fa3b29b1865fb4ca2b701122bfa9f931a2db1c","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        attribute_type \u003d enums.AttributeType.CRYPTOGRAPHIC_USAGE_MASK"},{"line_number":390,"context_line":"        mask_flags \u003d [enums.CryptographicUsageMask.ENCRYPT,"},{"line_number":391,"context_line":"                      enums.CryptographicUsageMask.DECRYPT]"},{"line_number":392,"context_line":"        usage_mask \u003d attributes.AttributeFactory().create_attribute("},{"line_number":393,"context_line":"            attribute_type,"},{"line_number":394,"context_line":"            mask_flags)"},{"line_number":395,"context_line":"        LOG.debug(attribute_debug_msg,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_cb616739","line":392,"updated":"2014-08-11 19:20:19.000000000","message":"If AttributeFactory is thread-safe it would be fine to keep in __init__(), and probably good to do if this is an expensive operation. Could leave this way for now until a performance issue arises though.","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"5c3f9fd5b7fdf7332b11947e902751caed289ef8","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        attribute_type \u003d enums.AttributeType.CRYPTOGRAPHIC_USAGE_MASK"},{"line_number":390,"context_line":"        mask_flags \u003d [enums.CryptographicUsageMask.ENCRYPT,"},{"line_number":391,"context_line":"                      enums.CryptographicUsageMask.DECRYPT]"},{"line_number":392,"context_line":"        usage_mask \u003d attributes.AttributeFactory().create_attribute("},{"line_number":393,"context_line":"            attribute_type,"},{"line_number":394,"context_line":"            mask_flags)"},{"line_number":395,"context_line":"        LOG.debug(attribute_debug_msg,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_29c828a6","line":392,"in_reply_to":"baada198_cb616739","updated":"2014-08-11 21:44:01.000000000","message":"Ok, I\u0027ll leave it for now","commit_id":"924a27c878f9d79738ff6d8afd377c700448c322"},{"author":{"_account_id":8004,"name":"Paul Kehrer","email":"paul.l.kehrer@gmail.com","username":"reaperhulk"},"change_message_id":"d58f6ab671ba8cfa33dcde73c449cc2b4644c8b5","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                KMIPSecretStore.KMIP_ALGORITHM_ENUM:"},{"line_number":84,"context_line":"                enums.CryptographicAlgorithm.DES},"},{"line_number":85,"context_line":"            ss.KeyAlgorithm.DESEDE: {"},{"line_number":86,"context_line":"                KMIPSecretStore.VALID_BIT_LENGTHS: [56, 112, 168],"},{"line_number":87,"context_line":"                KMIPSecretStore.KMIP_ALGORITHM_ENUM:"},{"line_number":88,"context_line":"                enums.CryptographicAlgorithm.TRIPLE_DES}"},{"line_number":89,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_38fe8905","line":86,"updated":"2014-08-12 17:53:37.000000000","message":"While these are the actual bit lengths, typically these keys are represented with an additional byte of parity, making the apparent bit length 64, 128, and 192. What will happen if a user tries to store a secret that has these parity bits?","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"bd39f3889883b63a1ffaff06c665bcddeb7b860c","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                KMIPSecretStore.KMIP_ALGORITHM_ENUM:"},{"line_number":84,"context_line":"                enums.CryptographicAlgorithm.DES},"},{"line_number":85,"context_line":"            ss.KeyAlgorithm.DESEDE: {"},{"line_number":86,"context_line":"                KMIPSecretStore.VALID_BIT_LENGTHS: [56, 112, 168],"},{"line_number":87,"context_line":"                KMIPSecretStore.KMIP_ALGORITHM_ENUM:"},{"line_number":88,"context_line":"                enums.CryptographicAlgorithm.TRIPLE_DES}"},{"line_number":89,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_f8f971c6","line":86,"in_reply_to":"baada198_38fe8905","updated":"2014-08-12 18:04:17.000000000","message":"Hmm okay, I will look into this.","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"153bd33b0a97b53a5dfc5c7c348838d63c4f1997","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                KMIPSecretStore.KMIP_ALGORITHM_ENUM:"},{"line_number":84,"context_line":"                enums.CryptographicAlgorithm.DES},"},{"line_number":85,"context_line":"            ss.KeyAlgorithm.DESEDE: {"},{"line_number":86,"context_line":"                KMIPSecretStore.VALID_BIT_LENGTHS: [56, 112, 168],"},{"line_number":87,"context_line":"                KMIPSecretStore.KMIP_ALGORITHM_ENUM:"},{"line_number":88,"context_line":"                enums.CryptographicAlgorithm.TRIPLE_DES}"},{"line_number":89,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ac7a964_447413cf","line":86,"in_reply_to":"baada198_38fe8905","updated":"2014-08-14 16:36:26.000000000","message":"We can handle either case. We should add key lengths of 64, 128, and 192.","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"f1b30aed8588923036e07c65aa56c0a21d9cd6a4","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                KMIPSecretStore.KMIP_ALGORITHM_ENUM:"},{"line_number":84,"context_line":"                enums.CryptographicAlgorithm.DES},"},{"line_number":85,"context_line":"            ss.KeyAlgorithm.DESEDE: {"},{"line_number":86,"context_line":"                KMIPSecretStore.VALID_BIT_LENGTHS: [56, 112, 168],"},{"line_number":87,"context_line":"                KMIPSecretStore.KMIP_ALGORITHM_ENUM:"},{"line_number":88,"context_line":"                enums.CryptographicAlgorithm.TRIPLE_DES}"},{"line_number":89,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_56bbefbd","line":86,"in_reply_to":"baada198_f8f971c6","updated":"2014-08-13 08:14:02.000000000","message":"Should there be an explicit parity bit flag in the API or something of the sort?","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        the server."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        :param key_spec: KeySpec with symmetric algorithm and bit_length"},{"line_number":106,"context_line":"        :returns: dictionary holding key_id returned buy server"},{"line_number":107,"context_line":"        :raises: SecretGeneralException"},{"line_number":108,"context_line":"        \"\"\""},{"line_number":109,"context_line":"        LOG.debug(\"Starting symmetric key generation with KMIP plugin\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_47b8a312","line":106,"updated":"2014-08-13 05:33:09.000000000","message":"nit: buy \u003d\u003e by","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            LOG.exception(\"Error opening or writing to client\")"},{"line_number":137,"context_line":"            raise ss.SecretGeneralException(str(e))"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            if result.result_status.enum \u003d\u003d enums.ResultStatus.SUCCESS:"},{"line_number":140,"context_line":"                LOG.debug(\"SUCCESS: Symmetric key generated with \""},{"line_number":141,"context_line":"                          \"uuid: %s\", result.uuid.value)"},{"line_number":142,"context_line":"                return {KMIPSecretStore.KEY_UUID: result.uuid.value}"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_790471c5","line":139,"updated":"2014-08-13 05:33:09.000000000","message":"Looks like result is assumed not to be None. This may not be an issue, just an observation","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"153bd33b0a97b53a5dfc5c7c348838d63c4f1997","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            LOG.exception(\"Error opening or writing to client\")"},{"line_number":137,"context_line":"            raise ss.SecretGeneralException(str(e))"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            if result.result_status.enum \u003d\u003d enums.ResultStatus.SUCCESS:"},{"line_number":140,"context_line":"                LOG.debug(\"SUCCESS: Symmetric key generated with \""},{"line_number":141,"context_line":"                          \"uuid: %s\", result.uuid.value)"},{"line_number":142,"context_line":"                return {KMIPSecretStore.KEY_UUID: result.uuid.value}"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ac7a964_7a9538e3","line":139,"in_reply_to":"baada198_790471c5","updated":"2014-08-14 16:36:26.000000000","message":"The API says it will return a value. This is not an issue.","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.debug(\"SUCCESS: Symmetric key generated with \""},{"line_number":141,"context_line":"                          \"uuid: %s\", result.uuid.value)"},{"line_number":142,"context_line":"                return {KMIPSecretStore.KEY_UUID: result.uuid.value}"},{"line_number":143,"context_line":"            else:"},{"line_number":144,"context_line":"                msg \u003d \"Status: {0}, Reason: {1}, Message: {2}\".format("},{"line_number":145,"context_line":"                    result.result_status,"},{"line_number":146,"context_line":"                    result.result_reason,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_91475952","line":143,"updated":"2014-08-13 05:33:09.000000000","message":"This else part is repeated in many methods below. Could these lines be moved to a separate method like below ?\n\ndef _raise_secret_general_exception(self, result):\n    msg \u003d \"Status: {0}, Reason: {1}, Message: {2}\".format(     \n                    result.result_status,\t\n                    result.result_reason,\t\n                    result.result_message)\t\n    LOG.debug(\"ERROR from KMIP server: %s\", msg)\t\n    raise ss.SecretGeneralException(msg)\n\nand call it as:\n\nself._raise_secret_general_exception(result)\n\njust an example, please use whatever you think is appropriate for the method name :)","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"f1b30aed8588923036e07c65aa56c0a21d9cd6a4","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                LOG.debug(\"SUCCESS: Symmetric key generated with \""},{"line_number":141,"context_line":"                          \"uuid: %s\", result.uuid.value)"},{"line_number":142,"context_line":"                return {KMIPSecretStore.KEY_UUID: result.uuid.value}"},{"line_number":143,"context_line":"            else:"},{"line_number":144,"context_line":"                msg \u003d \"Status: {0}, Reason: {1}, Message: {2}\".format("},{"line_number":145,"context_line":"                    result.result_status,"},{"line_number":146,"context_line":"                    result.result_reason,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_16c8974c","line":143,"in_reply_to":"baada198_91475952","updated":"2014-08-13 08:14:02.000000000","message":"++","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        :param secret_dto: SecretDTO of the secret to be stored"},{"line_number":165,"context_line":"        :param context: SecretStoreContext for secret"},{"line_number":166,"context_line":"        :returns: Dictionary holding the key_uuid assigned by KMIP"},{"line_number":167,"context_line":"        :raises: SecretGeneralException"},{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        LOG.debug(\"Starting secret storage with KMIP plugin\")"},{"line_number":170,"context_line":"        if not self.store_secret_supports(secret_dto.key_spec):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_44d264fe","line":167,"updated":"2014-08-13 05:33:09.000000000","message":":raises: SecretGeneralException,  SecretAlgorithmNotSupportedException","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"f1b30aed8588923036e07c65aa56c0a21d9cd6a4","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        :param secret_dto: SecretDTO of the secret to be stored"},{"line_number":165,"context_line":"        :param context: SecretStoreContext for secret"},{"line_number":166,"context_line":"        :returns: Dictionary holding the key_uuid assigned by KMIP"},{"line_number":167,"context_line":"        :raises: SecretGeneralException"},{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        LOG.debug(\"Starting secret storage with KMIP plugin\")"},{"line_number":170,"context_line":"        if not self.store_secret_supports(secret_dto.key_spec):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_56e92faa","line":167,"in_reply_to":"baada198_44d264fe","updated":"2014-08-13 08:14:02.000000000","message":"++","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        secret_features.update([(\u0027cryptographic_algorithm\u0027, algorithm_value)])"},{"line_number":195,"context_line":"        secret_features.update([(\u0027cryptographic_length\u0027,"},{"line_number":196,"context_line":"                                 secret_dto.key_spec.bit_length)])"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        secret \u003d secrets.SecretFactory().create_secret(object_type,"},{"line_number":199,"context_line":"                                                       secret_features)"},{"line_number":200,"context_line":"        LOG.debug(\"Created secret object to be stored: %s, %s, %s\","}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_8462bc13","line":197,"updated":"2014-08-13 05:33:09.000000000","message":"nit: could the above lines be instead written as below for better readability ?\n\nsecret_features[\u0027key_format_type\u0027] \u003d enums.KeyFormatType.RAW\n\nkey_data \u003d {\u0027bytes\u0027: self._convert_base64_to_byte_array(secret_dto.secret)}\n\nsecret_features[\u0027key_value\u0027] \u003d key_data\n\nsecret_features[\u0027cryptographic_algorithm\u0027] \u003d  algorithm_value\n\nsecret_features[\u0027\u0027cryptographic_length\u0027] \u003d                                 secret_dto.key_spec.bit_length","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                LOG.debug(\"SUCCESS: Key stored with uuid: %s\","},{"line_number":218,"context_line":"                          result.uuid.value)"},{"line_number":219,"context_line":"                return {KMIPSecretStore.KEY_UUID: result.uuid.value}"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                msg \u003d \"Status: {0}, Reason: {1}, Message {2}\".format("},{"line_number":222,"context_line":"                    result.result_status,"},{"line_number":223,"context_line":"                    result.result_reason,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_7142c53c","line":220,"updated":"2014-08-13 05:33:09.000000000","message":"same comment as in #143","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":8004,"name":"Paul Kehrer","email":"paul.l.kehrer@gmail.com","username":"reaperhulk"},"change_message_id":"d58f6ab671ba8cfa33dcde73c449cc2b4644c8b5","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                    ss.KeySpec(secret_alg, secret_bit_length),"},{"line_number":271,"context_line":"                    \u0027content_type\u0027,"},{"line_number":272,"context_line":"                    transport_key\u003dNone)"},{"line_number":273,"context_line":"                    # TODO(kaitlin-farr) remove \u0027content-type\u0027"},{"line_number":274,"context_line":"                LOG.debug(\"SUCCESS: Key retrieved with uuid: %s\","},{"line_number":275,"context_line":"                          uuid)"},{"line_number":276,"context_line":"                return ret_secret_dto"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_0adb2e21","line":273,"updated":"2014-08-12 17:53:37.000000000","message":"What is the timeline on this? Is the SecretDTO changing?","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"bd39f3889883b63a1ffaff06c665bcddeb7b860c","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                    ss.KeySpec(secret_alg, secret_bit_length),"},{"line_number":271,"context_line":"                    \u0027content_type\u0027,"},{"line_number":272,"context_line":"                    transport_key\u003dNone)"},{"line_number":273,"context_line":"                    # TODO(kaitlin-farr) remove \u0027content-type\u0027"},{"line_number":274,"context_line":"                LOG.debug(\"SUCCESS: Key retrieved with uuid: %s\","},{"line_number":275,"context_line":"                          uuid)"},{"line_number":276,"context_line":"                return ret_secret_dto"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_38dcc917","line":273,"in_reply_to":"baada198_0adb2e21","updated":"2014-08-12 18:04:17.000000000","message":"Not sure of the timeline, John Wood has a to-do on SecretDTO to remove content-type once the secret type normalization work has been completed:\n\nhttps://github.com/openstack/barbican/blob/aed3b30ab3caeaea121bbab4f4cd79fde58595f9/barbican/plugin/interface/secret_store.py#L207","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":8004,"name":"Paul Kehrer","email":"paul.l.kehrer@gmail.com","username":"reaperhulk"},"change_message_id":"95c306a8718daa0c93072aa634a868de30db0313","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                    ss.KeySpec(secret_alg, secret_bit_length),"},{"line_number":271,"context_line":"                    \u0027content_type\u0027,"},{"line_number":272,"context_line":"                    transport_key\u003dNone)"},{"line_number":273,"context_line":"                    # TODO(kaitlin-farr) remove \u0027content-type\u0027"},{"line_number":274,"context_line":"                LOG.debug(\"SUCCESS: Key retrieved with uuid: %s\","},{"line_number":275,"context_line":"                          uuid)"},{"line_number":276,"context_line":"                return ret_secret_dto"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_d41a9f6a","line":273,"in_reply_to":"baada198_38dcc917","updated":"2014-08-13 04:28:18.000000000","message":"Fine by me, just wanted to make sure this was something that couldn\u0027t be done yet.","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                LOG.debug(\"SUCCESS: Key retrieved with uuid: %s\","},{"line_number":275,"context_line":"                          uuid)"},{"line_number":276,"context_line":"                return ret_secret_dto"},{"line_number":277,"context_line":"            else:"},{"line_number":278,"context_line":"                msg \u003d \"Status: {0}, Reason: {1}, Message {2}\".format("},{"line_number":279,"context_line":"                    result.result_status,"},{"line_number":280,"context_line":"                    result.result_reason,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_315f6d12","line":277,"updated":"2014-08-13 05:33:09.000000000","message":"same comment as in #143","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        algorithms are currently supported."},{"line_number":297,"context_line":"        :param key_spec: KeySpec for secret to be generates"},{"line_number":298,"context_line":"        :returns: boolean indicating if secret can be generated"},{"line_number":299,"context_line":"        \"\"\""},{"line_number":300,"context_line":"        for valid_alg in self.valid_alg_dict:"},{"line_number":301,"context_line":"            if key_spec.alg \u003d\u003d valid_alg and key_spec.bit_length in\\"},{"line_number":302,"context_line":"                    self.valid_alg_dict[valid_alg].get("}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_ff1ce1c5","line":299,"updated":"2014-08-13 05:33:09.000000000","message":"Considering this method is called by generate_symmetric_key too, could the for loop be eliminated by re-writing as follows ?\n\nalg_dict_entry \u003d self.valid_alg_dict.get(key_spec.alg)\nif alg_dict_entry and key_spec.bit_length in alg_dict_entry.get(KMIPSecretStore.VALID_BIT_LENGTHS):\n     return True\nreturn False","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        else:"},{"line_number":326,"context_line":"            if result.result_status.enum \u003d\u003d enums.ResultStatus.SUCCESS:"},{"line_number":327,"context_line":"                LOG.debug(\"SUCCESS: Key with uuid %s deleted\", uuid)"},{"line_number":328,"context_line":"            else:"},{"line_number":329,"context_line":"                msg \u003d \"Status: {0}, Reason: {1}, Message {2}\".format("},{"line_number":330,"context_line":"                    result.result_status,"},{"line_number":331,"context_line":"                    result.result_reason,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_91959996","line":328,"updated":"2014-08-13 05:33:09.000000000","message":"same comment as in #143","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        :returns: boolean indicating if secret can be stored"},{"line_number":348,"context_line":"        \"\"\""},{"line_number":349,"context_line":"        key_type \u003d ss.KeyAlgorithm().get_secret_type(key_spec.alg)"},{"line_number":350,"context_line":"        if self._map_type_ss_to_kmip(key_type) is None:"},{"line_number":351,"context_line":"            return False"},{"line_number":352,"context_line":"        for valid_alg in self.valid_alg_dict:"},{"line_number":353,"context_line":"            if key_spec.alg \u003d\u003d valid_alg and key_spec.bit_length in\\"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_d10c7147","line":350,"updated":"2014-08-13 05:33:09.000000000","message":"if key_type is None or self._map_type_ss_to_kmip(key_type) is None:","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        \"\"\""},{"line_number":349,"context_line":"        key_type \u003d ss.KeyAlgorithm().get_secret_type(key_spec.alg)"},{"line_number":350,"context_line":"        if self._map_type_ss_to_kmip(key_type) is None:"},{"line_number":351,"context_line":"            return False"},{"line_number":352,"context_line":"        for valid_alg in self.valid_alg_dict:"},{"line_number":353,"context_line":"            if key_spec.alg \u003d\u003d valid_alg and key_spec.bit_length in\\"},{"line_number":354,"context_line":"                    self.valid_alg_dict[valid_alg].get("}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_915839fe","line":351,"updated":"2014-08-13 05:33:09.000000000","message":"lines #352 thru #357 could be replaced with:\n\nreturn self.generate_supports(key_spec)","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"01823faf7f5051c27ccaffb915e1559b4abba668","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    KMIP_ALGORITHM_ENUM \u003d \"kmip_algorithm_enum\""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def __init__(self, conf\u003dCONF):"},{"line_number":72,"context_line":"        super(KMIPSecretStore, self).__init__()"},{"line_number":73,"context_line":"        \"\"\"Creates a dictionary with the valid algorithm names for keys and"},{"line_number":74,"context_line":"        valid bit lengths as values for each key"},{"line_number":75,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"7ac7a964_73e1a9cf","line":72,"updated":"2014-08-15 17:12:55.000000000","message":"I feel like the docstring should be first.","commit_id":"50e956414362c6aa7f813b12c4a80e67bc80c226"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"ebbc34c1ace449ed3b81e8c101d63153ac21e3b8","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    KMIP_ALGORITHM_ENUM \u003d \"kmip_algorithm_enum\""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def __init__(self, conf\u003dCONF):"},{"line_number":72,"context_line":"        super(KMIPSecretStore, self).__init__()"},{"line_number":73,"context_line":"        \"\"\"Creates a dictionary with the valid algorithm names for keys and"},{"line_number":74,"context_line":"        valid bit lengths as values for each key"},{"line_number":75,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"7ac7a964_d696eb93","line":72,"in_reply_to":"7ac7a964_73e1a9cf","updated":"2014-08-15 17:28:41.000000000","message":"++","commit_id":"50e956414362c6aa7f813b12c4a80e67bc80c226"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"3befb163a1ddd848e569f7ab162c563f41107c50","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        :returns: SecretDTO of the retrieved Secret"},{"line_number":226,"context_line":"        :raises: SecretGeneralException"},{"line_number":227,"context_line":"        \"\"\""},{"line_number":228,"context_line":"        LOG.debug(\"Starting secret retreival with KMIP plugin\")"},{"line_number":229,"context_line":"        uuid \u003d secret_metadata[KMIPSecretStore.KEY_UUID]"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_59623ad9","line":228,"updated":"2014-08-18 18:04:24.000000000","message":"Please still do retreival -\u003e retrieval","commit_id":"d6a4f1220707a39b73e6d93b78e7626f2e191bde"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"84b61f07152edf55a6c48036bdb7021a5bfd8447","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        :returns: SecretDTO of the retrieved Secret"},{"line_number":226,"context_line":"        :raises: SecretGeneralException"},{"line_number":227,"context_line":"        \"\"\""},{"line_number":228,"context_line":"        LOG.debug(\"Starting secret retreival with KMIP plugin\")"},{"line_number":229,"context_line":"        uuid \u003d secret_metadata[KMIPSecretStore.KEY_UUID]"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_af886023","line":228,"in_reply_to":"1abeadc6_59623ad9","updated":"2014-08-18 18:53:31.000000000","message":"Oh no!  Sorry, don\u0027t know how I missed that.","commit_id":"d6a4f1220707a39b73e6d93b78e7626f2e191bde"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"3befb163a1ddd848e569f7ab162c563f41107c50","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        try:"},{"line_number":232,"context_line":"            self.client.open()"},{"line_number":233,"context_line":"            LOG.debug(\"Opened connection to KMIP client for secret \" +"},{"line_number":234,"context_line":"                      \"retreival\")"},{"line_number":235,"context_line":"            result \u003d self.client.get(uuid, self.credential)"},{"line_number":236,"context_line":"        except Exception as e:"},{"line_number":237,"context_line":"            LOG.exception(\"Error opening or writing to client\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_795ff60e","line":234,"updated":"2014-08-18 18:04:24.000000000","message":"retreival -\u003e retrieval","commit_id":"d6a4f1220707a39b73e6d93b78e7626f2e191bde"}],"barbican/store/kmip_secret_store.py":[{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"eff48f732c321b7a4748875c435302c2f8aca435","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def generate_supports(self, key_spec):"},{"line_number":52,"context_line":"        if key_spec is None:"},{"line_number":53,"context_line":"            raise ValueError(\"KeySpec cannot be None\")"},{"line_number":54,"context_line":"        if (key_spec.alg in self.valid_alg_dict.keys()):"},{"line_number":55,"context_line":"            if (key_spec.bit_length in self.valid_alg_dict[key_spec.alg]):"},{"line_number":56,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_1017f1ee","line":53,"updated":"2014-06-20 19:23:54.000000000","message":"Does Barbican support string constants for internationalization?","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"d04b14833fb2711c3533e386646d3b16b0d57f04","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def generate_supports(self, key_spec):"},{"line_number":52,"context_line":"        if key_spec is None:"},{"line_number":53,"context_line":"            raise ValueError(\"KeySpec cannot be None\")"},{"line_number":54,"context_line":"        if (key_spec.alg in self.valid_alg_dict.keys()):"},{"line_number":55,"context_line":"            if (key_spec.bit_length in self.valid_alg_dict[key_spec.alg]):"},{"line_number":56,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_936b0bb8","line":53,"in_reply_to":"1ae5cdf2_1017f1ee","updated":"2014-06-20 19:36:57.000000000","message":"Good point.  It does -- I will change this.","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"}],"barbican/store/secret_store.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ed9e31794ebb6f2e5d6eef1e02c158dc42381237","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import abc"},{"line_number":17,"context_line":"import six"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"# Constants used by SecretStores"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_c9f5c0cd","line":17,"updated":"2014-06-23 13:11:02.000000000","message":"Please place these changes in the new \u0027plugin\u0027 structure (which probably happened after this CR, sorry for that).","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"7cba7fd43b0120da1bb21b52ac3cfbc2c52862af","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        :param alg:algorithm for the key"},{"line_number":87,"context_line":"        :param bit_length:bit length of the key"},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        if alg is None:"},{"line_number":90,"context_line":"            raise ValueError(\"Algorithm cannot be None\")"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if alg not in KeyAlgorithm()._get_list():"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_c1e5c2a4","line":89,"updated":"2014-06-20 18:25:30.000000000","message":"For uploaded secrets, the algorithm and bit-length values are optional/informational and are therefore not validated.","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"8a9ad6b5cf379bacbf468997080c25836372e178","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        :param alg:algorithm for the key"},{"line_number":87,"context_line":"        :param bit_length:bit length of the key"},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        if alg is None:"},{"line_number":90,"context_line":"            raise ValueError(\"Algorithm cannot be None\")"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if alg not in KeyAlgorithm()._get_list():"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_a7fb387a","line":89,"in_reply_to":"1ae5cdf2_a9ccf4bc","updated":"2014-06-23 16:10:12.000000000","message":"Would it be ok to leave the checks in here? I understand what your saying about validators doing the checks and these should never be tripped. My pattern for objects is that if they take parameters then they should be validated. The only downside I see is that a few extra machine instructions are executed. The upside is that the object has checks in it, so that if it is some executed without going through validators.py and API first then it will still be good.","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"eff48f732c321b7a4748875c435302c2f8aca435","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        :param alg:algorithm for the key"},{"line_number":87,"context_line":"        :param bit_length:bit length of the key"},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        if alg is None:"},{"line_number":90,"context_line":"            raise ValueError(\"Algorithm cannot be None\")"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if alg not in KeyAlgorithm()._get_list():"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_f03a8532","line":89,"in_reply_to":"1ae5cdf2_c1e5c2a4","updated":"2014-06-20 19:23:54.000000000","message":"I can see them being optional for Barbican core, but I don\u0027t know about here. I was expecting the sequence of events to be the following.\n1. In Barbican core, if alg and bit length are none then create key spec with default values.\n2. Iterate through plugins to find one that supports algorithm and bit length\n3. Call generate using the KeySpec\n\nIf we allow null values for KeySpec then what would supports() check against? If we allow null values then supports would presumably always return true. However, you could have the following case.\n\n1. Barbican core is called to generate asymmetric key but does not specify alg or type\n2. generate_supports is called and returns true\n3. generate_asymmetric(..) is called and fails because asymmetric keys are not supported by the plugin\n\nThat\u0027s why I anticipated Barbican core to set defaults. If that is not the case then we would need to change supports(..). Not a big deal. Is that direction we should go?","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ed9e31794ebb6f2e5d6eef1e02c158dc42381237","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        :param alg:algorithm for the key"},{"line_number":87,"context_line":"        :param bit_length:bit length of the key"},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        if alg is None:"},{"line_number":90,"context_line":"            raise ValueError(\"Algorithm cannot be None\")"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        if alg not in KeyAlgorithm()._get_list():"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_a9ccf4bc","line":89,"in_reply_to":"1ae5cdf2_f03a8532","updated":"2014-06-23 13:11:02.000000000","message":"Sorry Nate, I though KeySpec was used outside of generate too, but for generate to work, these values must be supplied as you state. That said, this validation logic should also be invoked from the validators.py and API side too...these traps should not be tripped in other words. \n\nHowever, I do think the SecretDTO comments below apply as used for non-generation purposes as well.","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"8a9ad6b5cf379bacbf468997080c25836372e178","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            raise ValueError(\"Algorithm \u0027{0}\u0027 is not supported by \""},{"line_number":94,"context_line":"                             \"Barbican\".format(alg))"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        if bit_length is None:"},{"line_number":97,"context_line":"            raise ValueError(\"Bit length cannot be None\")"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        self.alg \u003d alg"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_675db07c","line":96,"updated":"2014-06-23 16:10:12.000000000","message":"Should also check if bit_length is int and \u003e 0.","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"7cba7fd43b0120da1bb21b52ac3cfbc2c52862af","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        :param secret: secret"},{"line_number":120,"context_line":"        :param key_spec: KeySpec key specifications"},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":"        if type is None:"},{"line_number":123,"context_line":"            raise ValueError(\"Type cannot be None\")"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if type not in SecretType()._get_list():"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_218586ac","line":122,"updated":"2014-06-20 18:25:30.000000000","message":"Same comments as above. So if the DTOs are used for storing only (and not generation), validation needs to be bypassed. There is a place for this sort of validation on the generation side, but such validation would need to be done by the validators in common, rather than here (because by this time it is \u0027too late\u0027 to tell the client they passed in bogus values...generation is happening asynchronously).","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"}],"barbican/tests/plugin/interface/test_secret_store.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"9b29a3d082c0c66e8967197d86a2fa2756911e57","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        plugin \u003d TestSecretStore(True)"},{"line_number":64,"context_line":"        plugin_mock \u003d mock.MagicMock(obj\u003dplugin)"},{"line_number":65,"context_line":"        self.manager.extensions \u003d [plugin_mock]"},{"line_number":66,"context_line":"        keySpec \u003d str.KeySpec(\u0027aes\u0027, 128)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        self.assertEqual(plugin,"},{"line_number":69,"context_line":"                         self.manager.get_plugin_generate(keySpec))"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_3f973947","line":66,"updated":"2014-08-05 19:07:36.000000000","message":"does this need to be lowercased?  Probably related to my comment in the plugin.","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        plugin \u003d TestSecretStore(True)"},{"line_number":64,"context_line":"        plugin_mock \u003d mock.MagicMock(obj\u003dplugin)"},{"line_number":65,"context_line":"        self.manager.extensions \u003d [plugin_mock]"},{"line_number":66,"context_line":"        keySpec \u003d str.KeySpec(\u0027aes\u0027, 128)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        self.assertEqual(plugin,"},{"line_number":69,"context_line":"                         self.manager.get_plugin_generate(keySpec))"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_834c4fcb","line":66,"in_reply_to":"baada198_1b2c2901","updated":"2014-08-06 15:11:12.000000000","message":"will change to the enum value","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7879df88afde52cd28486937baa296b61c8e22c","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        plugin \u003d TestSecretStore(True)"},{"line_number":64,"context_line":"        plugin_mock \u003d mock.MagicMock(obj\u003dplugin)"},{"line_number":65,"context_line":"        self.manager.extensions \u003d [plugin_mock]"},{"line_number":66,"context_line":"        keySpec \u003d str.KeySpec(\u0027aes\u0027, 128)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        self.assertEqual(plugin,"},{"line_number":69,"context_line":"                         self.manager.get_plugin_generate(keySpec))"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_1b2c2901","line":66,"in_reply_to":"baada198_3f973947","updated":"2014-08-06 13:52:00.000000000","message":"You can reference the values in the KeyAlgorithm enum defined in SecretStore. That way if it changes to AES or Aes or whatever in the future then these tests will still pass.","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"}],"barbican/tests/plugin/test_kmip.py":[{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7879df88afde52cd28486937baa296b61c8e22c","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        if not kmip_available:"},{"line_number":98,"context_line":"            self.skipTest(\"KMIP imports not available\")"},{"line_number":99,"context_line":"        key_spec \u003d secret_store.KeySpec(secret_store.KeyAlgorithm.AES,"},{"line_number":100,"context_line":"                                        128, \u0027mode\u0027)"},{"line_number":101,"context_line":"        self.assertTrue(self.secret_store.generate_supports(key_spec))"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def test_generate_supports_des(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_fbe93583","line":100,"updated":"2014-08-06 13:52:00.000000000","message":"You can add a for loop that will iterate over the known supported key lengths and test all of them here.","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        if not kmip_available:"},{"line_number":98,"context_line":"            self.skipTest(\"KMIP imports not available\")"},{"line_number":99,"context_line":"        key_spec \u003d secret_store.KeySpec(secret_store.KeyAlgorithm.AES,"},{"line_number":100,"context_line":"                                        128, \u0027mode\u0027)"},{"line_number":101,"context_line":"        self.assertTrue(self.secret_store.generate_supports(key_spec))"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def test_generate_supports_des(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_c34647a7","line":100,"in_reply_to":"baada198_fbe93583","updated":"2014-08-06 15:11:12.000000000","message":"good idea, will do","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7879df88afde52cd28486937baa296b61c8e22c","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        key_spec \u003d secret_store.KeySpec(secret_store.KeyAlgorithm.DESEDE,"},{"line_number":114,"context_line":"                                        56, \u0027mode\u0027)"},{"line_number":115,"context_line":"        self.assertTrue(self.secret_store.generate_supports(key_spec))"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    # ------------ TEST GENERATE_SYMMETRIC -----------------------------------"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def test_generate_symmetric_key_assert_called(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_7bd605c6","line":116,"updated":"2014-08-06 13:52:00.000000000","message":"Add a test that shows we do not support a particular algorithm. Add another test that shows false is returned when good algorithm is supplied by bad key length.","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        key_spec \u003d secret_store.KeySpec(secret_store.KeyAlgorithm.DESEDE,"},{"line_number":114,"context_line":"                                        56, \u0027mode\u0027)"},{"line_number":115,"context_line":"        self.assertTrue(self.secret_store.generate_supports(key_spec))"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    # ------------ TEST GENERATE_SYMMETRIC -----------------------------------"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def test_generate_symmetric_key_assert_called(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_23cd4331","line":116,"in_reply_to":"baada198_7bd605c6","updated":"2014-08-06 15:11:12.000000000","message":"will do","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b7879df88afde52cd28486937baa296b61c8e22c","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            mock.ANY,"},{"line_number":192,"context_line":"            mock.ANY,"},{"line_number":193,"context_line":"            self.credential)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def test_store_secret_return_value(self):"},{"line_number":196,"context_line":"        if not kmip_available:"},{"line_number":197,"context_line":"            self.skipTest(\"KMIP imports not available\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_9b6f59fa","line":194,"updated":"2014-08-06 13:52:00.000000000","message":"What about a test where we store an AES key with an invalid bit length?","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"c8adb830f197fe1d70fb5426e328d54acddf9444","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            mock.ANY,"},{"line_number":192,"context_line":"            mock.ANY,"},{"line_number":193,"context_line":"            self.credential)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def test_store_secret_return_value(self):"},{"line_number":196,"context_line":"        if not kmip_available:"},{"line_number":197,"context_line":"            self.skipTest(\"KMIP imports not available\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_a3e07398","line":194,"in_reply_to":"baada198_9b6f59fa","updated":"2014-08-06 15:11:12.000000000","message":"ok, will add","commit_id":"5056f5ea9758db7b12c1f4bcee0bb48a4414d430"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"920005b0aa98acf43964fe45078ada9c32e70d1f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    kmip_available \u003d False"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class WhenTestingKMIPSecretStore(testtools.TestCase):"},{"line_number":38,"context_line":"    \"\"\"Test using the KMIP server backend for SecretStore.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_18b5f318","line":37,"updated":"2014-08-07 04:36:06.000000000","message":"Please use skip annotation similar to test_dogtag.py","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"783a6641ba2f923e2c4af8a91dfd26d824beba7c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    kmip_available \u003d False"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class WhenTestingKMIPSecretStore(testtools.TestCase):"},{"line_number":38,"context_line":"    \"\"\"Test using the KMIP server backend for SecretStore.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_cb9b9571","line":37,"in_reply_to":"baada198_18b5f318","updated":"2014-08-07 15:49:15.000000000","message":"Will update","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"920005b0aa98acf43964fe45078ada9c32e70d1f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    # --------------- TEST GENERATE_SUPPORTS ---------------------------------"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_generate_supports_null_keyspec(self):"},{"line_number":87,"context_line":"        if not kmip_available:"},{"line_number":88,"context_line":"            self.skipTest(\"KMIP imports not available\")"},{"line_number":89,"context_line":"        key_spec \u003d None"},{"line_number":90,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_783d0f8e","line":87,"updated":"2014-08-07 04:36:06.000000000","message":"This if block and all like them coudl be removed if using the annotation above.","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"783a6641ba2f923e2c4af8a91dfd26d824beba7c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    # --------------- TEST GENERATE_SUPPORTS ---------------------------------"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_generate_supports_null_keyspec(self):"},{"line_number":87,"context_line":"        if not kmip_available:"},{"line_number":88,"context_line":"            self.skipTest(\"KMIP imports not available\")"},{"line_number":89,"context_line":"        key_spec \u003d None"},{"line_number":90,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_2b889120","line":87,"in_reply_to":"baada198_783d0f8e","updated":"2014-08-07 15:49:15.000000000","message":"Ok good, glad there\u0027s a better option","commit_id":"cf2f7c78b0b841f8504c148a706805cab7b19927"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    from kmip.services.kmip_client import KMIPProxy"},{"line_number":28,"context_line":"    from kmip.services import results"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    from barbican.plugin.interface import secret_store"},{"line_number":31,"context_line":"    from barbican.plugin.kmip_secret_store import KMIPSecretStore"},{"line_number":32,"context_line":"    kmip_available \u003d True"},{"line_number":33,"context_line":"except ImportError:"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_54e12f2a","line":30,"updated":"2014-08-13 05:33:09.000000000","message":"Shouldn\u0027t this be outside the try block ?","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"},{"author":{"_account_id":7874,"name":"Venkat Sundaram","email":"tsv@hp.com","username":"tsv"},"change_message_id":"f8a6667189c6be4b112f5989c49a2450ccc77d8e","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def setUp(self):"},{"line_number":42,"context_line":"        super(WhenTestingKMIPSecretStore, self).setUp()"},{"line_number":43,"context_line":"        if not kmip_available:"},{"line_number":44,"context_line":"            return"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self.kmipclient_mock \u003d mock.MagicMock(name\u003d\"KMIP client mock\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_f4c963ac","line":43,"updated":"2014-08-13 05:33:09.000000000","message":"This check looks redundant considering the skipIf decorator above","commit_id":"ec09acc5a4d6f51edcf4e453cf70aec2057e3cf9"}],"barbican/tests/store/test_kmip_secret_store.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"7cba7fd43b0120da1bb21b52ac3cfbc2c52862af","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    \"\"\"Test using the KMIP server backend for SecretStore.\"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def _create_secret_store(self):"},{"line_number":26,"context_line":"        return kmip_secret_store.KMIPSecretStore()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        super(KMIPSecretStoreTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_a167d623","line":26,"updated":"2014-06-20 18:25:30.000000000","message":"Please see comments about bypassing validation for uploaded secrets.","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"ed9e31794ebb6f2e5d6eef1e02c158dc42381237","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    \"\"\"Test using the KMIP server backend for SecretStore.\"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def _create_secret_store(self):"},{"line_number":26,"context_line":"        return kmip_secret_store.KMIPSecretStore()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        super(KMIPSecretStoreTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_a9287434","line":26,"in_reply_to":"1ae5cdf2_9c095ddf","updated":"2014-06-23 13:11:02.000000000","message":"Oh yes, please keep the positive tests.","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"09c31004804bd091b7ce6889ee6c24e20697a83e","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    \"\"\"Test using the KMIP server backend for SecretStore.\"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def _create_secret_store(self):"},{"line_number":26,"context_line":"        return kmip_secret_store.KMIPSecretStore()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        super(KMIPSecretStoreTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_9c095ddf","line":26,"in_reply_to":"1ae5cdf2_a167d623","updated":"2014-06-20 19:12:37.000000000","message":"Ok, I see what you are saying.  If I remove the arg checking, that invalidates the negative tests.  Do you think keeping the positive tests is still worthwhile?","commit_id":"1a844ed8bd91e946effabcd8a2ae7df691e6d199"}]}
