)]}'
{"castellan/key_manager/barbican_key_manager.py":[{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"b83822307855e2598febba721bd03869eaed90f0","unresolved":false,"context_lines":[{"line_number":61,"context_line":"class BarbicanKeyManager(key_manager.KeyManager):"},{"line_number":62,"context_line":"    \"\"\"Key Manager Interface that wraps the Barbican client API.\"\"\""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    secret_type_dict \u003d {"},{"line_number":65,"context_line":"        op_data.OpaqueData: \u0027opaque\u0027,"},{"line_number":66,"context_line":"        passphrase.Passphrase: \u0027passphrase\u0027,"},{"line_number":67,"context_line":"        pri_key.PrivateKey: \u0027private\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_b6a6e30c","line":64,"updated":"2015-08-07 16:08:40.000000000","message":"_secret_type_dict ?","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":61,"context_line":"class BarbicanKeyManager(key_manager.KeyManager):"},{"line_number":62,"context_line":"    \"\"\"Key Manager Interface that wraps the Barbican client API.\"\"\""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    secret_type_dict \u003d {"},{"line_number":65,"context_line":"        op_data.OpaqueData: \u0027opaque\u0027,"},{"line_number":66,"context_line":"        passphrase.Passphrase: \u0027passphrase\u0027,"},{"line_number":67,"context_line":"        pri_key.PrivateKey: \u0027private\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_b9adb4ea","line":64,"in_reply_to":"1a4dcd0f_a9434a12","updated":"2015-08-12 13:58:10.000000000","message":"Will do","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"86328cf3a77a3171c34df6faa3cf84c73229bd48","unresolved":false,"context_lines":[{"line_number":61,"context_line":"class BarbicanKeyManager(key_manager.KeyManager):"},{"line_number":62,"context_line":"    \"\"\"Key Manager Interface that wraps the Barbican client API.\"\"\""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    secret_type_dict \u003d {"},{"line_number":65,"context_line":"        op_data.OpaqueData: \u0027opaque\u0027,"},{"line_number":66,"context_line":"        passphrase.Passphrase: \u0027passphrase\u0027,"},{"line_number":67,"context_line":"        pri_key.PrivateKey: \u0027private\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_a9434a12","line":64,"in_reply_to":"1a4dcd0f_b6a6e30c","updated":"2015-08-11 20:55:41.000000000","message":"I\u0027d prefer that too...","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":7012,"name":"Brianna Poulos","email":"Brianna.Poulos@jhuapl.edu","username":"brianna-poulos"},"change_message_id":"03474b269b6f08270dd8078f5d7823aa9d5549e6","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    def create_key_pair(self, context, algorithm, length, expiration\u003dNone):"},{"line_number":155,"context_line":"        \"\"\"Creates an asymmetric key pair."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        Not implemented yet."},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        :param context: contains information of the user and the environment"},{"line_number":160,"context_line":"                     for the request (castellan/context.py)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_7b083f2e","line":157,"updated":"2015-08-07 17:44:45.000000000","message":"Should this line remain? It doesn\u0027t seem applicable anymore with this update.","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"382e9826412ce73fd06301cd779055217e4641aa","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    def create_key_pair(self, context, algorithm, length, expiration\u003dNone):"},{"line_number":155,"context_line":"        \"\"\"Creates an asymmetric key pair."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        Not implemented yet."},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        :param context: contains information of the user and the environment"},{"line_number":160,"context_line":"                     for the request (castellan/context.py)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_c05c494d","line":157,"in_reply_to":"1a4dcd0f_7b083f2e","updated":"2015-08-12 13:54:04.000000000","message":"Agreed","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    def create_key_pair(self, context, algorithm, length, expiration\u003dNone):"},{"line_number":155,"context_line":"        \"\"\"Creates an asymmetric key pair."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        Not implemented yet."},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        :param context: contains information of the user and the environment"},{"line_number":160,"context_line":"                     for the request (castellan/context.py)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_79b3ac4d","line":157,"in_reply_to":"1a4dcd0f_c05c494d","updated":"2015-08-12 13:58:10.000000000","message":"Thanks for catching that!","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"b83822307855e2598febba721bd03869eaed90f0","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                expiration\u003dexpiration)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"            order_ref \u003d key_pair_order.submit()"},{"line_number":179,"context_line":"            order \u003d barbican_client.orders.get(order_ref)"},{"line_number":180,"context_line":"            container \u003d barbican_client.containers.get(order.container_ref)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            private_key_uuid \u003d self._retrieve_secret_uuid("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_56751f61","line":179,"updated":"2015-08-07 16:08:40.000000000","message":"order is not guaranteed to have a container_ref here.  We need to poll order.status until it changes to \"ACTIVE\"","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"86328cf3a77a3171c34df6faa3cf84c73229bd48","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                expiration\u003dexpiration)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"            order_ref \u003d key_pair_order.submit()"},{"line_number":179,"context_line":"            order \u003d barbican_client.orders.get(order_ref)"},{"line_number":180,"context_line":"            container \u003d barbican_client.containers.get(order.container_ref)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            private_key_uuid \u003d self._retrieve_secret_uuid("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_c95fb6e3","line":179,"in_reply_to":"1a4dcd0f_56751f61","updated":"2015-08-11 20:55:41.000000000","message":"+1","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                expiration\u003dexpiration)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"            order_ref \u003d key_pair_order.submit()"},{"line_number":179,"context_line":"            order \u003d barbican_client.orders.get(order_ref)"},{"line_number":180,"context_line":"            container \u003d barbican_client.containers.get(order.container_ref)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            private_key_uuid \u003d self._retrieve_secret_uuid("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_598d907a","line":179,"in_reply_to":"1a4dcd0f_c95fb6e3","updated":"2015-08-12 13:58:10.000000000","message":"Will add in polling, will check every second for a max of 60 seconds.","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"382e9826412ce73fd06301cd779055217e4641aa","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                bit_length \u003d managed_object.get_length()"},{"line_number":213,"context_line":"            else:"},{"line_number":214,"context_line":"                algorithm \u003d None"},{"line_number":215,"context_line":"                bit_length \u003d None"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"            encoded_object \u003d bytes(managed_object.get_encoded())"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_63745ffd","line":215,"updated":"2015-08-12 13:54:04.000000000","message":"I could be complete wrong, but I think the Pythonic way to handle this is more along the following lines:\n\n  try:\n    algorithm \u003d managed_object.get_algorithm()\n  except AttributeError:\n    algorithm \u003d None\n\n  try:\n    bit_length \u003d managed_object.get_length()\n  except AttributeError:\n    bit_length \u003d None\n\nOtherwise, what happens if someone passes a managed object to this method that has both the get_algorithm and get_length methods but does not inherit from the Key class. It would look like a key but the existing code wouldn\u0027t handle it correctly.","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                bit_length \u003d managed_object.get_length()"},{"line_number":213,"context_line":"            else:"},{"line_number":214,"context_line":"                algorithm \u003d None"},{"line_number":215,"context_line":"                bit_length \u003d None"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"            encoded_object \u003d bytes(managed_object.get_encoded())"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_f9cb3ca2","line":215,"in_reply_to":"1a4dcd0f_63745ffd","updated":"2015-08-12 13:58:10.000000000","message":"Joel, can you have a try block within a try block?","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"3e3983fb6f766062f3f4e84d05e9b15e8222ae51","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                bit_length \u003d managed_object.get_length()"},{"line_number":213,"context_line":"            else:"},{"line_number":214,"context_line":"                algorithm \u003d None"},{"line_number":215,"context_line":"                bit_length \u003d None"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"            encoded_object \u003d bytes(managed_object.get_encoded())"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_a4e22300","line":215,"in_reply_to":"1a4dcd0f_f9cb3ca2","updated":"2015-08-13 18:48:03.000000000","message":"Yes","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"382e9826412ce73fd06301cd779055217e4641aa","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        # after the last \u0027/\u0027, which is the UUID."},{"line_number":283,"context_line":"        return secret_ref.rpartition(\u0027/\u0027)[2]"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def _get_pem_components(self, pem):"},{"line_number":286,"context_line":"        \"\"\"Returns the PEM content, header, and footer."},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        This parses the PEM string and returns the PEM header, content, and"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_5e7ed6af","line":285,"updated":"2015-08-12 13:54:04.000000000","message":"Missing unit test(s) for this method.","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        # after the last \u0027/\u0027, which is the UUID."},{"line_number":283,"context_line":"        return secret_ref.rpartition(\u0027/\u0027)[2]"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def _get_pem_components(self, pem):"},{"line_number":286,"context_line":"        \"\"\"Returns the PEM content, header, and footer."},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        This parses the PEM string and returns the PEM header, content, and"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_d95440c7","line":285,"in_reply_to":"1a4dcd0f_5e7ed6af","updated":"2015-08-12 13:58:10.000000000","message":"Will do","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"382e9826412ce73fd06301cd779055217e4641aa","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        delim \u003d b\u0027-----\u0027"},{"line_number":294,"context_line":"        splits \u003d pem.split(delim)"},{"line_number":295,"context_line":"        if len(splits) !\u003d 5 or splits[0] !\u003d \"\" or splits[4] !\u003d \"\":"},{"line_number":296,"context_line":"            raise ValueError(\"secret could not be decoded\")"},{"line_number":297,"context_line":"        header \u003d delim + splits[1] + delim"},{"line_number":298,"context_line":"        content \u003d splits[2]"},{"line_number":299,"context_line":"        footer \u003d delim + splits[3] + delim"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_83a72ba6","line":296,"updated":"2015-08-12 13:54:04.000000000","message":"nit: secret -\u003e PEM data","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        delim \u003d b\u0027-----\u0027"},{"line_number":294,"context_line":"        splits \u003d pem.split(delim)"},{"line_number":295,"context_line":"        if len(splits) !\u003d 5 or splits[0] !\u003d \"\" or splits[4] !\u003d \"\":"},{"line_number":296,"context_line":"            raise ValueError(\"secret could not be decoded\")"},{"line_number":297,"context_line":"        header \u003d delim + splits[1] + delim"},{"line_number":298,"context_line":"        content \u003d splits[2]"},{"line_number":299,"context_line":"        footer \u003d delim + splits[3] + delim"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_190628ce","line":296,"in_reply_to":"1a4dcd0f_83a72ba6","updated":"2015-08-12 13:58:10.000000000","message":"Will change","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"382e9826412ce73fd06301cd779055217e4641aa","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        footer \u003d delim + splits[3] + delim"},{"line_number":300,"context_line":"        return (header, content, footer)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def _is_pem_payload(self, payload):"},{"line_number":303,"context_line":"        \"\"\"Tests whether payload is in PEM format."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        This parses the payload for the PEM header and footer strings. If it"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_3e698af9","line":302,"updated":"2015-08-12 13:54:04.000000000","message":"Missing unit test(s) for this method.","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        footer \u003d delim + splits[3] + delim"},{"line_number":300,"context_line":"        return (header, content, footer)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def _is_pem_payload(self, payload):"},{"line_number":303,"context_line":"        \"\"\"Tests whether payload is in PEM format."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        This parses the payload for the PEM header and footer strings. If it"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_d90be0d3","line":302,"in_reply_to":"1a4dcd0f_3e698af9","updated":"2015-08-12 13:58:10.000000000","message":"Will add","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"382e9826412ce73fd06301cd779055217e4641aa","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        finds the header and footer strings then it is assumed to be a PEM"},{"line_number":307,"context_line":"        payload."},{"line_number":308,"context_line":"        \"\"\""},{"line_number":309,"context_line":"        delim \u003d b\u0027-----\u0027"},{"line_number":310,"context_line":"        #raise Exception(str(type(payload)), payload)"},{"line_number":311,"context_line":"        splits \u003d payload.split(delim)"},{"line_number":312,"context_line":"        if len(splits) !\u003d 5 or splits[0] !\u003d \"\" or splits[4] !\u003d \"\":"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_a3d267fe","line":309,"updated":"2015-08-12 13:54:04.000000000","message":"Extract constant since used in _get_pem_components as well as here.","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        finds the header and footer strings then it is assumed to be a PEM"},{"line_number":307,"context_line":"        payload."},{"line_number":308,"context_line":"        \"\"\""},{"line_number":309,"context_line":"        delim \u003d b\u0027-----\u0027"},{"line_number":310,"context_line":"        #raise Exception(str(type(payload)), payload)"},{"line_number":311,"context_line":"        splits \u003d payload.split(delim)"},{"line_number":312,"context_line":"        if len(splits) !\u003d 5 or splits[0] !\u003d \"\" or splits[4] !\u003d \"\":"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_590030ab","line":309,"in_reply_to":"1a4dcd0f_a3d267fe","updated":"2015-08-12 13:58:10.000000000","message":"Will do","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"382e9826412ce73fd06301cd779055217e4641aa","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        payload."},{"line_number":308,"context_line":"        \"\"\""},{"line_number":309,"context_line":"        delim \u003d b\u0027-----\u0027"},{"line_number":310,"context_line":"        #raise Exception(str(type(payload)), payload)"},{"line_number":311,"context_line":"        splits \u003d payload.split(delim)"},{"line_number":312,"context_line":"        if len(splits) !\u003d 5 or splits[0] !\u003d \"\" or splits[4] !\u003d \"\":"},{"line_number":313,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_23897726","line":310,"updated":"2015-08-12 13:54:04.000000000","message":"Please remove commented code.","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        payload."},{"line_number":308,"context_line":"        \"\"\""},{"line_number":309,"context_line":"        delim \u003d b\u0027-----\u0027"},{"line_number":310,"context_line":"        #raise Exception(str(type(payload)), payload)"},{"line_number":311,"context_line":"        splits \u003d payload.split(delim)"},{"line_number":312,"context_line":"        if len(splits) !\u003d 5 or splits[0] !\u003d \"\" or splits[4] !\u003d \"\":"},{"line_number":313,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_595270df","line":310,"in_reply_to":"1a4dcd0f_23897726","updated":"2015-08-12 13:58:10.000000000","message":"Thanks for catching that!","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"382e9826412ce73fd06301cd779055217e4641aa","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        delim \u003d b\u0027-----\u0027"},{"line_number":310,"context_line":"        #raise Exception(str(type(payload)), payload)"},{"line_number":311,"context_line":"        splits \u003d payload.split(delim)"},{"line_number":312,"context_line":"        if len(splits) !\u003d 5 or splits[0] !\u003d \"\" or splits[4] !\u003d \"\":"},{"line_number":313,"context_line":"            return False"},{"line_number":314,"context_line":"        else:"},{"line_number":315,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_fe42420e","line":312,"updated":"2015-08-12 13:54:04.000000000","message":"All this code duplicates _get_pem_components. I think it would be better to split out a helper method or simply catch the ValueError raised by _get_pem_components and return False.","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        delim \u003d b\u0027-----\u0027"},{"line_number":310,"context_line":"        #raise Exception(str(type(payload)), payload)"},{"line_number":311,"context_line":"        splits \u003d payload.split(delim)"},{"line_number":312,"context_line":"        if len(splits) !\u003d 5 or splits[0] !\u003d \"\" or splits[4] !\u003d \"\":"},{"line_number":313,"context_line":"            return False"},{"line_number":314,"context_line":"        else:"},{"line_number":315,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_192dc845","line":312,"in_reply_to":"1a4dcd0f_fe42420e","updated":"2015-08-12 13:58:10.000000000","message":"Good idea!  Will do","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"382e9826412ce73fd06301cd779055217e4641aa","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        else:"},{"line_number":315,"context_line":"            return True"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _get_secret_data(self, secret):"},{"line_number":318,"context_line":"        \"\"\"Retrieves the secret data given a secret and content_type."},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        :param secret: the secret from barbican with the payload of data"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_3ef42a59","line":317,"updated":"2015-08-12 13:54:04.000000000","message":"Missing unit test(s) for this method.","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        else:"},{"line_number":315,"context_line":"            return True"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _get_secret_data(self, secret):"},{"line_number":318,"context_line":"        \"\"\"Retrieves the secret data given a secret and content_type."},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        :param secret: the secret from barbican with the payload of data"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_9921d84f","line":317,"in_reply_to":"1a4dcd0f_3ef42a59","updated":"2015-08-12 13:58:10.000000000","message":"Will do!","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"382e9826412ce73fd06301cd779055217e4641aa","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return bytearray(secret.payload)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _get_castellan_object(self, secret):"},{"line_number":333,"context_line":"        \"\"\"Creates a Castellan managed object given the Barbican secret."},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        :param secret: the secret from barbican with the payload of data"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_3e7f4ae1","line":332,"updated":"2015-08-12 13:54:04.000000000","message":"Missing unit test(s) for this method.","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"0faa103c4609b3a9c40fe0c7646f1ff446a93411","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        else:"},{"line_number":330,"context_line":"            return bytearray(secret.payload)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _get_castellan_object(self, secret):"},{"line_number":333,"context_line":"        \"\"\"Creates a Castellan managed object given the Barbican secret."},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        :param secret: the secret from barbican with the payload of data"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_19d4e81d","line":332,"in_reply_to":"1a4dcd0f_3e7f4ae1","updated":"2015-08-12 13:58:10.000000000","message":"Will add unit tests","commit_id":"6094259812468391bb3312b7d0374831320f8ec8"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"ae85938be59c204deb2944c4a2de18b79e56e5d4","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            LOG.error(msg)"},{"line_number":100,"context_line":"            raise exception.Forbidden(msg)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if not hasattr(context, \u0027project_id\u0027) or context.project_id is None:"},{"line_number":103,"context_line":"            msg \u003d u._(\"Unable to create Barbican Client without project_id.\")"},{"line_number":104,"context_line":"            LOG.error(msg)"},{"line_number":105,"context_line":"            raise exception.KeyManagerError(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_6704f17d","line":102,"updated":"2015-08-18 06:49:13.000000000","message":"I\u0027m a little confused on how context is supposed to be used.  Some of the docstrings in this module have references to castellan/context.py but I can\u0027t seem to find it.\n\nSince the context object is used in all the methods of the interface, I would expect it to be a generic object such that code that uses castellan could be changed to use another backend by just changing the conf file to point to a new plugin and adding the conf values specific to the new plugin.\n\nBut all the use of context in this patch is very specific to Barbican.  Here for example we\u0027re checking for context.project_id, and in _get_keystone_session() below we use context.auth_token.\n\nIt seems that trying to code against castellan using the barbican backend would produce code that breaks unless every other plugin also uses context.project_id and context.auth_token.\n\nI think we may need to define a generic Context object(s) that can be used for context across any backend.  Or is that what castellan/context.py will be?","commit_id":"93a1d5c84ff0e9f4245927cfeef57e6b4fc8e6a4"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"112b66359e81aa903b456a9e9bae5d06987ad375","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            LOG.error(msg)"},{"line_number":100,"context_line":"            raise exception.Forbidden(msg)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if not hasattr(context, \u0027project_id\u0027) or context.project_id is None:"},{"line_number":103,"context_line":"            msg \u003d u._(\"Unable to create Barbican Client without project_id.\")"},{"line_number":104,"context_line":"            LOG.error(msg)"},{"line_number":105,"context_line":"            raise exception.KeyManagerError(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_fe67d9e6","line":102,"in_reply_to":"fa1b9901_4919aa87","updated":"2015-08-19 16:01:35.000000000","message":"All objects should have \u0027tenant\u0027, so I\u0027ll just check for that.  The context should be the same whether it\u0027s v2 or v3.\n\nThat\u0027s correct, the other plugins would need to change the oslo.context into something that makes sense.  Ideally, you could use a KMIP device that can authenticate using Keystone tokens.\n\n+1 for docstring updates.","commit_id":"93a1d5c84ff0e9f4245927cfeef57e6b4fc8e6a4"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"345659d0f4c6edbdf845867e38293f1b6284439b","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            LOG.error(msg)"},{"line_number":100,"context_line":"            raise exception.Forbidden(msg)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if not hasattr(context, \u0027project_id\u0027) or context.project_id is None:"},{"line_number":103,"context_line":"            msg \u003d u._(\"Unable to create Barbican Client without project_id.\")"},{"line_number":104,"context_line":"            LOG.error(msg)"},{"line_number":105,"context_line":"            raise exception.KeyManagerError(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_764fb0bd","line":102,"in_reply_to":"fa1b9901_6704f17d","updated":"2015-08-18 14:35:37.000000000","message":"Thanks for pointing that out!  The docstrings that reference castellan/context.py are a little misleading and should probably be changed.  castellan/context.py isn\u0027t really being used by anything at this point.\n\nThe context object that is passed in will be the context that was created by the project using Castellan.  For example, with encrypted cinder volumes, the context that will be passed in is Cinder\u0027s context object.\n\nAll OpenStack context objects *should* inherit from oslo_context at this point.  oslo_context does have auth_token and tenant, which is what project_id is.  project_id was used here to address a bug in the cinder key manager, which is what I was basing this off of. https://bugs.launchpad.net/cinder/+bug/1421795 (related fix here: https://review.openstack.org/#/c/155875/5/cinder/keymgr/barbican.py\n\nAfter looking at this some more, I realized I should change project_id to tenant here.","commit_id":"93a1d5c84ff0e9f4245927cfeef57e6b4fc8e6a4"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"ffde1296100a794e1e612177f9301ad936a83253","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            LOG.error(msg)"},{"line_number":100,"context_line":"            raise exception.Forbidden(msg)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        if not hasattr(context, \u0027project_id\u0027) or context.project_id is None:"},{"line_number":103,"context_line":"            msg \u003d u._(\"Unable to create Barbican Client without project_id.\")"},{"line_number":104,"context_line":"            LOG.error(msg)"},{"line_number":105,"context_line":"            raise exception.KeyManagerError(msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_4919aa87","line":102,"in_reply_to":"fa1b9901_764fb0bd","updated":"2015-08-18 15:49:07.000000000","message":"Do we need to check for both?  Is the context different whether we run Keystone v2 vs v3?  So many questions??? :)\n\nI\u0027m assuming that non-barbican plugins, (eg, the kmip castellan plugin) would be responsible for changing the oslo.context into something that makes sense for it?  Like turn the token/tenant into kmip credentials that will let it access the kmip device?\n\nI don\u0027t want to hold up this patch, but we should follow up with docstring updates, and make it clear that context is expected to be an instance of oslo.context.","commit_id":"93a1d5c84ff0e9f4245927cfeef57e6b4fc8e6a4"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"e4c049e5406487f2932f68fb8f29cf1b34474b8e","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        number_of_retries \u003d self.conf.barbican.number_of_retries"},{"line_number":266,"context_line":"        retry_delay \u003d self.conf.barbican.retry_delay"},{"line_number":267,"context_line":"        for n in range(number_of_retries):"},{"line_number":268,"context_line":"            if order.status !\u003d active:"},{"line_number":269,"context_line":"                LOG.info(\"Retry attempt #{} out of {}: Order status is \""},{"line_number":270,"context_line":"                         \"\u0027{}\u0027. Waiting for \u0027{}\u0027, will retry in {} \""},{"line_number":271,"context_line":"                         \"seconds\".format(n, number_of_retries, order.status,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_4c00d801","line":268,"updated":"2015-08-18 15:50:23.000000000","message":"@Doug, does this code need to re-retrieve the order from Barbican in order to work correctly, or does calling \u0027order.status\u0027 reach out to Barbican to get the correct status?","commit_id":"93a1d5c84ff0e9f4245927cfeef57e6b4fc8e6a4"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"2d82a2a992f67009c9785825052e61ac8ebd172a","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        number_of_retries \u003d self.conf.barbican.number_of_retries"},{"line_number":266,"context_line":"        retry_delay \u003d self.conf.barbican.retry_delay"},{"line_number":267,"context_line":"        for n in range(number_of_retries):"},{"line_number":268,"context_line":"            if order.status !\u003d active:"},{"line_number":269,"context_line":"                LOG.info(\"Retry attempt #{} out of {}: Order status is \""},{"line_number":270,"context_line":"                         \"\u0027{}\u0027. Waiting for \u0027{}\u0027, will retry in {} \""},{"line_number":271,"context_line":"                         \"seconds\".format(n, number_of_retries, order.status,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_903d9ebd","line":268,"in_reply_to":"fa1b9901_4c00d801","updated":"2015-08-18 18:12:07.000000000","message":"Good question.  I think you do have to instantiate a new Order object in every iteration of the loop to fetch fresh Order metadata from Barbican every time.","commit_id":"93a1d5c84ff0e9f4245927cfeef57e6b4fc8e6a4"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"112b66359e81aa903b456a9e9bae5d06987ad375","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        number_of_retries \u003d self.conf.barbican.number_of_retries"},{"line_number":266,"context_line":"        retry_delay \u003d self.conf.barbican.retry_delay"},{"line_number":267,"context_line":"        for n in range(number_of_retries):"},{"line_number":268,"context_line":"            if order.status !\u003d active:"},{"line_number":269,"context_line":"                LOG.info(\"Retry attempt #{} out of {}: Order status is \""},{"line_number":270,"context_line":"                         \"\u0027{}\u0027. Waiting for \u0027{}\u0027, will retry in {} \""},{"line_number":271,"context_line":"                         \"seconds\".format(n, number_of_retries, order.status,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_be5de116","line":268,"in_reply_to":"fa1b9901_903d9ebd","updated":"2015-08-19 16:01:35.000000000","message":"Done.","commit_id":"93a1d5c84ff0e9f4245927cfeef57e6b4fc8e6a4"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"7e0405d6888eba89891060ba8f2194a393b9b8a4","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                                  \u0027interface\u0027: \u0027public\u0027}"},{"line_number":143,"context_line":"            return auth.get_endpoint(sess, **service_parameters)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def _create_base_url(self, auth, sess, endpoint):"},{"line_number":146,"context_line":"        if self.conf.barbican.barbican_api_version:"},{"line_number":147,"context_line":"            api_version \u003d self.conf.barbican.barbican_api_version"},{"line_number":148,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_4a0cf83a","line":145,"updated":"2015-08-19 18:01:17.000000000","message":"@Brianna, I figured out how to get the \u0027v1\u0027 from keystone!","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"a4e451ffbd64c223bf0dfd28bf91568230b94af4","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                expiration\u003dexpiration)"},{"line_number":183,"context_line":"            order_ref \u003d key_order.submit()"},{"line_number":184,"context_line":"            order \u003d barbican_client.orders.get(order_ref)"},{"line_number":185,"context_line":"            self._wait_until_order_is_active(context, order)"},{"line_number":186,"context_line":"            return self._retrieve_secret_uuid(order.secret_ref)"},{"line_number":187,"context_line":"        except (barbican_exceptions.HTTPAuthError,"},{"line_number":188,"context_line":"                barbican_exceptions.HTTPClientError,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_61c4055f","line":185,"updated":"2015-08-21 19:00:11.000000000","message":"I think _wait_until_order_is_active needs to return order that is found to be active. The reason I think that is because an order will not have a secret_ref until the order has been satisfied, and you use the secret_ref on the next line. I think if you have to wait then this will not work because the order on line 183 is saying order is not ready (meaning no secret_ref as well), and then you use that same order to get the secret_ref.\n\nI hope that makes sense. If not then let\u0027s chat.","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"654cf354fe6949690b9272881142072dfdbd70a5","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                expiration\u003dexpiration)"},{"line_number":183,"context_line":"            order_ref \u003d key_order.submit()"},{"line_number":184,"context_line":"            order \u003d barbican_client.orders.get(order_ref)"},{"line_number":185,"context_line":"            self._wait_until_order_is_active(context, order)"},{"line_number":186,"context_line":"            return self._retrieve_secret_uuid(order.secret_ref)"},{"line_number":187,"context_line":"        except (barbican_exceptions.HTTPAuthError,"},{"line_number":188,"context_line":"                barbican_exceptions.HTTPClientError,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_44c44891","line":185,"in_reply_to":"fa1b9901_61c4055f","updated":"2015-08-24 03:58:38.000000000","message":"Yes, makes sense!  I can\u0027t believe I missed that.","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"a4e451ffbd64c223bf0dfd28bf91568230b94af4","unresolved":false,"context_lines":[{"line_number":214,"context_line":""},{"line_number":215,"context_line":"            order_ref \u003d key_pair_order.submit()"},{"line_number":216,"context_line":"            order \u003d barbican_client.orders.get(order_ref)"},{"line_number":217,"context_line":"            self._wait_until_order_is_active(context, order)"},{"line_number":218,"context_line":"            container \u003d barbican_client.containers.get(order.container_ref)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"            private_key_uuid \u003d self._retrieve_secret_uuid("}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_21a5adb4","line":217,"updated":"2015-08-21 19:00:11.000000000","message":"Same comment as create_key.","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"a4e451ffbd64c223bf0dfd28bf91568230b94af4","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                algorithm \u003d None"},{"line_number":253,"context_line":"                bit_length \u003d None"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"            encoded_object \u003d bytes(managed_object.get_encoded())"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"            secret_type \u003d self._secret_type_dict.get(type(managed_object),"},{"line_number":258,"context_line":"                                                     \u0027opaque\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_c158718d","line":255,"updated":"2015-08-21 19:00:11.000000000","message":"Is bytes in 2.7?\n\nDo you need to call bytes if managed_object.get_encoded(..) is supposed to return a type of six.bytes?","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"654cf354fe6949690b9272881142072dfdbd70a5","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                algorithm \u003d None"},{"line_number":253,"context_line":"                bit_length \u003d None"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"            encoded_object \u003d bytes(managed_object.get_encoded())"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"            secret_type \u003d self._secret_type_dict.get(type(managed_object),"},{"line_number":258,"context_line":"                                                     \u0027opaque\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_c404d8c7","line":255,"in_reply_to":"fa1b9901_c158718d","updated":"2015-08-24 03:58:38.000000000","message":"Yes, bytes is in 2.7, though technically calling it here isn\u0027t really necessary, since supposedly get_encoded is supposed to return an object of the correct six.bytes type.  Though there\u0027s currently no error checking for that.","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"a4e451ffbd64c223bf0dfd28bf91568230b94af4","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            secret_type \u003d self._secret_type_dict.get(type(managed_object),"},{"line_number":258,"context_line":"                                                     \u0027opaque\u0027)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"            secret \u003d barbican_client.secrets.create(payload\u003dencoded_object,"},{"line_number":261,"context_line":"                                                    algorithm\u003dalgorithm,"},{"line_number":262,"context_line":"                                                    bit_length\u003dbit_length,"},{"line_number":263,"context_line":"                                                    expiration\u003dexpiration,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_446b0f86","line":260,"updated":"2015-08-21 19:00:11.000000000","message":"I\u0027m surprised that this works. The Barbican API states that private, public, and certificate are Base64(PEM). I would have thought that you would have needed to convert to PEM at the very least.","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"654cf354fe6949690b9272881142072dfdbd70a5","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            secret_type \u003d self._secret_type_dict.get(type(managed_object),"},{"line_number":258,"context_line":"                                                     \u0027opaque\u0027)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"            secret \u003d barbican_client.secrets.create(payload\u003dencoded_object,"},{"line_number":261,"context_line":"                                                    algorithm\u003dalgorithm,"},{"line_number":262,"context_line":"                                                    bit_length\u003dbit_length,"},{"line_number":263,"context_line":"                                                    expiration\u003dexpiration,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_8498206c","line":260,"in_reply_to":"fa1b9901_446b0f86","updated":"2015-08-24 03:58:38.000000000","message":"Oof really?  I\u0027m not finding where it says that, do you have a link?  It was working with the functional tests I wrote.","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"a4e451ffbd64c223bf0dfd28bf91568230b94af4","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _wait_until_order_is_active(self, context, order):"},{"line_number":288,"context_line":"        active \u003d u\u0027ACTIVE\u0027"},{"line_number":289,"context_line":"        barbican_client \u003d self._get_barbican_client(context)"},{"line_number":290,"context_line":"        number_of_retries \u003d self.conf.barbican.number_of_retries"},{"line_number":291,"context_line":"        retry_delay \u003d self.conf.barbican.retry_delay"},{"line_number":292,"context_line":"        for n in range(number_of_retries):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_81959989","line":289,"updated":"2015-08-21 19:00:11.000000000","message":"Do you need to create barbican_client or can you take it in as a parameter?","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"654cf354fe6949690b9272881142072dfdbd70a5","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _wait_until_order_is_active(self, context, order):"},{"line_number":288,"context_line":"        active \u003d u\u0027ACTIVE\u0027"},{"line_number":289,"context_line":"        barbican_client \u003d self._get_barbican_client(context)"},{"line_number":290,"context_line":"        number_of_retries \u003d self.conf.barbican.number_of_retries"},{"line_number":291,"context_line":"        retry_delay \u003d self.conf.barbican.retry_delay"},{"line_number":292,"context_line":"        for n in range(number_of_retries):"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_042090f6","line":289,"in_reply_to":"fa1b9901_81959989","updated":"2015-08-24 03:58:38.000000000","message":"Good idea!","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"a4e451ffbd64c223bf0dfd28bf91568230b94af4","unresolved":false,"context_lines":[{"line_number":380,"context_line":"        :returns: the castellan object"},{"line_number":381,"context_line":"        \"\"\""},{"line_number":382,"context_line":"        secret_type \u003d op_data.OpaqueData"},{"line_number":383,"context_line":"        for c_type, b_type in self._secret_type_dict.items():"},{"line_number":384,"context_line":"            if b_type \u003d\u003d secret.secret_type:"},{"line_number":385,"context_line":"                secret_type \u003d c_type"},{"line_number":386,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_41a9c123","line":383,"updated":"2015-08-21 19:00:11.000000000","message":"nit: can you rename c_type and b_type to something more descriptive? It is a little difficult to read this code.","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"654cf354fe6949690b9272881142072dfdbd70a5","unresolved":false,"context_lines":[{"line_number":380,"context_line":"        :returns: the castellan object"},{"line_number":381,"context_line":"        \"\"\""},{"line_number":382,"context_line":"        secret_type \u003d op_data.OpaqueData"},{"line_number":383,"context_line":"        for c_type, b_type in self._secret_type_dict.items():"},{"line_number":384,"context_line":"            if b_type \u003d\u003d secret.secret_type:"},{"line_number":385,"context_line":"                secret_type \u003d c_type"},{"line_number":386,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_244b54b2","line":383,"in_reply_to":"fa1b9901_41a9c123","updated":"2015-08-24 03:58:38.000000000","message":"Good point, it took me a second to remember what this stood for.","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"a4e451ffbd64c223bf0dfd28bf91568230b94af4","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        secret_type \u003d op_data.OpaqueData"},{"line_number":383,"context_line":"        for c_type, b_type in self._secret_type_dict.items():"},{"line_number":384,"context_line":"            if b_type \u003d\u003d secret.secret_type:"},{"line_number":385,"context_line":"                secret_type \u003d c_type"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        secret_data \u003d self._get_secret_data(secret)"},{"line_number":388,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_a121bdb6","line":385,"updated":"2015-08-21 19:00:11.000000000","message":"Here is where I figured out what c_type and b_type mean :)","commit_id":"738507e53054dbcf53f42cb08f3f1813c6a163ad"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"bd909428c49156b9331a4c84b3d1114a9268167a","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        auth \u003d identity.v3.Token("},{"line_number":135,"context_line":"            auth_url\u003dself.conf.barbican.keystone_endpoint,"},{"line_number":136,"context_line":"            token\u003dcontext.auth_token,"},{"line_number":137,"context_line":"            project_id\u003dcontext.tenant)"},{"line_number":138,"context_line":"        return auth"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def _get_barbican_endpoint(self, auth, sess):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_2ce814e2","line":137,"updated":"2015-08-27 13:43:34.000000000","message":"since this is a v3 token, do we need to be concerned about passing the project_domain and user_domain as well?","commit_id":"5fb4ac9741e431ae76b90eb505aca4a7e9d1e5c4"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"bd909428c49156b9331a4c84b3d1114a9268167a","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                          \u0027status\u0027: order.status,"},{"line_number":340,"context_line":"                          \u0027active\u0027: active,"},{"line_number":341,"context_line":"                          \u0027delay\u0027: retry_delay}"},{"line_number":342,"context_line":"                LOG.info(\"Retry attempt #%(attempt)i out of %(total)i: Order \""},{"line_number":343,"context_line":"                         \"status is \u0027%(status)s\u0027. Waiting for \u0027%(active)s\u0027, \""},{"line_number":344,"context_line":"                         \"will retry in %(delay)s seconds\" % kwargs)"},{"line_number":345,"context_line":"                time.sleep(retry_delay)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_ccbf18cf","line":342,"updated":"2015-08-27 13:43:34.000000000","message":"this should be wrapped with the translation u._LI","commit_id":"5fb4ac9741e431ae76b90eb505aca4a7e9d1e5c4"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"46691ab31c6995bce81ee8f9e7182cde1eb1b3e5","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        :returns: the secret data"},{"line_number":408,"context_line":"        \"\"\""},{"line_number":409,"context_line":"        if secret.secret_type in [\u0027public\u0027, \u0027private\u0027, \u0027certificate\u0027]:"},{"line_number":410,"context_line":"            if self._is_pem_payload(secret.payload):"},{"line_number":411,"context_line":"                payload \u003d base64.b64decode("},{"line_number":412,"context_line":"                    self._get_pem_components(secret.payload)[1])"},{"line_number":413,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_0f7502f8","line":410,"updated":"2015-08-27 14:03:07.000000000","message":"The payload should always be PEM.","commit_id":"5fb4ac9741e431ae76b90eb505aca4a7e9d1e5c4"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"46691ab31c6995bce81ee8f9e7182cde1eb1b3e5","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        if secret.secret_type in [\u0027public\u0027, \u0027private\u0027, \u0027certificate\u0027]:"},{"line_number":410,"context_line":"            if self._is_pem_payload(secret.payload):"},{"line_number":411,"context_line":"                payload \u003d base64.b64decode("},{"line_number":412,"context_line":"                    self._get_pem_components(secret.payload)[1])"},{"line_number":413,"context_line":"            else:"},{"line_number":414,"context_line":"                payload \u003d secret.payload"},{"line_number":415,"context_line":"            return bytes(payload)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_4f521a69","line":412,"updated":"2015-08-27 14:03:07.000000000","message":"You can use cryptography here since you will only be concerned with PKCS8.","commit_id":"5fb4ac9741e431ae76b90eb505aca4a7e9d1e5c4"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"4ebc6c87849239d0231abeafaaef72a424ca32bc","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                    \u0027\"http://localhost:9311/\"\u0027),"},{"line_number":49,"context_line":"    cfg.StrOpt(\u0027barbican_api_version\u0027,"},{"line_number":50,"context_line":"               help\u003d\u0027Version of the Barbican API, for example: \"v1\"\u0027),"},{"line_number":51,"context_line":"    cfg.StrOpt(\u0027keystone_endpoint\u0027,"},{"line_number":52,"context_line":"               default\u003d\u0027http://localhost:5000/v3\u0027,"},{"line_number":53,"context_line":"               help\u003d\u0027Use this endpoint to connect to Keystone\u0027),"},{"line_number":54,"context_line":"    cfg.IntOpt(\u0027retry_delay\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_792a0880","line":51,"updated":"2015-08-28 16:26:19.000000000","message":"usually auth_endpoint is used instead.","commit_id":"4ef4e27b66e9b2fdd8307008e9c3480d2b3f87ca"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"4ebc6c87849239d0231abeafaaef72a424ca32bc","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        if not hasattr(context, \u0027tenant\u0027) or context.tenant is None:"},{"line_number":104,"context_line":"            msg \u003d u._(\"Unable to create Barbican Client without tenant \""},{"line_number":105,"context_line":"                      \"attribute in context object.\")"},{"line_number":106,"context_line":"            LOG.error(msg)"},{"line_number":107,"context_line":"            raise exception.KeyManagerError(msg)"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_991efc61","line":105,"updated":"2015-08-28 16:26:19.000000000","message":"I would really encourage the usage of \"project\" instead of \"tenant\". It\u0027s what\u0027s encouraged in Keystone and in Barbican we even had a blueprint to replace all occurences both in the code and the database of the word tenant in favor of project.","commit_id":"4ef4e27b66e9b2fdd8307008e9c3480d2b3f87ca"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"ed73c5ccea26cf1f580ed3566e4727a5ab8e4fa2","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        if not hasattr(context, \u0027tenant\u0027) or context.tenant is None:"},{"line_number":104,"context_line":"            msg \u003d u._(\"Unable to create Barbican Client without tenant \""},{"line_number":105,"context_line":"                      \"attribute in context object.\")"},{"line_number":106,"context_line":"            LOG.error(msg)"},{"line_number":107,"context_line":"            raise exception.KeyManagerError(msg)"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_f992989e","line":105,"in_reply_to":"da20952f_991efc61","updated":"2015-08-28 16:27:07.000000000","message":"+1","commit_id":"4ef4e27b66e9b2fdd8307008e9c3480d2b3f87ca"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"39dd796cf2e6211121b8cca3481d18ff428e0496","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        if not hasattr(context, \u0027tenant\u0027) or context.tenant is None:"},{"line_number":104,"context_line":"            msg \u003d u._(\"Unable to create Barbican Client without tenant \""},{"line_number":105,"context_line":"                      \"attribute in context object.\")"},{"line_number":106,"context_line":"            LOG.error(msg)"},{"line_number":107,"context_line":"            raise exception.KeyManagerError(msg)"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_59a2a4af","line":105,"in_reply_to":"da20952f_f992989e","updated":"2015-08-28 16:34:17.000000000","message":"I see what you mean, but the oslo_context object calls it tenant https://github.com/openstack/oslo.context/blob/master/oslo_context/context.py#L56 and the context object passed in here should be inheriting from oslo RequestContext.  How would you prefer I change it?","commit_id":"4ef4e27b66e9b2fdd8307008e9c3480d2b3f87ca"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"969bb77cb27c27a0e2605f03c1b50f306b8516ec","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        return self._barbican_client"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _get_keystone_auth(self, context):"},{"line_number":133,"context_line":"        auth \u003d identity.v3.Token("},{"line_number":134,"context_line":"            auth_url\u003dself.conf.barbican.auth_endpoint,"},{"line_number":135,"context_line":"            token\u003dcontext.auth_token,"},{"line_number":136,"context_line":"            project_id\u003dcontext.tenant,"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_5d2dabfc","line":133,"updated":"2015-08-28 18:42:11.000000000","message":"Does this require use of Keystone v3 then, so no v2 support?","commit_id":"67276fd2a334bcc501efff678c6e326c34ba4205"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"85bbecf02d77022f7c129ade848fca7eb2175995","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        return self._barbican_client"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _get_keystone_auth(self, context):"},{"line_number":133,"context_line":"        auth \u003d identity.v3.Token("},{"line_number":134,"context_line":"            auth_url\u003dself.conf.barbican.auth_endpoint,"},{"line_number":135,"context_line":"            token\u003dcontext.auth_token,"},{"line_number":136,"context_line":"            project_id\u003dcontext.tenant,"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_97d3e45f","line":133,"in_reply_to":"da20952f_5d2dabfc","updated":"2015-08-31 13:06:44.000000000","message":"I looked for a while to figure out if there was an easy way in Keystone to create the token automatically based on the version, but could not find one.  I was afraid parsing the version and creating the token based on that would not be very elegant.  Perhaps it should be added even if it is a bit kludgy.","commit_id":"67276fd2a334bcc501efff678c6e326c34ba4205"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"a57e4a64d966ee58fa8d41d559b8cefbd47a650c","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        return self._barbican_client"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _get_keystone_auth(self, context):"},{"line_number":133,"context_line":"        auth \u003d identity.v3.Token("},{"line_number":134,"context_line":"            auth_url\u003dself.conf.barbican.auth_endpoint,"},{"line_number":135,"context_line":"            token\u003dcontext.auth_token,"},{"line_number":136,"context_line":"            project_id\u003dcontext.tenant,"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_e11a83c5","line":133,"in_reply_to":"da20952f_97d3e45f","updated":"2015-08-31 21:34:31.000000000","message":"One reference can be barbicanclient functional tests.\n\nhttps://github.com/openstack/python-barbicanclient/blob/master/functionaltests/client/base.py#L33","commit_id":"67276fd2a334bcc501efff678c6e326c34ba4205"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"969bb77cb27c27a0e2605f03c1b50f306b8516ec","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        active \u003d u\u0027ACTIVE\u0027"},{"line_number":333,"context_line":"        number_of_retries \u003d self.conf.barbican.number_of_retries"},{"line_number":334,"context_line":"        retry_delay \u003d self.conf.barbican.retry_delay"},{"line_number":335,"context_line":"        order \u003d barbican_client.orders.get(order_ref)"},{"line_number":336,"context_line":"        for n in range(number_of_retries):"},{"line_number":337,"context_line":"            if order.status !\u003d active:"},{"line_number":338,"context_line":"                kwargs \u003d {\u0027attempt\u0027: n,"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_9d4ca3c9","line":335,"updated":"2015-08-28 18:42:11.000000000","message":"I generally prefer to delay for a bit (1/4 to 1/2 second maybe) before trying the order for the first time, as it is most likely still PENDING right after the order is POST-ed.","commit_id":"67276fd2a334bcc501efff678c6e326c34ba4205"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"85bbecf02d77022f7c129ade848fca7eb2175995","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        active \u003d u\u0027ACTIVE\u0027"},{"line_number":333,"context_line":"        number_of_retries \u003d self.conf.barbican.number_of_retries"},{"line_number":334,"context_line":"        retry_delay \u003d self.conf.barbican.retry_delay"},{"line_number":335,"context_line":"        order \u003d barbican_client.orders.get(order_ref)"},{"line_number":336,"context_line":"        for n in range(number_of_retries):"},{"line_number":337,"context_line":"            if order.status !\u003d active:"},{"line_number":338,"context_line":"                kwargs \u003d {\u0027attempt\u0027: n,"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_77117003","line":335,"in_reply_to":"da20952f_9d4ca3c9","updated":"2015-08-31 13:06:44.000000000","message":"I didn\u0027t run into that during testing with a KMIP appliance, but perhaps that is the case with other backends.  I can add it in.","commit_id":"67276fd2a334bcc501efff678c6e326c34ba4205"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"969bb77cb27c27a0e2605f03c1b50f306b8516ec","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                            \"Order status is \u0027%(status)s\u0027. Waiting for \""},{"line_number":345,"context_line":"                            \"\u0027%(active)s\u0027, will retry in %(delay)s \""},{"line_number":346,"context_line":"                            \"seconds\") % kwargs"},{"line_number":347,"context_line":"                LOG.info(msg)"},{"line_number":348,"context_line":"                time.sleep(retry_delay)"},{"line_number":349,"context_line":"                order \u003d barbican_client.orders.get(order_ref)"},{"line_number":350,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_1d3973f2","line":347,"updated":"2015-08-28 18:42:11.000000000","message":"I think there is a LOG.info method that takes the localized string and args separately, which save a bit of load if info logging is turned off. Something like this might work instead (not sure about the dict there though):\n\nLOG.info(u._LI(\"....\"), kwargs)","commit_id":"67276fd2a334bcc501efff678c6e326c34ba4205"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"85bbecf02d77022f7c129ade848fca7eb2175995","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                            \"Order status is \u0027%(status)s\u0027. Waiting for \""},{"line_number":345,"context_line":"                            \"\u0027%(active)s\u0027, will retry in %(delay)s \""},{"line_number":346,"context_line":"                            \"seconds\") % kwargs"},{"line_number":347,"context_line":"                LOG.info(msg)"},{"line_number":348,"context_line":"                time.sleep(retry_delay)"},{"line_number":349,"context_line":"                order \u003d barbican_client.orders.get(order_ref)"},{"line_number":350,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_17fd94b3","line":347,"in_reply_to":"da20952f_1d3973f2","updated":"2015-08-31 13:06:44.000000000","message":"That\u0027s fair, I can look into it.","commit_id":"67276fd2a334bcc501efff678c6e326c34ba4205"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"2b6f879dab6af840038eb3c435031bf80cda1cb1","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def _get_keystone_auth(self, context):"},{"line_number":133,"context_line":"        # TODO(kfarr): support keystone v2"},{"line_number":134,"context_line":"        auth \u003d identity.v3.Token("},{"line_number":135,"context_line":"            auth_url\u003dself.conf.barbican.auth_endpoint,"},{"line_number":136,"context_line":"            token\u003dcontext.auth_token,"},{"line_number":137,"context_line":"            project_id\u003dcontext.tenant,"}],"source_content_type":"text/x-python","patch_set":13,"id":"da20952f_a18ecb2b","line":134,"updated":"2015-08-31 21:34:48.000000000","message":"As John mentioned in last version, via \u0027identity\u0027 version configuration flag, client can talk to keystone via v2 or v3. Please check barbicanclient functional test sample.\n\nhttps://github.com/openstack/python-barbicanclient/blob/master/functionaltests/client/base.py#L33","commit_id":"73e96010955218741e7c8ed098d91c3a77d809f6"}],"castellan/tests/unit/key_manager/test_barbican_key_manager.py":[{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"bd909428c49156b9331a4c84b3d1114a9268167a","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        self.mock_barbican.orders.get.assert_called_once_with(order_ref_url)"},{"line_number":150,"context_line":"        self.assertEqual(returned_private_uuid, private_key_id)"},{"line_number":151,"context_line":"        self.assertEqual(returned_public_uuid, public_key_id)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def test_create_key_pair_null_context(self):"},{"line_number":154,"context_line":"        self.key_mgr._barbican_client \u003d None"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_aca184ab","line":151,"updated":"2015-08-27 13:43:34.000000000","message":"not a huge deal, but these should be assertEqual(reference, observed) based on the way testtools creates the log output","commit_id":"5fb4ac9741e431ae76b90eb505aca4a7e9d1e5c4"}],"castellan/tests/utils.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"969bb77cb27c27a0e2605f03c1b50f306b8516ec","unresolved":false,"context_lines":[{"line_number":225,"context_line":"    of the private.pk8 file."},{"line_number":226,"context_line":"    \"\"\""},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    return \"\"\"-----BEGIN PRIVATE KEY-----"},{"line_number":229,"context_line":"MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCza2VoDXmBUMmw"},{"line_number":230,"context_line":"jFu9F6MM5q/AZ1WjnWA2YNdNy237TrGN/nobDDv8FBBpUPmHNZ04H1LyxFcP8ReF"},{"line_number":231,"context_line":"rcIXpifsReu2lAWaqRPxovu5CuAhfecKv+RhjLVLJ0I+MZIb72ROKpfZTmb7dhlF"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_b8189576","line":228,"updated":"2015-08-28 18:42:11.000000000","message":"Private keys should *never* be in public. :)  jk\n\nThat said though, it might be good to make things more obvious here to clients, like calling this function  \u0027get_insecure_private_key_pem()\u0027 maybe?","commit_id":"67276fd2a334bcc501efff678c6e326c34ba4205"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"85bbecf02d77022f7c129ade848fca7eb2175995","unresolved":false,"context_lines":[{"line_number":225,"context_line":"    of the private.pk8 file."},{"line_number":226,"context_line":"    \"\"\""},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    return \"\"\"-----BEGIN PRIVATE KEY-----"},{"line_number":229,"context_line":"MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCza2VoDXmBUMmw"},{"line_number":230,"context_line":"jFu9F6MM5q/AZ1WjnWA2YNdNy237TrGN/nobDDv8FBBpUPmHNZ04H1LyxFcP8ReF"},{"line_number":231,"context_line":"rcIXpifsReu2lAWaqRPxovu5CuAhfecKv+RhjLVLJ0I+MZIb72ROKpfZTmb7dhlF"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_57b30c0a","line":228,"in_reply_to":"da20952f_b8189576","updated":"2015-08-31 13:06:44.000000000","message":"That\u0027s probably a good idea to clarify, though this is the way it was done for testing in Barbican, too.  This is just for testing utils and should not be used by clients.","commit_id":"67276fd2a334bcc501efff678c6e326c34ba4205"}]}
