)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"81e7799f9abbc108a4e3a2ac40531d712e6e0879","unresolved":false,"context_lines":[{"line_number":11,"context_line":"quickly be able to communicate with a KMIP device. It does not provide"},{"line_number":12,"context_line":"all of the KMIP optional parameters, but those features are not"},{"line_number":13,"context_line":"required for integration with KMIP in the KMIP secret store."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ie6f71752eb4d7c7f01942b3881db7a4aa424cb49"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa1b9901_42518a0d","line":14,"updated":"2015-08-18 13:08:17.000000000","message":"This change should be dependent on a change in global-requirements for PyKMIP 0.4.0 because the PIE API, which is used here, was added in that version.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"0d190369890a799c629c6154e2df9b39be28ad16","unresolved":false,"context_lines":[{"line_number":11,"context_line":"quickly be able to communicate with a KMIP device. It does not provide"},{"line_number":12,"context_line":"all of the KMIP optional parameters, but those features are not"},{"line_number":13,"context_line":"required for integration with KMIP in the KMIP secret store."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ie6f71752eb4d7c7f01942b3881db7a4aa424cb49"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa1b9901_a9a054a0","line":14,"in_reply_to":"fa1b9901_42518a0d","updated":"2015-08-19 13:45:25.000000000","message":"I will add another patch for that.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"ba7963091c518956570eba874b177c6a723aa5b5","unresolved":false,"context_lines":[{"line_number":11,"context_line":"quickly be able to communicate with a KMIP device. It does not provide"},{"line_number":12,"context_line":"all of the KMIP optional parameters, but those features are not"},{"line_number":13,"context_line":"required for integration with KMIP in the KMIP secret store."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ie6f71752eb4d7c7f01942b3881db7a4aa424cb49"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"fa1b9901_d860dfd1","line":14,"updated":"2015-08-19 19:53:46.000000000","message":"Missing\n\n  Depends-On:\n\nline for global-requirements change.","commit_id":"969eb8382d8f1ff309823b2d8e79ac1e20b16c6f"}],"barbican/plugin/kmip_secret_store.py":[{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"139c6a6513b3a4780a236bd13b320b24157414ec","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                            None)"},{"line_number":228,"context_line":"        client_open \u003d False"},{"line_number":229,"context_line":"        try:"},{"line_number":230,"context_line":"            self.client.open()"},{"line_number":231,"context_line":"            client_open \u003d True"},{"line_number":232,"context_line":"            LOG.debug(\"Opened connection to KMIP client for secret \" +"},{"line_number":233,"context_line":"                      \"generation\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_f071c6ac","line":230,"updated":"2015-08-13 18:18:37.000000000","message":"It looks like PyKMIP\u0027s PIE API supports `with` constructs -- e.g.,\n\n  with self.client():\n    try:\n      # stuff\n    except:\n      # log\n\nwhich is cleaner and less verbose.","commit_id":"e599eb76745a7af2f5e018c7feeeb89c0810f686"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"c6b6a0181198f7e1735682769d378c302dc5740a","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                            None)"},{"line_number":228,"context_line":"        client_open \u003d False"},{"line_number":229,"context_line":"        try:"},{"line_number":230,"context_line":"            self.client.open()"},{"line_number":231,"context_line":"            client_open \u003d True"},{"line_number":232,"context_line":"            LOG.debug(\"Opened connection to KMIP client for secret \" +"},{"line_number":233,"context_line":"                      \"generation\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_ae20bab1","line":230,"in_reply_to":"1a4dcd0f_e70b4d23","updated":"2015-08-13 21:08:11.000000000","message":"Thanks for pointing this out! I was not a big fan of the client_open variable.","commit_id":"e599eb76745a7af2f5e018c7feeeb89c0810f686"},{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"7eac8d1cc869cf3b07512f2a2e3789f852639527","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                            None)"},{"line_number":228,"context_line":"        client_open \u003d False"},{"line_number":229,"context_line":"        try:"},{"line_number":230,"context_line":"            self.client.open()"},{"line_number":231,"context_line":"            client_open \u003d True"},{"line_number":232,"context_line":"            LOG.debug(\"Opened connection to KMIP client for secret \" +"},{"line_number":233,"context_line":"                      \"generation\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_e70b4d23","line":230,"in_reply_to":"1a4dcd0f_f071c6ac","updated":"2015-08-13 19:09:42.000000000","message":"Yes! Using the client as a context manager should help remove some of this management code.","commit_id":"e599eb76745a7af2f5e018c7feeeb89c0810f686"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"139c6a6513b3a4780a236bd13b320b24157414ec","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        client_open \u003d False"},{"line_number":280,"context_line":"        try:"},{"line_number":281,"context_line":"            self.client.open()"},{"line_number":282,"context_line":"            client_open \u003d True"},{"line_number":283,"context_line":"            LOG.debug(\"Opened connection to KMIP client for asymmetric \" +"},{"line_number":284,"context_line":"                      \"secret generation\")"},{"line_number":285,"context_line":"            public_uuid, private_uuid \u003d self.client.create_key_pair(algorithm,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_30608ecf","line":282,"updated":"2015-08-13 18:18:37.000000000","message":"Ditto","commit_id":"e599eb76745a7af2f5e018c7feeeb89c0810f686"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"139c6a6513b3a4780a236bd13b320b24157414ec","unresolved":false,"context_lines":[{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        secret \u003d self._get_kmip_secret(secret_dto)"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        client_open \u003d False"},{"line_number":331,"context_line":"        try:"},{"line_number":332,"context_line":"            self.client.open()"},{"line_number":333,"context_line":"            client_open \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_f098e6ce","line":330,"updated":"2015-08-13 18:18:37.000000000","message":"Ditto","commit_id":"e599eb76745a7af2f5e018c7feeeb89c0810f686"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"139c6a6513b3a4780a236bd13b320b24157414ec","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        \"\"\""},{"line_number":355,"context_line":"        LOG.debug(\"Starting secret retrieval with KMIP plugin\")"},{"line_number":356,"context_line":"        uuid \u003d str(secret_metadata[KMIPSecretStore.KEY_UUID])"},{"line_number":357,"context_line":"        client_open \u003d False"},{"line_number":358,"context_line":"        try:"},{"line_number":359,"context_line":"            self.client.open()"},{"line_number":360,"context_line":"            client_open \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_50b43a34","line":357,"updated":"2015-08-13 18:18:37.000000000","message":"Ditto","commit_id":"e599eb76745a7af2f5e018c7feeeb89c0810f686"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"139c6a6513b3a4780a236bd13b320b24157414ec","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        \"\"\""},{"line_number":400,"context_line":"        LOG.debug(\"Starting secret deletion with KMIP plugin\")"},{"line_number":401,"context_line":"        uuid \u003d str(secret_metadata[KMIPSecretStore.KEY_UUID])"},{"line_number":402,"context_line":"        client_open \u003d False"},{"line_number":403,"context_line":"        try:"},{"line_number":404,"context_line":"            self.client.open()"},{"line_number":405,"context_line":"            client_open \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_b0f01eff","line":402,"updated":"2015-08-13 18:18:37.000000000","message":"Ditto","commit_id":"e599eb76745a7af2f5e018c7feeeb89c0810f686"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"3c49cff61002bff5927a3dbc75d1e1a37526e373","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        needed to connect to the KMIP server."},{"line_number":145,"context_line":"        \"\"\""},{"line_number":146,"context_line":"        super(KMIPSecretStore, self).__init__()"},{"line_number":147,"context_line":"        self.valid_alg_dict \u003d {"},{"line_number":148,"context_line":"            ss.KeyAlgorithm.AES: {"},{"line_number":149,"context_line":"                KMIPSecretStore.VALID_BIT_LENGTHS: [128, 192, 256],"},{"line_number":150,"context_line":"                KMIPSecretStore.KMIP_ALGORITHM_ENUM:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_2b790694","line":147,"updated":"2015-08-17 15:05:47.000000000","message":"This could just be simplified to:\nself.valid_alg_dict \u003d {\n    ss.KeyAlgorithm.AES: [128, 192, 256],\n...\n}\nsince you\u0027re not using this to map between barbican vs pykmip algorithms anymore right?","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"0d190369890a799c629c6154e2df9b39be28ad16","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        needed to connect to the KMIP server."},{"line_number":145,"context_line":"        \"\"\""},{"line_number":146,"context_line":"        super(KMIPSecretStore, self).__init__()"},{"line_number":147,"context_line":"        self.valid_alg_dict \u003d {"},{"line_number":148,"context_line":"            ss.KeyAlgorithm.AES: {"},{"line_number":149,"context_line":"                KMIPSecretStore.VALID_BIT_LENGTHS: [128, 192, 256],"},{"line_number":150,"context_line":"                KMIPSecretStore.KMIP_ALGORITHM_ENUM:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_8cd47e47","line":147,"in_reply_to":"fa1b9901_2b790694","updated":"2015-08-19 13:45:25.000000000","message":"I think I will retain this information but remove how the mapping is done in _get_kmip_secret(..). Instead of making a call to getattribute(..) for the enums module I will use this mapping. This will also be consistent with the other suggestion to create a mapping from KMIP algorithms to Barbican algorithms.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"3cf5a47dc54674180e652a2c18ece2e7914d3064","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        try:"},{"line_number":228,"context_line":"            with self.client:"},{"line_number":229,"context_line":"                LOG.debug(\"Opened connection to KMIP client for secret \" +"},{"line_number":230,"context_line":"                          \"generation\")"},{"line_number":231,"context_line":"                uuid \u003d self.client.create(algorithm, key_spec.bit_length)"},{"line_number":232,"context_line":"                LOG.debug(\"SUCCESS: Symmetric key generated with \""},{"line_number":233,"context_line":"                          \"uuid: %s\", uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_85903397","line":230,"updated":"2015-08-17 19:59:00.000000000","message":"I don\u0027t think that this debugging information is necessary. Presumably PyKMIP has some parameter to enable verbose logging; there\u0027s no need to do it manually here.\n\nAlso applies to methods below.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"0d190369890a799c629c6154e2df9b39be28ad16","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        try:"},{"line_number":228,"context_line":"            with self.client:"},{"line_number":229,"context_line":"                LOG.debug(\"Opened connection to KMIP client for secret \" +"},{"line_number":230,"context_line":"                          \"generation\")"},{"line_number":231,"context_line":"                uuid \u003d self.client.create(algorithm, key_spec.bit_length)"},{"line_number":232,"context_line":"                LOG.debug(\"SUCCESS: Symmetric key generated with \""},{"line_number":233,"context_line":"                          \"uuid: %s\", uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_892f90f5","line":230,"in_reply_to":"fa1b9901_85903397","updated":"2015-08-19 13:45:25.000000000","message":"I would like to keep it because when running the tests I do not want to have to configure debugging for PyKMIP. I would rather use the default of having debug logging in Barbican. If I need more then I can configure PyKMIP debugging.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"ea2c387f7cf2504af265b7ece20525eed439e0b2","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        try:"},{"line_number":228,"context_line":"            with self.client:"},{"line_number":229,"context_line":"                LOG.debug(\"Opened connection to KMIP client for secret \" +"},{"line_number":230,"context_line":"                          \"generation\")"},{"line_number":231,"context_line":"                uuid \u003d self.client.create(algorithm, key_spec.bit_length)"},{"line_number":232,"context_line":"                LOG.debug(\"SUCCESS: Symmetric key generated with \""},{"line_number":233,"context_line":"                          \"uuid: %s\", uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_767be5f5","line":230,"in_reply_to":"fa1b9901_892f90f5","updated":"2015-08-19 19:53:07.000000000","message":"I don\u0027t think that this level of debug logging is appropriate after testing, but okay.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"3cf5a47dc54674180e652a2c18ece2e7914d3064","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                LOG.debug(\"SUCCESS: Asymmetric key pair generated with \""},{"line_number":278,"context_line":"                          \"public key uuid: %s and private key uuid: %s\","},{"line_number":279,"context_line":"                          public_uuid,"},{"line_number":280,"context_line":"                          private_uuid)"},{"line_number":281,"context_line":"                private_key_metadata \u003d {KMIPSecretStore.KEY_UUID: private_uuid}"},{"line_number":282,"context_line":"                public_key_metadata \u003d {KMIPSecretStore.KEY_UUID: public_uuid}"},{"line_number":283,"context_line":"                passphrase_metadata \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_e5da4f78","line":280,"updated":"2015-08-17 19:59:00.000000000","message":"Can fit on the line above.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"0d190369890a799c629c6154e2df9b39be28ad16","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                LOG.debug(\"SUCCESS: Asymmetric key pair generated with \""},{"line_number":278,"context_line":"                          \"public key uuid: %s and private key uuid: %s\","},{"line_number":279,"context_line":"                          public_uuid,"},{"line_number":280,"context_line":"                          private_uuid)"},{"line_number":281,"context_line":"                private_key_metadata \u003d {KMIPSecretStore.KEY_UUID: private_uuid}"},{"line_number":282,"context_line":"                public_key_metadata \u003d {KMIPSecretStore.KEY_UUID: public_uuid}"},{"line_number":283,"context_line":"                passphrase_metadata \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_c97d88b2","line":280,"in_reply_to":"fa1b9901_e5da4f78","updated":"2015-08-19 13:45:25.000000000","message":"Done","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"3cf5a47dc54674180e652a2c18ece2e7914d3064","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        elif object_type \u003d\u003d enums.ObjectType.PRIVATE_KEY:"},{"line_number":426,"context_line":"            algorithm \u003d getattr(enums.CryptographicAlgorithm,"},{"line_number":427,"context_line":"                                key_spec.alg.upper(),"},{"line_number":428,"context_line":"                                None)"},{"line_number":429,"context_line":"            length \u003d key_spec.bit_length"},{"line_number":430,"context_line":"            format_type \u003d enums.KeyFormatType.PKCS_8"},{"line_number":431,"context_line":"            kmip_object \u003d objects.PrivateKey("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_a5bbf70d","line":428,"updated":"2015-08-17 19:59:00.000000000","message":"Could squeeze onto previous line.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"ea2c387f7cf2504af265b7ece20525eed439e0b2","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        elif object_type \u003d\u003d enums.ObjectType.PRIVATE_KEY:"},{"line_number":426,"context_line":"            algorithm \u003d getattr(enums.CryptographicAlgorithm,"},{"line_number":427,"context_line":"                                key_spec.alg.upper(),"},{"line_number":428,"context_line":"                                None)"},{"line_number":429,"context_line":"            length \u003d key_spec.bit_length"},{"line_number":430,"context_line":"            format_type \u003d enums.KeyFormatType.PKCS_8"},{"line_number":431,"context_line":"            kmip_object \u003d objects.PrivateKey("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_76620540","line":428,"in_reply_to":"fa1b9901_6961dc38","updated":"2015-08-19 19:53:07.000000000","message":"Okay, thanks for the explanation.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"0d190369890a799c629c6154e2df9b39be28ad16","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        elif object_type \u003d\u003d enums.ObjectType.PRIVATE_KEY:"},{"line_number":426,"context_line":"            algorithm \u003d getattr(enums.CryptographicAlgorithm,"},{"line_number":427,"context_line":"                                key_spec.alg.upper(),"},{"line_number":428,"context_line":"                                None)"},{"line_number":429,"context_line":"            length \u003d key_spec.bit_length"},{"line_number":430,"context_line":"            format_type \u003d enums.KeyFormatType.PKCS_8"},{"line_number":431,"context_line":"            kmip_object \u003d objects.PrivateKey("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_6961dc38","line":428,"in_reply_to":"fa1b9901_a5bbf70d","updated":"2015-08-19 13:45:25.000000000","message":"I like to put each parameter on new line to clearly show how many and the order. There are other places in Barbican code that do this as well.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"3cf5a47dc54674180e652a2c18ece2e7914d3064","unresolved":false,"context_lines":[{"line_number":433,"context_line":"        elif object_type \u003d\u003d enums.ObjectType.PUBLIC_KEY:"},{"line_number":434,"context_line":"            algorithm \u003d getattr(enums.CryptographicAlgorithm,"},{"line_number":435,"context_line":"                                key_spec.alg.upper(),"},{"line_number":436,"context_line":"                                None)"},{"line_number":437,"context_line":"            length \u003d key_spec.bit_length"},{"line_number":438,"context_line":"            format_type \u003d enums.KeyFormatType.X_509"},{"line_number":439,"context_line":"            kmip_object \u003d objects.PublicKey("}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_0541830b","line":436,"updated":"2015-08-17 19:59:00.000000000","message":"Ditto","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"3cf5a47dc54674180e652a2c18ece2e7914d3064","unresolved":false,"context_lines":[{"line_number":441,"context_line":"        elif object_type \u003d\u003d enums.ObjectType.SYMMETRIC_KEY:"},{"line_number":442,"context_line":"            algorithm \u003d getattr(enums.CryptographicAlgorithm,"},{"line_number":443,"context_line":"                                key_spec.alg.upper(),"},{"line_number":444,"context_line":"                                None)"},{"line_number":445,"context_line":"            length \u003d key_spec.bit_length"},{"line_number":446,"context_line":"            kmip_object \u003d objects.SymmetricKey(algorithm, length,"},{"line_number":447,"context_line":"                                               normalized_secret)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_25460724","line":444,"updated":"2015-08-17 19:59:00.000000000","message":"Ditto","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"3c49cff61002bff5927a3dbc75d1e1a37526e373","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        elif kmip_algorithm \u003d\u003d enums.CryptographicAlgorithm.HMAC_SHA512:"},{"line_number":485,"context_line":"            algorithm \u003d ss.KeyAlgorithm.HMACSHA512"},{"line_number":486,"context_line":"        elif kmip_algorithm \u003d\u003d enums.CryptographicAlgorithm.TRIPLE_DES:"},{"line_number":487,"context_line":"            algorithm \u003d ss.KeyAlgorithm.DESEDE"},{"line_number":488,"context_line":"        return algorithm"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def _map_type_ss_to_kmip(self, object_type):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_10eeb18b","line":487,"updated":"2015-08-17 15:05:47.000000000","message":"I like that this is easier to read than the _map_ functions that were removed, but am concerned that it could get out of sync with the valid_alg_dict at the beginning.  Granted, there may not be many updates to the algorithms supported in the near future.  Thoughts?","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"3cf5a47dc54674180e652a2c18ece2e7914d3064","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        elif kmip_algorithm \u003d\u003d enums.CryptographicAlgorithm.HMAC_SHA512:"},{"line_number":485,"context_line":"            algorithm \u003d ss.KeyAlgorithm.HMACSHA512"},{"line_number":486,"context_line":"        elif kmip_algorithm \u003d\u003d enums.CryptographicAlgorithm.TRIPLE_DES:"},{"line_number":487,"context_line":"            algorithm \u003d ss.KeyAlgorithm.DESEDE"},{"line_number":488,"context_line":"        return algorithm"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def _map_type_ss_to_kmip(self, object_type):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_c5ce2b83","line":487,"in_reply_to":"fa1b9901_10eeb18b","updated":"2015-08-17 19:59:00.000000000","message":"I concur. It would be prettier in my opinion to store the association in a global dictionary and get the algorithm from that dictionary -- e.g.,\n\n  ALGORITHMS \u003d {\n    enums.CryptographicAlgorithm.HMAC_SHA1: ss.KeyAlgorithm.HMACSHA1,\n    ...\n  }\n\n  def _get_barbican_algorithm(self. kmip_algorithm):\n    return ALGORITHMS.get(kmip_algorithm, kmip_algorithm.name)","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"0d190369890a799c629c6154e2df9b39be28ad16","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        elif kmip_algorithm \u003d\u003d enums.CryptographicAlgorithm.HMAC_SHA512:"},{"line_number":485,"context_line":"            algorithm \u003d ss.KeyAlgorithm.HMACSHA512"},{"line_number":486,"context_line":"        elif kmip_algorithm \u003d\u003d enums.CryptographicAlgorithm.TRIPLE_DES:"},{"line_number":487,"context_line":"            algorithm \u003d ss.KeyAlgorithm.DESEDE"},{"line_number":488,"context_line":"        return algorithm"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def _map_type_ss_to_kmip(self, object_type):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_e98accbe","line":487,"in_reply_to":"fa1b9901_c5ce2b83","updated":"2015-08-19 13:45:25.000000000","message":"OK, I will change to a dictionary.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"99272650bdf02d03a38adac723504918eba39aa3","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                ss.KeyAlgorithm.HMACSHA384,"},{"line_number":206,"context_line":"            enums.CryptographicAlgorithm.HMAC_SHA512:"},{"line_number":207,"context_line":"                ss.KeyAlgorithm.HMACSHA512,"},{"line_number":208,"context_line":"            enums.CryptographicAlgorithm.RSA: ss.KeyAlgorithm.RSA"},{"line_number":209,"context_line":"        }"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        if conf.kmip_plugin.keyfile is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_6095e686","line":208,"updated":"2015-08-21 16:21:07.000000000","message":"I still wish there was an easy way to get this information out of the valid_alg_dict so that there aren\u0027t two separate dictionaries.  This does make for cleaner code later on, so it\u0027s fine with me if you think it\u0027s fine.","commit_id":"066e5f68ff191984ff52fde6e52046ddfe27d806"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"3e174b6295cf52fefc23b8ff3a5c64b4c49e4fd2","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                ss.KeyAlgorithm.HMACSHA384,"},{"line_number":206,"context_line":"            enums.CryptographicAlgorithm.HMAC_SHA512:"},{"line_number":207,"context_line":"                ss.KeyAlgorithm.HMACSHA512,"},{"line_number":208,"context_line":"            enums.CryptographicAlgorithm.RSA: ss.KeyAlgorithm.RSA"},{"line_number":209,"context_line":"        }"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        if conf.kmip_plugin.keyfile is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_149f8cb5","line":208,"in_reply_to":"fa1b9901_6095e686","updated":"2015-08-21 17:42:08.000000000","message":"I agree. The problem is that I would have to iterate over valid_alg_dict to find the right entry. I think its own map is better, but I can change if that is the consensus.","commit_id":"066e5f68ff191984ff52fde6e52046ddfe27d806"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"99272650bdf02d03a38adac723504918eba39aa3","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        algorithm \u003d getattr(enums.CryptographicAlgorithm,"},{"line_number":259,"context_line":"                            key_spec.alg.upper(),"},{"line_number":260,"context_line":"                            None)"},{"line_number":261,"context_line":"        try:"},{"line_number":262,"context_line":"            with self.client:"},{"line_number":263,"context_line":"                LOG.debug(\"Opened connection to KMIP client for secret \" +"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_bdaecb96","line":260,"updated":"2015-08-21 16:21:07.000000000","message":"This will return None for desede, hmacsha1, hmacsha256, hmacsha384, hmacsha512 because the names are slightly different between Barbican and PyKMIP.\n\nYou could use the mapping the valid_alg_dict, yeah?","commit_id":"066e5f68ff191984ff52fde6e52046ddfe27d806"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"3e174b6295cf52fefc23b8ff3a5c64b4c49e4fd2","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        algorithm \u003d getattr(enums.CryptographicAlgorithm,"},{"line_number":259,"context_line":"                            key_spec.alg.upper(),"},{"line_number":260,"context_line":"                            None)"},{"line_number":261,"context_line":"        try:"},{"line_number":262,"context_line":"            with self.client:"},{"line_number":263,"context_line":"                LOG.debug(\"Opened connection to KMIP client for secret \" +"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_49024d0d","line":260,"in_reply_to":"fa1b9901_bdaecb96","updated":"2015-08-21 17:42:08.000000000","message":"Good catch! That would have definitely bitten us later.","commit_id":"066e5f68ff191984ff52fde6e52046ddfe27d806"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"99272650bdf02d03a38adac723504918eba39aa3","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        algorithm \u003d getattr(enums.CryptographicAlgorithm,"},{"line_number":301,"context_line":"                            key_spec.alg.upper(),"},{"line_number":302,"context_line":"                            None)"},{"line_number":303,"context_line":"        length \u003d key_spec.bit_length"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_5df76f8c","line":302,"updated":"2015-08-21 16:21:07.000000000","message":"This will return None for diffie_hellman and ec because they are called slightly different things between Barbican and PyKMIP.","commit_id":"066e5f68ff191984ff52fde6e52046ddfe27d806"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"3e174b6295cf52fefc23b8ff3a5c64b4c49e4fd2","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        algorithm \u003d getattr(enums.CryptographicAlgorithm,"},{"line_number":301,"context_line":"                            key_spec.alg.upper(),"},{"line_number":302,"context_line":"                            None)"},{"line_number":303,"context_line":"        length \u003d key_spec.bit_length"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_c915fd49","line":302,"in_reply_to":"fa1b9901_5df76f8c","updated":"2015-08-21 17:42:08.000000000","message":"Good catch! That would have definitely bitten us later.","commit_id":"066e5f68ff191984ff52fde6e52046ddfe27d806"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9b1dadbfad671b186fa347727a8642d574249ad3","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                                   passphrase_metadata)"},{"line_number":316,"context_line":"        except Exception as e:"},{"line_number":317,"context_line":"            LOG.exception(u._LE(\"Error opening or writing to client\"))"},{"line_number":318,"context_line":"            raise ss.SecretGeneralException(str(e))"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def store_secret(self, secret_dto):"},{"line_number":321,"context_line":"        \"\"\"Stores a secret"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_47ed4c24","line":318,"updated":"2015-09-01 18:28:34.000000000","message":"If all you are doing is raising a general exception, you probably don\u0027t need to handle try/excepts here (rather let barbican core handle this). Just an observation, not looking for a patch. :)","commit_id":"aa7833f60a6eb3e0844edc113be8d011885fb7af"}],"barbican/tests/plugin/test_kmip.py":[{"author":{"_account_id":7764,"name":"Peter Hamilton","email":"peter.hamilton@jhuapl.edu","username":"Peter"},"change_message_id":"0037c34df9e326b44396c483e387e6329bc805de","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        self.sample_secret \u003d get_sample_symmetric_key()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        self.secret_store.client.proxy.open \u003d mock.MagicMock("},{"line_number":143,"context_line":"            proxy.KMIPProxy().open)"},{"line_number":144,"context_line":"        self.secret_store.client.proxy.close \u003d mock.MagicMock("},{"line_number":145,"context_line":"            proxy.KMIPProxy().close)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_34f170ce","line":142,"updated":"2015-08-17 12:51:12.000000000","message":"I still have reservations about this. This leverages an (indirect) dependency on the original KMIPProxy client. If we ever want to change the internals of the ProxyKmipClient, or the public interface for the KMIPProxy, doing so may break these references.","commit_id":"2f5f2a2e3a8a7aac51f337124a44c894577341c9"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"3cf5a47dc54674180e652a2c18ece2e7914d3064","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.sample_secret \u003d get_sample_symmetric_key()"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        self.secret_store.client.proxy.open \u003d mock.MagicMock("},{"line_number":144,"context_line":"            proxy.KMIPProxy().open)"},{"line_number":145,"context_line":"        self.secret_store.client.proxy.close \u003d mock.MagicMock("},{"line_number":146,"context_line":"            proxy.KMIPProxy().close)"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_65095f95","line":144,"updated":"2015-08-17 19:59:00.000000000","message":"I think it\u0027s better to mock the client directly rather than its internal members\u0027s functions. Otherwise, you still have a dependency on the kmip.core modules.\n\nThis could be part of future cleanup, but it\u0027s worthwhile to discuss as part of this change.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"0d190369890a799c629c6154e2df9b39be28ad16","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.sample_secret \u003d get_sample_symmetric_key()"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        self.secret_store.client.proxy.open \u003d mock.MagicMock("},{"line_number":144,"context_line":"            proxy.KMIPProxy().open)"},{"line_number":145,"context_line":"        self.secret_store.client.proxy.close \u003d mock.MagicMock("},{"line_number":146,"context_line":"            proxy.KMIPProxy().close)"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_ac770239","line":144,"in_reply_to":"fa1b9901_65095f95","updated":"2015-08-19 13:45:25.000000000","message":"I agree that in the long term that would be best. I chose to keep it like this for now for a couple of reasons.\n\n1. This was the fastest way :)\n2. I liked how it proved that the calls that really matter were being invoked, and we know those calls worked in the past.\n3. It invoked more of the PyKMIP code.\n\nThe downside is we are dependent upon the hazmat layer in PyKMIP. I think we should change because the point was to not be dependent upon that later. I will followup with a subsequent patch to change the mocking.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"ea2c387f7cf2504af265b7ece20525eed439e0b2","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.sample_secret \u003d get_sample_symmetric_key()"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        self.secret_store.client.proxy.open \u003d mock.MagicMock("},{"line_number":144,"context_line":"            proxy.KMIPProxy().open)"},{"line_number":145,"context_line":"        self.secret_store.client.proxy.close \u003d mock.MagicMock("},{"line_number":146,"context_line":"            proxy.KMIPProxy().close)"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_3841db38","line":144,"in_reply_to":"fa1b9901_ac770239","updated":"2015-08-19 19:53:07.000000000","message":"Okay, subsequent patch sounds good.","commit_id":"8f40e1a39b990d153434dc4b4e5f81b75cdc032b"}]}
