)]}'
{"barbican/plugin/kmip_secret_store.py":[{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"c484c28ff478255e397609c952c59030606cf794","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        algorithm \u003d self._create_algorithm_attribute("},{"line_number":300,"context_line":"            key_spec.alg)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        length \u003d self._create_bit_length_attribute("},{"line_number":303,"context_line":"            key_spec.bit_length)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        attributes \u003d [algorithm, length]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_6e81aefa","line":302,"updated":"2015-06-10 19:06:59.000000000","message":"The two generate methods in this implementation do not work. Peter, can you what is different between the two and why that might be?","commit_id":"926d2fd92028921da16e2cc059ac05a3b16840b5"},{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"06d9f8c6db9a9e785a43d5ccd217dc3ae4706851","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        algorithm \u003d self._create_algorithm_attribute("},{"line_number":300,"context_line":"            key_spec.alg)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        length \u003d self._create_bit_length_attribute("},{"line_number":303,"context_line":"            key_spec.bit_length)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        attributes \u003d [algorithm, length]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_6e6c0e08","line":302,"in_reply_to":"3afb71cf_6e81aefa","updated":"2015-06-10 19:15:55.000000000","message":"What errors are you seeing? It looks like you\u0027re missing the usage mask attribute for this section.","commit_id":"926d2fd92028921da16e2cc059ac05a3b16840b5"},{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"0a8fe1fd8156b28fedc1c54c61436b18ac7359a5","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        the attributes included in the KeySpec."},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        For now this always returns true if the key spec\u0027s algorithm and bit"},{"line_number":485,"context_line":"        length are not specified. The secret type should be added in the"},{"line_number":486,"context_line":"        future. This must always return if the algorithm and bit length are not"},{"line_number":487,"context_line":"        specified because some secret types, like certificate, do not require"},{"line_number":488,"context_line":"        algorithm and bit length, so true must always be returned for those"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_3435c145","line":485,"updated":"2015-06-15 12:03:41.000000000","message":"Maybe add an explicit TODO here to call out the need for a secret_type flag?","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"08ade1f18b0736936765f9afe21e4563329341d4","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        the attributes included in the KeySpec."},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        For now this always returns true if the key spec\u0027s algorithm and bit"},{"line_number":485,"context_line":"        length are not specified. The secret type should be added in the"},{"line_number":486,"context_line":"        future. This must always return if the algorithm and bit length are not"},{"line_number":487,"context_line":"        specified because some secret types, like certificate, do not require"},{"line_number":488,"context_line":"        algorithm and bit length, so true must always be returned for those"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_efd8df55","line":485,"in_reply_to":"fa32b979_3435c145","updated":"2015-06-15 13:32:57.000000000","message":"I\u0027m wondering if that is needed. This is an item up for discussion. The Barbican team could say that all secret stores must support all secret types. In that case then the secret type is not really needed. See my etherpad page for a better description.\n\nhttps://etherpad.openstack.org/p/barbican-store-supports","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"94682f8655d802cf2386233b6e77fca289cbadd6","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        the attributes included in the KeySpec."},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        For now this always returns true if the key spec\u0027s algorithm and bit"},{"line_number":485,"context_line":"        length are not specified. The secret type should be added in the"},{"line_number":486,"context_line":"        future. This must always return if the algorithm and bit length are not"},{"line_number":487,"context_line":"        specified because some secret types, like certificate, do not require"},{"line_number":488,"context_line":"        algorithm and bit length, so true must always be returned for those"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_52b09243","line":485,"in_reply_to":"fa32b979_efd8df55","updated":"2015-06-15 13:53:21.000000000","message":"I definitely think you gain more flexibility by adding the secret_type as a parameter, even if all secret stores support all secret types. It allows you do have type-specific checks for crypto settings that may go beyond just algorithm and bit length.\n\nI think you\u0027d also want to update generate_supports at some point to do the same thing. If you want to know whether or not you support creating a specific secret type with a specific set of settings, you\u0027d ask generate_supports.","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"0a8fe1fd8156b28fedc1c54c61436b18ac7359a5","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        future. This must always return if the algorithm and bit length are not"},{"line_number":487,"context_line":"        specified because some secret types, like certificate, do not require"},{"line_number":488,"context_line":"        algorithm and bit length, so true must always be returned for those"},{"line_number":489,"context_line":"        cases."},{"line_number":490,"context_line":"        :param key_spec: KeySpec of secret to be stored"},{"line_number":491,"context_line":"        :returns: boolean indicating if secret can be stored"},{"line_number":492,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_345aa184","line":489,"updated":"2015-06-15 12:03:41.000000000","message":"While I understand the logic here, I could see an argument for making the default return value be False too. The secret_type flag would fix that.","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"94682f8655d802cf2386233b6e77fca289cbadd6","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        future. This must always return if the algorithm and bit length are not"},{"line_number":487,"context_line":"        specified because some secret types, like certificate, do not require"},{"line_number":488,"context_line":"        algorithm and bit length, so true must always be returned for those"},{"line_number":489,"context_line":"        cases."},{"line_number":490,"context_line":"        :param key_spec: KeySpec of secret to be stored"},{"line_number":491,"context_line":"        :returns: boolean indicating if secret can be stored"},{"line_number":492,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_0f9423e0","line":489,"in_reply_to":"fa32b979_2f5327e3","updated":"2015-06-15 13:53:21.000000000","message":"Oh, I understand that. I\u0027m just saying, in the long run, it would probably be better to have this:\n\nelse:\n    if secret_type \u003d\u003d enums.ObjectType.CERTIFICATE:\n        return True\n    else:\n        return False","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"08ade1f18b0736936765f9afe21e4563329341d4","unresolved":false,"context_lines":[{"line_number":486,"context_line":"        future. This must always return if the algorithm and bit length are not"},{"line_number":487,"context_line":"        specified because some secret types, like certificate, do not require"},{"line_number":488,"context_line":"        algorithm and bit length, so true must always be returned for those"},{"line_number":489,"context_line":"        cases."},{"line_number":490,"context_line":"        :param key_spec: KeySpec of secret to be stored"},{"line_number":491,"context_line":"        :returns: boolean indicating if secret can be stored"},{"line_number":492,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_2f5327e3","line":489,"in_reply_to":"fa32b979_345aa184","updated":"2015-06-15 13:32:57.000000000","message":"I cannot return False because then I would not be able to support certificates. Not all certificates are required to provide these properties, and I can easily envision certificates being stored without them. So I kind of need this to stay as True.","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"0a8fe1fd8156b28fedc1c54c61436b18ac7359a5","unresolved":false,"context_lines":[{"line_number":609,"context_line":"        For now, we assume the key will only be used for encryption and"},{"line_number":610,"context_line":"        decryption. This attribute is used when telling the KMIP server"},{"line_number":611,"context_line":"        what kind of key to generate or store."},{"line_number":612,"context_line":"        :returns: A KMIP Usage Mask attribute with values ENCRYPT and DECRYPT"},{"line_number":613,"context_line":"        \"\"\""},{"line_number":614,"context_line":"        if (kmip_type \u003d\u003d enums.ObjectType.SYMMETRIC_KEY or"},{"line_number":615,"context_line":"                kmip_type \u003d\u003d enums.ObjectType.SECRET_DATA):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_34ab818b","line":612,"updated":"2015-06-15 12:03:41.000000000","message":"This should be updated to reflect (1) that the flags may not be for a key, and (2) that different sets of flags are returned now.","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"08ade1f18b0736936765f9afe21e4563329341d4","unresolved":false,"context_lines":[{"line_number":609,"context_line":"        For now, we assume the key will only be used for encryption and"},{"line_number":610,"context_line":"        decryption. This attribute is used when telling the KMIP server"},{"line_number":611,"context_line":"        what kind of key to generate or store."},{"line_number":612,"context_line":"        :returns: A KMIP Usage Mask attribute with values ENCRYPT and DECRYPT"},{"line_number":613,"context_line":"        \"\"\""},{"line_number":614,"context_line":"        if (kmip_type \u003d\u003d enums.ObjectType.SYMMETRIC_KEY or"},{"line_number":615,"context_line":"                kmip_type \u003d\u003d enums.ObjectType.SECRET_DATA):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_0fa0a39e","line":612,"in_reply_to":"fa32b979_34ab818b","updated":"2015-06-15 13:32:57.000000000","message":"OK, will do.","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"854386c848d04b8051b41a5567795441028c2376","unresolved":false,"context_lines":[{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    def _create_usage_mask_attribute(self, kmip_type):"},{"line_number":607,"context_line":"        \"\"\"Creates a KMIP Usage Mask attribute."},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"        :returns: A KMIP Usage Mask attribute specific to the object type"},{"line_number":610,"context_line":"        \"\"\""},{"line_number":611,"context_line":"        if (kmip_type \u003d\u003d enums.ObjectType.SYMMETRIC_KEY or"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_74743467","line":608,"updated":"2015-06-17 14:05:31.000000000","message":"mind adding the kmip_type parameter to the documentation also?","commit_id":"b36d4d21528ad87daeeef3c29d8aea22f884c7c0"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"8dd5854472227eb88d2c5b37b14973dfed9d8923","unresolved":false,"context_lines":[{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    def _create_usage_mask_attribute(self, kmip_type):"},{"line_number":607,"context_line":"        \"\"\"Creates a KMIP Usage Mask attribute."},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"        :returns: A KMIP Usage Mask attribute specific to the object type"},{"line_number":610,"context_line":"        \"\"\""},{"line_number":611,"context_line":"        if (kmip_type \u003d\u003d enums.ObjectType.SYMMETRIC_KEY or"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_422daea6","line":608,"in_reply_to":"fa32b979_74743467","updated":"2015-06-17 14:32:44.000000000","message":"Done","commit_id":"b36d4d21528ad87daeeef3c29d8aea22f884c7c0"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"e25a9706c6f70fc93418d29d04a3415b7be33db8","unresolved":false,"context_lines":[{"line_number":40,"context_line":"from kmip.core.secrets import PrivateKey"},{"line_number":41,"context_line":"from kmip.core.secrets import PublicKey"},{"line_number":42,"context_line":"from kmip.core.secrets import SymmetricKey"},{"line_number":43,"context_line":"from kmip.services import kmip_client"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"from oslo_config import cfg"},{"line_number":46,"context_line":"from oslo_log import log"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_28a2cbfd","line":43,"updated":"2015-06-17 14:52:44.000000000","message":"Hacking doesn\u0027t enforce importing only modules anymore?","commit_id":"6e4ca7db8f2a352d26d6deab21fa8f241bdd05b4"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"e25a9706c6f70fc93418d29d04a3415b7be33db8","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            key_spec.bit_length)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        attributes \u003d [algorithm, length]"},{"line_number":306,"context_line":"        common \u003d CommonTemplateAttribute("},{"line_number":307,"context_line":"            attributes\u003dattributes)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_c879df83","line":306,"updated":"2015-06-17 14:52:44.000000000","message":"No usage mask anymore?","commit_id":"6e4ca7db8f2a352d26d6deab21fa8f241bdd05b4"}],"barbican/tests/plugin/test_kmip.py":[{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"0a8fe1fd8156b28fedc1c54c61436b18ac7359a5","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        return_value \u003d self.secret_store.store_secret(secret_dto)"},{"line_number":535,"context_line":"        expected \u003d {kss.KMIPSecretStore.KEY_UUID: \u0027uuid\u0027}"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        self.assertEqual(0, cmp(expected, return_value))"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def test_store_secret_server_error_occurs(self):"},{"line_number":540,"context_line":"        self.secret_store.client.register \u003d mock.MagicMock("}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_f402f93d","line":537,"updated":"2015-06-15 12:03:41.000000000","message":"Why not just:\nself.assertEqual(expected, return_value)","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"46dda7abd3432ace434cfc95b498dbe9cd8d767d","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        return_value \u003d self.secret_store.store_secret(secret_dto)"},{"line_number":535,"context_line":"        expected \u003d {kss.KMIPSecretStore.KEY_UUID: \u0027uuid\u0027}"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        self.assertEqual(0, cmp(expected, return_value))"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def test_store_secret_server_error_occurs(self):"},{"line_number":540,"context_line":"        self.secret_store.client.register \u003d mock.MagicMock("}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_db87dd5f","line":537,"in_reply_to":"fa32b979_6024dc0c","updated":"2015-06-15 14:29:30.000000000","message":"No reason, I just followed the same pattern to keep it consistent. I will change.","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"e6146ca89450cf62f3e4ac8e0466033df9a9734b","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        return_value \u003d self.secret_store.store_secret(secret_dto)"},{"line_number":535,"context_line":"        expected \u003d {kss.KMIPSecretStore.KEY_UUID: \u0027uuid\u0027}"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        self.assertEqual(0, cmp(expected, return_value))"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def test_store_secret_server_error_occurs(self):"},{"line_number":540,"context_line":"        self.secret_store.client.register \u003d mock.MagicMock("}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_413bdad1","line":537,"in_reply_to":"fa32b979_9b039573","updated":"2015-06-15 14:59:49.000000000","message":"Neat. Sounds fine to me.","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"e6fb716deb34a9a6bdf636bd97daa8c6813e6b2e","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        return_value \u003d self.secret_store.store_secret(secret_dto)"},{"line_number":535,"context_line":"        expected \u003d {kss.KMIPSecretStore.KEY_UUID: \u0027uuid\u0027}"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        self.assertEqual(0, cmp(expected, return_value))"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def test_store_secret_server_error_occurs(self):"},{"line_number":540,"context_line":"        self.secret_store.client.register \u003d mock.MagicMock("}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_9b039573","line":537,"in_reply_to":"fa32b979_db87dd5f","updated":"2015-06-15 14:37:33.000000000","message":"Long-winded explanation: the original concern was that assertEquals also compares order, which isn\u0027t really an issue at the moment because there\u0027s only one item in the dictionary, but was supposed to be helpful if there were ever more items.  Looking now, there\u0027s an assertItemsEqual, which should do the same thing.  assertItemsEqual isn\u0027t available in Python 2.6, which I think (I hope, at least) was why I didn\u0027t just use that for the original tests.  Now Python 2.6 support is dropped, so we should be using assertItemsEqual instead.","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"b85364bcd98772c4d9bf26584bb69a9d2aee3024","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        return_value \u003d self.secret_store.store_secret(secret_dto)"},{"line_number":535,"context_line":"        expected \u003d {kss.KMIPSecretStore.KEY_UUID: \u0027uuid\u0027}"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        self.assertEqual(0, cmp(expected, return_value))"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    def test_store_secret_server_error_occurs(self):"},{"line_number":540,"context_line":"        self.secret_store.client.register \u003d mock.MagicMock("}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_6024dc0c","line":537,"in_reply_to":"fa32b979_f402f93d","updated":"2015-06-15 14:25:40.000000000","message":"I had the same question. I realize that this is used currently in a number of other tests in this module, so I\u0027m not gonna -1 the CR for it. However, it would be good to understand why it\u0027s being used.","commit_id":"c92262015ae475a3e65c4487435a7bbeb59c7470"}]}
