)]}'
{"barbican/api/controllers/secrets.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"50b96d80b75b919a6a157a24490ddc999d30c4b5","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                )"},{"line_number":111,"context_line":"            )"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        tkey_id \u003d kwargs.get(\u0027transport_key_id\u0027, None)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        payload \u003d pecan.request.body"},{"line_number":116,"context_line":"        if not payload:"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_5977ad08","line":113,"updated":"2014-07-16 04:23:02.000000000","message":"nit: the name \"tkey_id\" doesn\u0027t tell me much. I would rather have complete names for variable names; Even if it gets longer.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3aa2de506a417f6bb271365e14d5cab8cff31651","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                )"},{"line_number":111,"context_line":"            )"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        tkey_id \u003d kwargs.get(\u0027transport_key_id\u0027, None)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        payload \u003d pecan.request.body"},{"line_number":116,"context_line":"        if not payload:"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_f61afcc4","line":113,"in_reply_to":"baada198_5977ad08","updated":"2014-07-17 17:25:48.000000000","message":"sure","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"50b96d80b75b919a6a157a24490ddc999d30c4b5","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        plugin.store_secret(payload, content_type,"},{"line_number":136,"context_line":"                            content_encoding, secret_model.to_dict_fields,"},{"line_number":137,"context_line":"                            secret_model, tenant_model, self.repos,"},{"line_number":138,"context_line":"                            tkey_id)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    @index.when(method\u003d\u0027DELETE\u0027)"},{"line_number":141,"context_line":"    @controllers.handle_exceptions(u._(\u0027Secret deletion\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_797c71ec","line":138,"updated":"2014-07-16 04:23:02.000000000","message":"same here.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3aa2de506a417f6bb271365e14d5cab8cff31651","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        plugin.store_secret(payload, content_type,"},{"line_number":136,"context_line":"                            content_encoding, secret_model.to_dict_fields,"},{"line_number":137,"context_line":"                            secret_model, tenant_model, self.repos,"},{"line_number":138,"context_line":"                            tkey_id)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    @index.when(method\u003d\u0027DELETE\u0027)"},{"line_number":141,"context_line":"    @controllers.handle_exceptions(u._(\u0027Secret deletion\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_7686ecdc","line":138,"in_reply_to":"baada198_797c71ec","updated":"2014-07-17 17:25:48.000000000","message":"ditto","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"671d3ac0f0216731b822a06e9d7a6fda6828ae3e","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            data.get(\u0027payload_content_encoding\u0027),"},{"line_number":244,"context_line":"            data, None, tenant,"},{"line_number":245,"context_line":"            self.repos,"},{"line_number":246,"context_line":"            data.get(\u0027transport_key_id\u0027, None))"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        pecan.response.status \u003d 201"},{"line_number":249,"context_line":"        pecan.response.headers[\u0027Location\u0027] \u003d \u0027/{0}/secrets/{1}\u0027.format("}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_91570026","line":246,"updated":"2014-07-17 21:39:59.000000000","message":"Why does store_secret return a tkey_id? If you are storing it why do you need a reference to the tkey_id? It seems like after it is stored it can be accessed with or without a tkey.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3fcf2cba4624f5a443527a3725844e2611dce42c","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            data.get(\u0027payload_content_encoding\u0027),"},{"line_number":244,"context_line":"            data, None, tenant,"},{"line_number":245,"context_line":"            self.repos,"},{"line_number":246,"context_line":"            data.get(\u0027transport_key_id\u0027, None))"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        pecan.response.status \u003d 201"},{"line_number":249,"context_line":"        pecan.response.headers[\u0027Location\u0027] \u003d \u0027/{0}/secrets/{1}\u0027.format("}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_81dcd975","line":246,"in_reply_to":"baada198_6e9e0265","updated":"2014-07-19 17:50:15.000000000","message":"store_secret() returns a tkey_id because it serves double duty as the method that is called when a POST /secrets is done and only metadata is created, and also the method that is called when both the metadata is created and the payload is stored.\n\nWhen only the metadata is requested, then - if a transport key is requested - the tkey_id is returned to be converted into a transport_key_ref.\n\nWhen the payload is stored as well, store_secret() returns None for the tkey_id.  \nThis is independent of whether or not the payload has been encrypted or not.\nAs Nathan points out, when the secret payload is stored, there is no need to return the tkey_id because it can later be retrived with or without the tkey_id.\n\nWe can make this cleaner by separating the two functions into :\n\ncreate_secret_metadata() and store_secret() and have only create_secret_metadata() return the tkey_id.\n\nDo we want to do this?","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9e58d3f71de861deb481e52e66f15f97111010f2","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            data.get(\u0027payload_content_encoding\u0027),"},{"line_number":244,"context_line":"            data, None, tenant,"},{"line_number":245,"context_line":"            self.repos,"},{"line_number":246,"context_line":"            data.get(\u0027transport_key_id\u0027, None))"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        pecan.response.status \u003d 201"},{"line_number":249,"context_line":"        pecan.response.headers[\u0027Location\u0027] \u003d \u0027/{0}/secrets/{1}\u0027.format("}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_6e9e0265","line":246,"in_reply_to":"baada198_91570026","updated":"2014-07-18 05:27:53.000000000","message":"Per comments I made on the validator.py module next, this could be useful for one-step POST secrets calls, whereby the encrypted payload has been wrapped with a transport key previously retrieved/cached by the client. Does that sounds right Ade?","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"24dece8e071bea62841ae1c726875259eed1a7e7","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                )"},{"line_number":114,"context_line":"            )"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        transport_key_id \u003d kwargs.get(\u0027transport_key_id\u0027, None)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        payload \u003d pecan.request.body"},{"line_number":119,"context_line":"        if not payload:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_57b8e611","line":116,"updated":"2014-07-31 23:37:40.000000000","message":"nit: get on dict defaults to None if not found. Applies to multiple places in this module.","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"}],"barbican/common/validators.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a8decb9758c1da86c705617abda1ca74e789e302","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                    \"type\": \"string\","},{"line_number":130,"context_line":"                    \"enum\": [\"true\", \"false\"]"},{"line_number":131,"context_line":"                },"},{"line_number":132,"context_line":"                \"transport_key_id\": {\"type\": \"string\"},"},{"line_number":133,"context_line":"            },"},{"line_number":134,"context_line":"        }"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_d4b28d05","line":132,"updated":"2014-07-16 13:51:13.000000000","message":"I don\u0027t think this is needed, as we get this value via query parameters, not JSON body.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3fcf2cba4624f5a443527a3725844e2611dce42c","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                    \"type\": \"string\","},{"line_number":130,"context_line":"                    \"enum\": [\"true\", \"false\"]"},{"line_number":131,"context_line":"                },"},{"line_number":132,"context_line":"                \"transport_key_id\": {\"type\": \"string\"},"},{"line_number":133,"context_line":"            },"},{"line_number":134,"context_line":"        }"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_e1df5564","line":132,"in_reply_to":"baada198_0eb3c6e9","updated":"2014-07-19 17:50:15.000000000","message":"correct.  thats what I was thinking of.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9e58d3f71de861deb481e52e66f15f97111010f2","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                    \"type\": \"string\","},{"line_number":130,"context_line":"                    \"enum\": [\"true\", \"false\"]"},{"line_number":131,"context_line":"                },"},{"line_number":132,"context_line":"                \"transport_key_id\": {\"type\": \"string\"},"},{"line_number":133,"context_line":"            },"},{"line_number":134,"context_line":"        }"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_0eb3c6e9","line":132,"in_reply_to":"baada198_43ebe977","updated":"2014-07-18 05:27:53.000000000","message":"Ah, I see...so for a one-step secret POST, the encrypted payload data (in base64 format) could have been wrapped with the transport key referred to by the UUID, correct? If so, that makes sense.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3aa2de506a417f6bb271365e14d5cab8cff31651","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                    \"type\": \"string\","},{"line_number":130,"context_line":"                    \"enum\": [\"true\", \"false\"]"},{"line_number":131,"context_line":"                },"},{"line_number":132,"context_line":"                \"transport_key_id\": {\"type\": \"string\"},"},{"line_number":133,"context_line":"            },"},{"line_number":134,"context_line":"        }"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_43ebe977","line":132,"in_reply_to":"baada198_d4b28d05","updated":"2014-07-17 17:25:48.000000000","message":"Given that the transport key changes infrequently, I actually think it should be possible for someone to assume that the DRM transport key has not changed - and to send in a POST request with the transport_key_id and encrypted data as the payload.\n\nIf the transport key is no longer valid, we can certainly detect that and return failure.\n\nI can be persuaded otherwise though, if we think we want to disallow this.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"}],"barbican/plugin/dogtag.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a8decb9758c1da86c705617abda1ca74e789e302","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    def store_secret(self, secret_dto, context):"},{"line_number":129,"context_line":"        \"\"\"Store a secret in the DRM"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        If tkey_id is not None, then we expect to receive data wrapped in a"},{"line_number":132,"context_line":"        PKIArchiveOptions package wrapped with the relevant transport key."},{"line_number":133,"context_line":"        Otherwise, the data is unencrypted and we use an archive_key() to have"},{"line_number":134,"context_line":"        the Dogtag DRM client generate the relevant session keys."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_74a8e177","line":131,"updated":"2014-07-16 13:51:13.000000000","message":"Please add \u0027secret_dto\u0027 here...so \u0027secret_dto.tkey_id\u0027.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3aa2de506a417f6bb271365e14d5cab8cff31651","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    def store_secret(self, secret_dto, context):"},{"line_number":129,"context_line":"        \"\"\"Store a secret in the DRM"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        If tkey_id is not None, then we expect to receive data wrapped in a"},{"line_number":132,"context_line":"        PKIArchiveOptions package wrapped with the relevant transport key."},{"line_number":133,"context_line":"        Otherwise, the data is unencrypted and we use an archive_key() to have"},{"line_number":134,"context_line":"        the Dogtag DRM client generate the relevant session keys."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_43292936","line":131,"in_reply_to":"baada198_74a8e177","updated":"2014-07-17 17:25:48.000000000","message":"will do","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"671d3ac0f0216731b822a06e9d7a6fda6828ae3e","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        \"\"\"Store a secret in the DRM"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        If tkey_id is not None, then we expect to receive data wrapped in a"},{"line_number":132,"context_line":"        PKIArchiveOptions package wrapped with the relevant transport key."},{"line_number":133,"context_line":"        Otherwise, the data is unencrypted and we use an archive_key() to have"},{"line_number":134,"context_line":"        the Dogtag DRM client generate the relevant session keys."},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_14091e2c","line":132,"updated":"2014-07-17 21:39:59.000000000","message":"What is PKIArchiveOptions?","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3fcf2cba4624f5a443527a3725844e2611dce42c","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        \"\"\"Store a secret in the DRM"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        If tkey_id is not None, then we expect to receive data wrapped in a"},{"line_number":132,"context_line":"        PKIArchiveOptions package wrapped with the relevant transport key."},{"line_number":133,"context_line":"        Otherwise, the data is unencrypted and we use an archive_key() to have"},{"line_number":134,"context_line":"        the Dogtag DRM client generate the relevant session keys."},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_a1c0fd7c","line":132,"in_reply_to":"baada198_14091e2c","updated":"2014-07-19 17:50:15.000000000","message":"Its an ASN.1 structure in which dogtag expects the data to be encoded.  It contains a transport_key_wrapped_session_key, the session_key_ wrapped_secret and parameters that describe how the wrapping was done.\n\nSee RFC 2511 section 6.4","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a8decb9758c1da86c705617abda1ca74e789e302","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        client_key_id \u003d uuid.uuid4().hex"},{"line_number":145,"context_line":"        if secret_dto.tkey_id is not None:"},{"line_number":146,"context_line":"            response \u003d self.keyclient.archive_pki_options("},{"line_number":147,"context_line":"                client_key_id,"},{"line_number":148,"context_line":"                data_type,"},{"line_number":149,"context_line":"                secret_dto.secret,"},{"line_number":150,"context_line":"                key_algorithm\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_344f49c0","line":147,"updated":"2014-07-16 13:51:13.000000000","message":"It doesn\u0027t seem like the passed in tkey_id is actually used here? I would think the generated key in line 144 is only used if tkey_id is None?\n\nAlso, it seems like the actual transport key value is expected here, rather than the ID? So if Barbican core (outside plugin) is handing in the actual transport key generated in the other CR, that should work here, correct?","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"671d3ac0f0216731b822a06e9d7a6fda6828ae3e","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        client_key_id \u003d uuid.uuid4().hex"},{"line_number":145,"context_line":"        if secret_dto.tkey_id is not None:"},{"line_number":146,"context_line":"            response \u003d self.keyclient.archive_pki_options("},{"line_number":147,"context_line":"                client_key_id,"},{"line_number":148,"context_line":"                data_type,"},{"line_number":149,"context_line":"                secret_dto.secret,"},{"line_number":150,"context_line":"                key_algorithm\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_74d7ba4f","line":147,"in_reply_to":"baada198_032e51fa","updated":"2014-07-17 21:39:59.000000000","message":"Thanks, I had same question about tkey_id.\n\nWhy do you not specify algorithm and key size?","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3aa2de506a417f6bb271365e14d5cab8cff31651","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        client_key_id \u003d uuid.uuid4().hex"},{"line_number":145,"context_line":"        if secret_dto.tkey_id is not None:"},{"line_number":146,"context_line":"            response \u003d self.keyclient.archive_pki_options("},{"line_number":147,"context_line":"                client_key_id,"},{"line_number":148,"context_line":"                data_type,"},{"line_number":149,"context_line":"                secret_dto.secret,"},{"line_number":150,"context_line":"                key_algorithm\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_032e51fa","line":147,"in_reply_to":"baada198_344f49c0","updated":"2014-07-17 17:25:48.000000000","message":"The client_key_id is just an extra identifier which clients can provide to the DRM to help distinguish keys.  It isn\u0027t being used by Barbican as an identifier.  It does however, need to be provided so we generate a uuid here.  It has nothing to do with the transport_key.\n\nDogtag DRM does support multiple transport keys, but this particular interface does not yet.  I need to update the DRM interface to take the transport key as well just in case the transport key has changed.  I\u0027ll do that shortly.\n\nRight now, the tkey_id is simply used to determine whether or not the contents are wrapped.  If so -- ie, tkey_id is not None - then a different method is called -\narchive_pki_options() instead of archive_key()","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9e58d3f71de861deb481e52e66f15f97111010f2","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        client_key_id \u003d uuid.uuid4().hex"},{"line_number":145,"context_line":"        if secret_dto.tkey_id is not None:"},{"line_number":146,"context_line":"            response \u003d self.keyclient.archive_pki_options("},{"line_number":147,"context_line":"                client_key_id,"},{"line_number":148,"context_line":"                data_type,"},{"line_number":149,"context_line":"                secret_dto.secret,"},{"line_number":150,"context_line":"                key_algorithm\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ce62ae3c","line":147,"in_reply_to":"baada198_74d7ba4f","updated":"2014-07-18 05:27:53.000000000","message":"Well, that metadata is stored in Barbican\u0027s Secret record already, so technically not needed if Barbican is considered to be \u0027authoritative\u0027. But I think some enterprises might consider Dogtag to be authoritative, and so synching the metadata would make sense here?","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3fcf2cba4624f5a443527a3725844e2611dce42c","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        client_key_id \u003d uuid.uuid4().hex"},{"line_number":145,"context_line":"        if secret_dto.tkey_id is not None:"},{"line_number":146,"context_line":"            response \u003d self.keyclient.archive_pki_options("},{"line_number":147,"context_line":"                client_key_id,"},{"line_number":148,"context_line":"                data_type,"},{"line_number":149,"context_line":"                secret_dto.secret,"},{"line_number":150,"context_line":"                key_algorithm\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_21630db2","line":147,"in_reply_to":"baada198_ce62ae3c","updated":"2014-07-19 17:50:15.000000000","message":"It does make sense and I plan to do it -- just not in this patch :)  We only recently added those parameters to the DTO - I need to add them and test to confirm that it all works with the latest dogtag.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b3a7c5cb8af3600b71c62dadd4654fcb0cc96d24","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            response \u003d self.keyclient.archive_pki_options("},{"line_number":150,"context_line":"                client_key_id,"},{"line_number":151,"context_line":"                data_type,"},{"line_number":152,"context_line":"                secret_dto.secret,"},{"line_number":153,"context_line":"                key_algorithm\u003dNone,"},{"line_number":154,"context_line":"                key_size\u003dNone)"},{"line_number":155,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_9704571a","line":152,"updated":"2014-07-31 11:42:07.000000000","message":"I was expecting this method call to take two things.\n1. encrypted secret\n2. transport wrapped session key\n\nAre both of those items stored in secret_dto.secret? Is there an object that represents this or how is this formatted?\n\nSorry, this may be else where, but I can\u0027t remember off hand.","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"24dece8e071bea62841ae1c726875259eed1a7e7","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                data_type,"},{"line_number":152,"context_line":"                secret_dto.secret,"},{"line_number":153,"context_line":"                key_algorithm\u003dNone,"},{"line_number":154,"context_line":"                key_size\u003dNone)"},{"line_number":155,"context_line":"        else:"},{"line_number":156,"context_line":"            response \u003d self.keyclient.archive_key("},{"line_number":157,"context_line":"                client_key_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_e2069a73","line":154,"updated":"2014-07-31 23:37:40.000000000","message":"Is secret stored in DRM encrypted with either transport key or session key? Wondering as I am not seeing either of those values passed from keyclient.","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"79b697df2b3e322969600892f77c47cdd246f5d7","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        ret \u003d sstore.SecretDTO(secret_metadata[DogtagPlugin.SECRET_TYPE],"},{"line_number":193,"context_line":"                               recovered_key,"},{"line_number":194,"context_line":"                               secret_metadata[DogtagPlugin.SECRET_KEYSPEC],"},{"line_number":195,"context_line":"                               None,"},{"line_number":196,"context_line":"                               None)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        return ret"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8cb75785","line":195,"updated":"2014-07-29 06:38:30.000000000","message":"For readability I would prefer having this be a variable before being passed to the SecretDTO. Or better yet, prepend the names of the variables in the constructor arguments, such as:\n\nsstore.SecretDTO(type\u003dsecret_metadata[DogtagPlugin.SECRET_TYPE],\n                          secret\u003drecovered_key,\n                          key_spec\u003dsecret_metadata[DogtagPlugin.SECRET_KEYSPEC],\n                          content_type\u003dNone,\n                          transport_key\u003dNone)","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"5a2cfc9f833aa838c838cf60f98e2ff0956b44f2","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        ret \u003d sstore.SecretDTO(secret_metadata[DogtagPlugin.SECRET_TYPE],"},{"line_number":193,"context_line":"                               recovered_key,"},{"line_number":194,"context_line":"                               secret_metadata[DogtagPlugin.SECRET_KEYSPEC],"},{"line_number":195,"context_line":"                               None,"},{"line_number":196,"context_line":"                               None)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        return ret"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_739d706c","line":195,"in_reply_to":"baada198_8cb75785","updated":"2014-07-31 02:12:21.000000000","message":"will do","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"acda3e0c00e30c95b0876328beadff243cd0c710","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        secret_dto.secret to include a base64 encoded PKIArchiveOptions"},{"line_number":133,"context_line":"        structure as defined in section 6.4 of RFC 2511. This package contains"},{"line_number":134,"context_line":"        a transport key wrapped session key, the session key wrapped secret"},{"line_number":135,"context_line":"        and parameters to specify the symmetric key wrapping."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        Otherwise, the data is unencrypted and we use a call to archive_key()"},{"line_number":138,"context_line":"        to have the Dogtag DRM client generate the relevant session keys."}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8dc74711","line":135,"updated":"2014-08-05 16:44:58.000000000","message":"+1","commit_id":"cd70a208c621400c3a26efccdf0a3135ff6ed44b"}],"barbican/plugin/interface/secret_store.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"50b96d80b75b919a6a157a24490ddc999d30c4b5","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.secret \u003d secret"},{"line_number":215,"context_line":"        self.key_spec \u003d key_spec"},{"line_number":216,"context_line":"        self.content_type \u003d content_type"},{"line_number":217,"context_line":"        self.tkey_id \u003d tkey_id"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"#TODO(john-wood-w) Remove this class once repository factory work is"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_f967a14f","line":217,"updated":"2014-07-16 04:23:02.000000000","message":"does it really need to be named tkey_id? I would rather have this as a full name, specially here in the dto.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3fcf2cba4624f5a443527a3725844e2611dce42c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.secret \u003d secret"},{"line_number":215,"context_line":"        self.key_spec \u003d key_spec"},{"line_number":216,"context_line":"        self.content_type \u003d content_type"},{"line_number":217,"context_line":"        self.tkey_id \u003d tkey_id"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"#TODO(john-wood-w) Remove this class once repository factory work is"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_c167b1b6","line":217,"in_reply_to":"baada198_6e4d22c4","updated":"2014-07-19 17:50:15.000000000","message":"yeah - my original proposal had wrapping_key and we decided at the summit to move to the more specific transport_key","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"671d3ac0f0216731b822a06e9d7a6fda6828ae3e","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.secret \u003d secret"},{"line_number":215,"context_line":"        self.key_spec \u003d key_spec"},{"line_number":216,"context_line":"        self.content_type \u003d content_type"},{"line_number":217,"context_line":"        self.tkey_id \u003d tkey_id"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"#TODO(john-wood-w) Remove this class once repository factory work is"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_f17bdcf1","line":217,"in_reply_to":"baada198_76d42cbd","updated":"2014-07-17 21:39:59.000000000","message":"Perhaps more generic term of wrapping key?","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9e58d3f71de861deb481e52e66f15f97111010f2","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.secret \u003d secret"},{"line_number":215,"context_line":"        self.key_spec \u003d key_spec"},{"line_number":216,"context_line":"        self.content_type \u003d content_type"},{"line_number":217,"context_line":"        self.tkey_id \u003d tkey_id"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"#TODO(john-wood-w) Remove this class once repository factory work is"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_6e4d22c4","line":217,"in_reply_to":"baada198_f17bdcf1","updated":"2014-07-18 05:27:53.000000000","message":"I\u0027ve been thinking \u0027transport key\u0027 was favored over \u0027wrapping key\u0027?","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3aa2de506a417f6bb271365e14d5cab8cff31651","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        self.secret \u003d secret"},{"line_number":215,"context_line":"        self.key_spec \u003d key_spec"},{"line_number":216,"context_line":"        self.content_type \u003d content_type"},{"line_number":217,"context_line":"        self.tkey_id \u003d tkey_id"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"#TODO(john-wood-w) Remove this class once repository factory work is"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_76d42cbd","line":217,"in_reply_to":"baada198_f967a14f","updated":"2014-07-17 17:25:48.000000000","message":"sure","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"671d3ac0f0216731b822a06e9d7a6fda6828ae3e","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            invoke_kwds\u003dinvoke_kwargs"},{"line_number":366,"context_line":"        )"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    def get_plugin_store(self, plugin_name\u003dNone, transport_key_needed\u003dFalse):"},{"line_number":369,"context_line":"        \"\"\"Gets a secret store plugin."},{"line_number":370,"context_line":"        :param: plugin_name: set to plugin_name to get specific plugin"},{"line_number":371,"context_line":"        :param: transport_key_needed: set to True if a transport"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_d15fb873","line":368,"updated":"2014-07-17 21:39:59.000000000","message":"Good call on this. I think we definitely need this.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b901d0fb4e434c57f49156f4beae764f05c5ccba","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        :param content_type: Content type of the secret, one of MIME"},{"line_number":209,"context_line":"               types such as \u0027text/plain\u0027 or \u0027application/octet-stream\u0027"},{"line_number":210,"context_line":"        :param transport_key: presence of this parameter indicates that the"},{"line_number":211,"context_line":"               secret has been encrypted using a transport key."},{"line_number":212,"context_line":"        \"\"\""},{"line_number":213,"context_line":"        self.type \u003d type"},{"line_number":214,"context_line":"        self.secret \u003d secret"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8022a1a4","line":211,"updated":"2014-07-29 18:02:09.000000000","message":"What type of object is this? Could you please add the type?","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"5a2cfc9f833aa838c838cf60f98e2ff0956b44f2","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        :param content_type: Content type of the secret, one of MIME"},{"line_number":209,"context_line":"               types such as \u0027text/plain\u0027 or \u0027application/octet-stream\u0027"},{"line_number":210,"context_line":"        :param transport_key: presence of this parameter indicates that the"},{"line_number":211,"context_line":"               secret has been encrypted using a transport key."},{"line_number":212,"context_line":"        \"\"\""},{"line_number":213,"context_line":"        self.type \u003d type"},{"line_number":214,"context_line":"        self.secret \u003d secret"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_23419fa6","line":211,"in_reply_to":"baada198_8022a1a4","updated":"2014-07-31 02:12:21.000000000","message":"will do.","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"acda3e0c00e30c95b0876328beadff243cd0c710","unresolved":false,"context_lines":[{"line_number":209,"context_line":"               types such as \u0027text/plain\u0027 or \u0027application/octet-stream\u0027"},{"line_number":210,"context_line":"        :param transport_key: presence of this parameter indicates that the"},{"line_number":211,"context_line":"               secret has been encrypted using a transport key.  The transport"},{"line_number":212,"context_line":"               key is a base64 encoded x509 transport certificate."},{"line_number":213,"context_line":"        \"\"\""},{"line_number":214,"context_line":"        self.type \u003d type"},{"line_number":215,"context_line":"        self.secret \u003d secret"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_0a8ebd7a","line":212,"updated":"2014-08-05 16:44:58.000000000","message":"+1 for documenting type. I find Python code difficult to read unless the type is specified.","commit_id":"cd70a208c621400c3a26efccdf0a3135ff6ed44b"}],"barbican/plugin/resources.py":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"50b96d80b75b919a6a157a24490ddc999d30c4b5","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    plugin_name \u003d None"},{"line_number":52,"context_line":"    if transport_key_id is not None:"},{"line_number":53,"context_line":"        tkey \u003d repos.transport_key_repo.get(entity_id\u003dtransport_key_id)"},{"line_number":54,"context_line":"        if tkey is None:"},{"line_number":55,"context_line":"            raise ValueError(\"Invalid transport key ID provided\")"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_194c55c8","line":53,"updated":"2014-07-16 04:23:02.000000000","message":"\"tkey\" :(","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3aa2de506a417f6bb271365e14d5cab8cff31651","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    plugin_name \u003d None"},{"line_number":52,"context_line":"    if transport_key_id is not None:"},{"line_number":53,"context_line":"        tkey \u003d repos.transport_key_repo.get(entity_id\u003dtransport_key_id)"},{"line_number":54,"context_line":"        if tkey is None:"},{"line_number":55,"context_line":"            raise ValueError(\"Invalid transport key ID provided\")"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_c36619bb","line":53,"in_reply_to":"baada198_194c55c8","updated":"2014-07-17 17:25:48.000000000","message":"sure - I can use the long form.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3fcf2cba4624f5a443527a3725844e2611dce42c","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    plugin_name \u003d None"},{"line_number":52,"context_line":"    if transport_key_id is not None:"},{"line_number":53,"context_line":"        tkey \u003d repos.transport_key_repo.get(entity_id\u003dtransport_key_id)"},{"line_number":54,"context_line":"        if tkey is None:"},{"line_number":55,"context_line":"            raise ValueError(\"Invalid transport key ID provided\")"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_c1fed1ae","line":53,"in_reply_to":"baada198_4ed5beb5","updated":"2014-07-19 17:50:15.000000000","message":"Ok - lets do a google hangout later this week after I get back to the states.  Maybe Thursday or Friday 24th/25th.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"671d3ac0f0216731b822a06e9d7a6fda6828ae3e","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    plugin_name \u003d None"},{"line_number":52,"context_line":"    if transport_key_id is not None:"},{"line_number":53,"context_line":"        tkey \u003d repos.transport_key_repo.get(entity_id\u003dtransport_key_id)"},{"line_number":54,"context_line":"        if tkey is None:"},{"line_number":55,"context_line":"            raise ValueError(\"Invalid transport key ID provided\")"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_f1975ce9","line":53,"in_reply_to":"baada198_c36619bb","updated":"2014-07-17 21:39:59.000000000","message":"I would rather see calling the plugin to get the transport key. That way it manages it and not Barbican.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9e58d3f71de861deb481e52e66f15f97111010f2","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    plugin_name \u003d None"},{"line_number":52,"context_line":"    if transport_key_id is not None:"},{"line_number":53,"context_line":"        tkey \u003d repos.transport_key_repo.get(entity_id\u003dtransport_key_id)"},{"line_number":54,"context_line":"        if tkey is None:"},{"line_number":55,"context_line":"            raise ValueError(\"Invalid transport key ID provided\")"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_4ed5beb5","line":53,"in_reply_to":"baada198_f1975ce9","updated":"2014-07-18 05:27:53.000000000","message":"Yeah, we probably need to discuss plugin vs barbican managed persistence of transport keys tomorrow, perhaps via google hangouts? Another issue I see if plugins are managing unique ids to keys in memory is with our multi-API-node deployments, and multiple processes per node. I\u0027d say plugins should only manage stateful info if that info is ultimately stored in a 3rd party system outside of barbican but concurrently accessible by all the API nodes.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"a8decb9758c1da86c705617abda1ca74e789e302","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                                    bit_length\u003dspec.get(\u0027bit_length\u0027),"},{"line_number":80,"context_line":"                                    mode\u003dspec.get(\u0027mode\u0027))"},{"line_number":81,"context_line":"    secret_dto \u003d secret_store.SecretDTO(None, unencrypted, key_spec,"},{"line_number":82,"context_line":"                                        content_type, transport_key_id)"},{"line_number":83,"context_line":"    secret_metadata \u003d store_plugin.store_secret(secret_dto, context)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    # Save secret and metadata."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_1487a5b7","line":82,"updated":"2014-07-16 13:51:13.000000000","message":"Hmmm...so I\u0027m thinking tkey should be passed in here, not the Barbican internal PK UUID to the key?","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"3aa2de506a417f6bb271365e14d5cab8cff31651","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                                    bit_length\u003dspec.get(\u0027bit_length\u0027),"},{"line_number":80,"context_line":"                                    mode\u003dspec.get(\u0027mode\u0027))"},{"line_number":81,"context_line":"    secret_dto \u003d secret_store.SecretDTO(None, unencrypted, key_spec,"},{"line_number":82,"context_line":"                                        content_type, transport_key_id)"},{"line_number":83,"context_line":"    secret_metadata \u003d store_plugin.store_secret(secret_dto, context)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    # Save secret and metadata."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_6371cd76","line":82,"in_reply_to":"baada198_1487a5b7","updated":"2014-07-17 17:25:48.000000000","message":"Based on my comments in the previous patch, I think the plugin and core should interact using the key_id.  In reality in this case, it probably doesn\u0027t matter - but it makes sense to be consistent.","commit_id":"72fa3a37248929c1c2f71cf51c790f2b0782447c"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"79b697df2b3e322969600892f77c47cdd246f5d7","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def store_secret(unencrypted_raw, content_type_raw, content_encoding,"},{"line_number":21,"context_line":"                 spec, secret_model, tenant_model, repos,"},{"line_number":22,"context_line":"                 transport_key_needed\u003dNone,"},{"line_number":23,"context_line":"                 transport_key_id\u003dNone):"},{"line_number":24,"context_line":"    \"\"\"Store a provided secret into secure backend.\"\"\""},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_0cffc703","line":22,"updated":"2014-07-29 06:38:30.000000000","message":"wouldn\u0027t False be a better default for transport_key_needed?","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"b901d0fb4e434c57f49156f4beae764f05c5ccba","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def store_secret(unencrypted_raw, content_type_raw, content_encoding,"},{"line_number":21,"context_line":"                 spec, secret_model, tenant_model, repos,"},{"line_number":22,"context_line":"                 transport_key_needed\u003dNone,"},{"line_number":23,"context_line":"                 transport_key_id\u003dNone):"},{"line_number":24,"context_line":"    \"\"\"Store a provided secret into secure backend.\"\"\""},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_e058bd33","line":22,"in_reply_to":"baada198_0cffc703","updated":"2014-07-29 18:02:09.000000000","message":"+1\nThe way the variable is named it sounds like it should be True or False boolean.","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"5a2cfc9f833aa838c838cf60f98e2ff0956b44f2","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def store_secret(unencrypted_raw, content_type_raw, content_encoding,"},{"line_number":21,"context_line":"                 spec, secret_model, tenant_model, repos,"},{"line_number":22,"context_line":"                 transport_key_needed\u003dNone,"},{"line_number":23,"context_line":"                 transport_key_id\u003dNone):"},{"line_number":24,"context_line":"    \"\"\"Store a provided secret into secure backend.\"\"\""},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_d3839c01","line":22,"in_reply_to":"baada198_0cffc703","updated":"2014-07-31 02:12:21.000000000","message":"Good catch. Thats what its supposed to be.","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"9ec0e30e857ace6558e934f98556403072e09055","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def store_secret(unencrypted_raw, content_type_raw, content_encoding,"},{"line_number":21,"context_line":"                 spec, secret_model, tenant_model, repos,"},{"line_number":22,"context_line":"                 transport_key_needed\u003dNone,"},{"line_number":23,"context_line":"                 transport_key_id\u003dNone):"},{"line_number":24,"context_line":"    \"\"\"Store a provided secret into secure backend.\"\"\""},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_59920afd","line":22,"in_reply_to":"baada198_e058bd33","updated":"2014-07-30 22:24:24.000000000","message":"+1 Especially as the same concept is used in the get_plugin_store call on line 44 which is passing in a True.","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"79b697df2b3e322969600892f77c47cdd246f5d7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        if plugin_name is None:"},{"line_number":71,"context_line":"            raise ValueError(\"Invalid plugin name for transport key\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        transport_key \u003d transport_key_model.transport_key"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Locate a suitable plugin to store the secret."},{"line_number":76,"context_line":"    store_plugin \u003d secret_store.SecretStorePluginManager().\\"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_075b2023","line":73,"updated":"2014-07-29 06:38:30.000000000","message":"could you move all this? (from line 61 to line 73) to one or more separate functions? this store_secret function is getting quite cluttered with stuff, and in the end it seems that only thing you need from this block of code is to get the plugin_name and the transport_key. So it would be better to make that intent explicit by having it separate.","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"9ec0e30e857ace6558e934f98556403072e09055","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        if plugin_name is None:"},{"line_number":71,"context_line":"            raise ValueError(\"Invalid plugin name for transport key\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        transport_key \u003d transport_key_model.transport_key"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Locate a suitable plugin to store the secret."},{"line_number":76,"context_line":"    store_plugin \u003d secret_store.SecretStorePluginManager().\\"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_f9a75e4f","line":73,"in_reply_to":"baada198_075b2023","updated":"2014-07-30 22:24:24.000000000","message":"+1","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"5a2cfc9f833aa838c838cf60f98e2ff0956b44f2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        if plugin_name is None:"},{"line_number":71,"context_line":"            raise ValueError(\"Invalid plugin name for transport key\")"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        transport_key \u003d transport_key_model.transport_key"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Locate a suitable plugin to store the secret."},{"line_number":76,"context_line":"    store_plugin \u003d secret_store.SecretStorePluginManager().\\"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_f3c5003f","line":73,"in_reply_to":"baada198_075b2023","updated":"2014-07-31 02:12:21.000000000","message":"sure","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"24dece8e071bea62841ae1c726875259eed1a7e7","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                                    bit_length\u003dspec.get(\u0027bit_length\u0027),"},{"line_number":94,"context_line":"                                    mode\u003dspec.get(\u0027mode\u0027))"},{"line_number":95,"context_line":"    secret_dto \u003d secret_store.SecretDTO(None, unencrypted, key_spec,"},{"line_number":96,"context_line":"                                        content_type, transport_key)"},{"line_number":97,"context_line":"    secret_metadata \u003d store_plugin.store_secret(secret_dto, context)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    # Save secret and metadata."}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_f7f2da03","line":96,"updated":"2014-07-31 23:37:40.000000000","message":"Easier to read when arguments are passed in keyword format.","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"},{"author":{"_account_id":6783,"name":"Nathan Reller","email":"nathan.s.reller@gmail.com","username":"rellerreller"},"change_message_id":"acda3e0c00e30c95b0876328beadff243cd0c710","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from barbican.plugin.util import translations as tr"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def get_transport_key_model(repos, transport_key_needed):"},{"line_number":21,"context_line":"    key_model \u003d None"},{"line_number":22,"context_line":"    if transport_key_needed:"},{"line_number":23,"context_line":"        # get_plugin_store() will throw an exception if no suitable"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_4afb55be","line":20,"updated":"2014-08-05 16:44:58.000000000","message":"Suggestion only, perhaps change the name to get_default_transport_key_model. The reason I say that is because it returns the default one or the first one found.\n\nWhat is our Barbican\u0027s policy for documenting code? I\u0027m a Java guy, so all of our protected and public items must have comments.","commit_id":"cd70a208c621400c3a26efccdf0a3135ff6ed44b"}],"barbican/tests/api/test_resources.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"95d253efadca77511be09960c744cf4fc44b7118","unresolved":false,"context_lines":[{"line_number":1636,"context_line":"        self.secret_refs \u003d ["},{"line_number":1637,"context_line":"            {"},{"line_number":1638,"context_line":"                \u0027name\u0027: \u0027test secret 1\u0027,"},{"line_number":1639,"context_line":"                \u0027secret_ref\u0027: \u0027123\u0027"},{"line_number":1640,"context_line":"            },"},{"line_number":1641,"context_line":"            {"},{"line_number":1642,"context_line":"                \u0027name\u0027: \u0027test secret 2\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_e7a913de","line":1639,"updated":"2014-08-02 23:45:47.000000000","message":"these are causing the tox errors about multiple secret IDs in the container.","commit_id":"adeeead7edf2c80be9808b39d3ce2c06ed1ba14a"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"8df0ad86a6538b543e46156111511c04d16f8b31","unresolved":false,"context_lines":[{"line_number":1636,"context_line":"        self.secret_refs \u003d ["},{"line_number":1637,"context_line":"            {"},{"line_number":1638,"context_line":"                \u0027name\u0027: \u0027test secret 1\u0027,"},{"line_number":1639,"context_line":"                \u0027secret_ref\u0027: \u0027123\u0027"},{"line_number":1640,"context_line":"            },"},{"line_number":1641,"context_line":"            {"},{"line_number":1642,"context_line":"                \u0027name\u0027: \u0027test secret 2\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_73603ba4","line":1639,"in_reply_to":"baada198_e7a913de","updated":"2014-08-04 18:14:43.000000000","message":"thanks for clearing that up.  Bad merge!  Will fix.","commit_id":"adeeead7edf2c80be9808b39d3ce2c06ed1ba14a"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"95d253efadca77511be09960c744cf4fc44b7118","unresolved":false,"context_lines":[{"line_number":1640,"context_line":"            },"},{"line_number":1641,"context_line":"            {"},{"line_number":1642,"context_line":"                \u0027name\u0027: \u0027test secret 2\u0027,"},{"line_number":1643,"context_line":"                \u0027secret_ref\u0027: \u0027123\u0027"},{"line_number":1644,"context_line":"            },"},{"line_number":1645,"context_line":"            {"},{"line_number":1646,"context_line":"                \u0027name\u0027: \u0027test secret 3\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_07b3674e","line":1643,"updated":"2014-08-02 23:45:47.000000000","message":"see above","commit_id":"adeeead7edf2c80be9808b39d3ce2c06ed1ba14a"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"95d253efadca77511be09960c744cf4fc44b7118","unresolved":false,"context_lines":[{"line_number":1644,"context_line":"            },"},{"line_number":1645,"context_line":"            {"},{"line_number":1646,"context_line":"                \u0027name\u0027: \u0027test secret 3\u0027,"},{"line_number":1647,"context_line":"                \u0027secret_ref\u0027: \u0027123\u0027"},{"line_number":1648,"context_line":"            }"},{"line_number":1649,"context_line":"        ]"},{"line_number":1650,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_27b06b3f","line":1647,"updated":"2014-08-02 23:45:47.000000000","message":"see above","commit_id":"adeeead7edf2c80be9808b39d3ce2c06ed1ba14a"}],"barbican/tests/plugin/interface/test_secret_store.py":[{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"9ec0e30e857ace6558e934f98556403072e09055","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        self.assertRaises("},{"line_number":138,"context_line":"            str.SecretStoreSupportedPluginNotFound,"},{"line_number":139,"context_line":"            self.manager.get_plugin_store,"},{"line_number":140,"context_line":"            transport_key_needed\u003dTrue,"},{"line_number":141,"context_line":"        )"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def test_get_store_with_tkey(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_1c1a406f","line":140,"updated":"2014-07-30 22:24:24.000000000","message":"Thanks for the clarification!","commit_id":"08ffe76b5f7ba71ef28e4c32b29a198b25338102"}]}
