)]}'
{"barbican/model/repositories.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"1eeef28b10e515a869832dfcfe6f73089ccf0d34","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    This class provides template methods that allow sub-classes to hook"},{"line_number":285,"context_line":"    specific functionality as needed. Clients access instances of this class"},{"line_number":286,"context_line":"    via singletons, therefore keep implementations stateless aside from"},{"line_number":287,"context_line":"    configuration."},{"line_number":288,"context_line":"    \"\"\""},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_60aa0d86","line":286,"updated":"2014-08-23 23:10:08.000000000","message":"do you mean \"keeping\"?","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8c353f9255d92984a08bb934296b7ef97478d1f","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    This class provides template methods that allow sub-classes to hook"},{"line_number":285,"context_line":"    specific functionality as needed. Clients access instances of this class"},{"line_number":286,"context_line":"    via singletons, therefore keep implementations stateless aside from"},{"line_number":287,"context_line":"    configuration."},{"line_number":288,"context_line":"    \"\"\""},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_820d643a","line":286,"in_reply_to":"1abeadc6_60aa0d86","updated":"2014-08-25 03:11:22.000000000","message":"I think keep is the proper verb form here, but perhaps this would be more clear?:\n\ntherefore implementations should be stateless aside from ...","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"1eeef28b10e515a869832dfcfe6f73089ccf0d34","unresolved":false,"context_lines":[{"line_number":1035,"context_line":""},{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"def get_secret_repository():"},{"line_number":1038,"context_line":"    \"\"\"Create singleton Secret repository instance.\"\"\""},{"line_number":1039,"context_line":"    global _SECRET_REPOSITORY"},{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"    if not _SECRET_REPOSITORY:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_c0920156","line":1038,"updated":"2014-08-23 23:10:08.000000000","message":"Howsabout \"Return a\" rather than \"create\" then mention that if it doesn\u0027t exist yet we will create it?  Same for the other repos below...","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8c353f9255d92984a08bb934296b7ef97478d1f","unresolved":false,"context_lines":[{"line_number":1035,"context_line":""},{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"def get_secret_repository():"},{"line_number":1038,"context_line":"    \"\"\"Create singleton Secret repository instance.\"\"\""},{"line_number":1039,"context_line":"    global _SECRET_REPOSITORY"},{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"    if not _SECRET_REPOSITORY:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_a2118055","line":1038,"in_reply_to":"1abeadc6_c0920156","updated":"2014-08-25 03:11:22.000000000","message":"Good point, I\u0027ll fix that.","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"1eeef28b10e515a869832dfcfe6f73089ccf0d34","unresolved":false,"context_lines":[{"line_number":1038,"context_line":"    \"\"\"Create singleton Secret repository instance.\"\"\""},{"line_number":1039,"context_line":"    global _SECRET_REPOSITORY"},{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"    if not _SECRET_REPOSITORY:"},{"line_number":1042,"context_line":"        _SECRET_REPOSITORY \u003d SecretRepo()"},{"line_number":1043,"context_line":"    return _SECRET_REPOSITORY"},{"line_number":1044,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_e09d3d67","line":1041,"updated":"2014-08-23 23:10:08.000000000","message":"any threading issues here?  Same for the other repos below...","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8c353f9255d92984a08bb934296b7ef97478d1f","unresolved":false,"context_lines":[{"line_number":1038,"context_line":"    \"\"\"Create singleton Secret repository instance.\"\"\""},{"line_number":1039,"context_line":"    global _SECRET_REPOSITORY"},{"line_number":1040,"context_line":""},{"line_number":1041,"context_line":"    if not _SECRET_REPOSITORY:"},{"line_number":1042,"context_line":"        _SECRET_REPOSITORY \u003d SecretRepo()"},{"line_number":1043,"context_line":"    return _SECRET_REPOSITORY"},{"line_number":1044,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_224c9076","line":1041,"in_reply_to":"1abeadc6_e09d3d67","updated":"2014-08-25 03:11:22.000000000","message":"I don\u0027t think there are threading issues. I don\u0027t believe that the XxxxRepo() classes block/yield their lightweight threads. Also, we currently create multiple instances of XxxxRepos(), so if more than one was created via this approach, that should not be an issue. That said, I can look into thread locks to make this truely threadsafe.","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ff2bcc54e61f44066a5ab9688ee858130bd5e605","unresolved":false,"context_lines":[{"line_number":53,"context_line":"_SECRET_REPOSITORY \u003d None"},{"line_number":54,"context_line":"_TENANT_SECRET_REPOSITORY \u003d None"},{"line_number":55,"context_line":"_ENCRYPTED_DATUM_REPOSITORY \u003d None"},{"line_number":56,"context_line":"_KEK_DATUM_REPOSITORY \u003d None"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"db_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_94db4b7b","line":56,"updated":"2014-08-28 09:31:25.000000000","message":"Even though I think the whole approach is the right one. I think it would be better to have a dictionary such as this one:\n\n_REPOSITORIES \u003d {\n    \u0027secrets\u0027: {\n        \u0027instance\u0027: None,\n        \u0027constructor\u0027: SecretRepo,\n    },\n    \u0027tenant_secrets\u0027: {\n        \u0027instance\u0027: None,\n        \u0027constructor\u0027: TenantSecretRepo,\n    },\n    ...\n}\n\nSo instead of having several functions, you could have only one such as the following:\n\ndef get_repository(repo_name):\n    global _REPOSITORIES\n    if not _REPOSITORIES[repo_name][\u0027instance\u0027]:\n        _REPOSITORIES[repo_name][\u0027instance\u0027] \u003d _REPOSITORIES[repo_name][\u0027constructor\u0027]()\n    return _REPOSITORIES[repo_name][\u0027instance\u0027]\n\nOn the other hand, things would be even more simple without the lazy initialization, since it would end up like this:\n\n_REPOSITORIES \u003d {\n    \u0027secrets\u0027: SecretRepo(),\n    \u0027tenant_secrets\u0027: TenantSecretRepo(),\n    ...\n}\n\nAnd the function would look like this:\n\ndef get_repository(repo_name):\n    global _REPOSITORIES\n    return _REPOSITORIES[repo_name]","commit_id":"e1330f38ba5c3399f235ab59019835c02b87553f"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"9b0939f1c6b2fa0c78ed0bfd961902bbe1a3c402","unresolved":false,"context_lines":[{"line_number":53,"context_line":"_SECRET_REPOSITORY \u003d None"},{"line_number":54,"context_line":"_TENANT_SECRET_REPOSITORY \u003d None"},{"line_number":55,"context_line":"_ENCRYPTED_DATUM_REPOSITORY \u003d None"},{"line_number":56,"context_line":"_KEK_DATUM_REPOSITORY \u003d None"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"db_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_cd227fa2","line":56,"in_reply_to":"1abeadc6_94db4b7b","updated":"2014-08-28 20:27:31.000000000","message":"Without lazy init, database operations in the BaseRepo occur at import time, before the system is fully configured.The dictionary approach is interesting though....might reach out to the community a bit for feedback.","commit_id":"e1330f38ba5c3399f235ab59019835c02b87553f"},{"author":{"_account_id":9914,"name":"Ade Lee","email":"alee@redhat.com","username":"alee"},"change_message_id":"43f4ba4a972ee86fe172d1957482abd8b5cdd90a","unresolved":false,"context_lines":[{"line_number":54,"context_line":"_TENANT_SECRET_REPOSITORY \u003d None"},{"line_number":55,"context_line":"_ENCRYPTED_DATUM_REPOSITORY \u003d None"},{"line_number":56,"context_line":"_KEK_DATUM_REPOSITORY \u003d None"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"db_opts \u003d ["},{"line_number":60,"context_line":"    cfg.IntOpt(\u0027sql_idle_timeout\u0027, default\u003d3600),"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_684b1987","line":57,"updated":"2014-08-28 21:30:25.000000000","message":"I\u0027m more inclined towards the get_xxx_repository() mechanism.\nMakes things more explicit.","commit_id":"e1330f38ba5c3399f235ab59019835c02b87553f"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"51914004bd84383b5532ce55fb6b7230d73e7696","unresolved":false,"context_lines":[{"line_number":54,"context_line":"_TENANT_SECRET_REPOSITORY \u003d None"},{"line_number":55,"context_line":"_ENCRYPTED_DATUM_REPOSITORY \u003d None"},{"line_number":56,"context_line":"_KEK_DATUM_REPOSITORY \u003d None"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"db_opts \u003d ["},{"line_number":60,"context_line":"    cfg.IntOpt(\u0027sql_idle_timeout\u0027, default\u003d3600),"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_8cbea963","line":57,"in_reply_to":"1abeadc6_684b1987","updated":"2014-08-29 10:14:33.000000000","message":"well, the dictionary approach would be something like get_repository(xxx).\nsuch as get_repository(\u0027secrets\u0027), get_repository(\u0027tenant_secrets\u0027), which IMO is also quite explicit, it would be a matter of having proper documentation on what repos are available, which is desired and we will have, either way.","commit_id":"e1330f38ba5c3399f235ab59019835c02b87553f"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"d8eeebaf94f0a87082f43f310005e8153aff2d1e","unresolved":false,"context_lines":[{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"def get_secret_repository():"},{"line_number":1127,"context_line":"    \"\"\"Returns a singleton Secret repository instance.\"\"\""},{"line_number":1128,"context_line":"    global _SECRET_REPOSITORY"},{"line_number":1129,"context_line":"    return _get_repository(_SECRET_REPOSITORY, SecretRepo)"},{"line_number":1130,"context_line":""},{"line_number":1131,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_7e935d4f","line":1128,"updated":"2014-09-23 15:27:05.000000000","message":"Not hot on the use of globals, but it\u0027ll do for now. Eventually, I would like to look into a way of removing the dependence on globals","commit_id":"dcd943492e347781f35d061f49129746860a9432"}],"barbican/plugin/crypto/crypto.py":[{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"a6390637bb0597d82a86885a6f15fce68e5e19a7","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        secret data."},{"line_number":210,"context_line":"    :param kek_meta_extended: Optional String object to be persisted alongside"},{"line_number":211,"context_line":"        the cyphertext."},{"line_number":212,"context_line":"    \"\"\""},{"line_number":213,"context_line":"    def __init__(self, cypher_text, kek_meta_extended\u003dNone):"},{"line_number":214,"context_line":"        self.cypher_text \u003d cypher_text"},{"line_number":215,"context_line":"        self.kek_meta_extended \u003d kek_meta_extended"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_132fdea2","line":212,"updated":"2014-09-22 05:57:39.000000000","message":"Nice sphinx doc updates!","commit_id":"dcd943492e347781f35d061f49129746860a9432"}],"barbican/plugin/resources.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"b61a073991376847831b8caaa853fac52ce80aae","unresolved":false,"context_lines":[{"line_number":217,"context_line":"    # TODO(john-wood-w) Remove the SecretStoreContext once repository factory"},{"line_number":218,"context_line":"    #  and unit test patch work is completed."},{"line_number":219,"context_line":"    context \u003d secret_store.\\"},{"line_number":220,"context_line":"        SecretStoreContext(content_type\u003dcontent_type,"},{"line_number":221,"context_line":"                           private_secret_model\u003dprivate_secret_model,"},{"line_number":222,"context_line":"                           public_secret_model\u003dpublic_secret_model,"},{"line_number":223,"context_line":"                           passphrase_secret_model\u003dpassphrase_secret_model,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa98f980_d7aae083","line":220,"updated":"2014-09-04 23:07:30.000000000","message":"tox tests are failing","commit_id":"2ebc12641024cee8ee8ea52667605a43dfc778bf"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"d8eeebaf94f0a87082f43f310005e8153aff2d1e","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        enforce_text_only\u003dTrue)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    # Store the secret securely."},{"line_number":111,"context_line":"    # TODO(john-wood-w) Remove the SecretStoreContext once repository factory"},{"line_number":112,"context_line":"    #  and unit test patch work is completed."},{"line_number":113,"context_line":"    secret_type \u003d secret_store.KeyAlgorithm().get_secret_type(key_spec.alg)"},{"line_number":114,"context_line":"    secret_dto \u003d secret_store.SecretDTO(type\u003dsecret_type,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da9df570_1e4a51c5","line":111,"updated":"2014-09-23 15:27:05.000000000","message":"Shouldn\u0027t this comment be removed?","commit_id":"dcd943492e347781f35d061f49129746860a9432"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"d8eeebaf94f0a87082f43f310005e8153aff2d1e","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    # Create secret models to eventually save metadata to."},{"line_number":214,"context_line":"    private_secret_model \u003d models.Secret(spec)"},{"line_number":215,"context_line":"    public_secret_model \u003d models.Secret(spec)"},{"line_number":216,"context_line":"    passphrase_secret_model \u003d models.Secret(spec)\\"},{"line_number":217,"context_line":"        if spec.get(\u0027passphrase\u0027) else None"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    # Generate the secret."}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_830245b2","line":216,"updated":"2014-09-23 15:27:05.000000000","message":"This is a violation in the latest hacking standards. Even though we\u0027re not yet gating on it, we\u0027re trying to avoid adding more of these, could you replace the backslash with an alternate line continuation form?","commit_id":"dcd943492e347781f35d061f49129746860a9432"}],"barbican/plugin/store_crypto.py":[{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"1eeef28b10e515a869832dfcfe6f73089ccf0d34","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :param secret_dto: SecretDTO for secret"},{"line_number":61,"context_line":"        :param context: StoreCryptoContext for secret"},{"line_number":62,"context_line":"        :returns: a dictionary that contains metadata about the secret"},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        # Find HSM-style \u0027crypto\u0027 plugin."}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_c0792130","line":62,"updated":"2014-08-23 23:10:08.000000000","message":"looks like it only returns None (line 94)","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8c353f9255d92984a08bb934296b7ef97478d1f","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :param secret_dto: SecretDTO for secret"},{"line_number":61,"context_line":"        :param context: StoreCryptoContext for secret"},{"line_number":62,"context_line":"        :returns: a dictionary that contains metadata about the secret"},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        # Find HSM-style \u0027crypto\u0027 plugin."}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_a72352bd","line":62,"in_reply_to":"1abeadc6_c0792130","updated":"2014-08-25 03:11:22.000000000","message":"The return dict is optional for allowing a plugin to store plugin meta for a secret, but because the store_crypto.py module stores its own meta info (in the various datum entities) this is not needed.","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"1eeef28b10e515a869832dfcfe6f73089ccf0d34","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        :param secret_metadata: secret metadata"},{"line_number":100,"context_line":"        :param context: StoreCryptoContext for secret"},{"line_number":101,"context_line":"        :returns: SecretDTO that contains secret"},{"line_number":102,"context_line":"        \"\"\""},{"line_number":103,"context_line":"        if not context.secret_model \\"},{"line_number":104,"context_line":"                or not context.secret_model.encrypted_data:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_e0745d37","line":101,"updated":"2014-08-23 23:10:08.000000000","message":"doesn\u0027t appear to return anything","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8c353f9255d92984a08bb934296b7ef97478d1f","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        :param secret_metadata: secret metadata"},{"line_number":100,"context_line":"        :param context: StoreCryptoContext for secret"},{"line_number":101,"context_line":"        :returns: SecretDTO that contains secret"},{"line_number":102,"context_line":"        \"\"\""},{"line_number":103,"context_line":"        if not context.secret_model \\"},{"line_number":104,"context_line":"                or not context.secret_model.encrypted_data:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_c7592e5d","line":101,"in_reply_to":"1abeadc6_e0745d37","updated":"2014-08-25 03:11:22.000000000","message":"A SecretDTO is returned at line #131.","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"1eeef28b10e515a869832dfcfe6f73089ccf0d34","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        :param key_spec: KeySpec that contains details on the type of key to"},{"line_number":143,"context_line":"        generate"},{"line_number":144,"context_line":"        :param context: StoreCryptoContext for secret"},{"line_number":145,"context_line":"        :returns: a dictionary that contains metadata about the key"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        # Find HSM-style \u0027crypto\u0027 plugin."}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_0070793e","line":145,"updated":"2014-08-23 23:10:08.000000000","message":"only returns None (line 184)","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"f8c353f9255d92984a08bb934296b7ef97478d1f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        :param key_spec: KeySpec that contains details on the type of key to"},{"line_number":143,"context_line":"        generate"},{"line_number":144,"context_line":"        :param context: StoreCryptoContext for secret"},{"line_number":145,"context_line":"        :returns: a dictionary that contains metadata about the key"},{"line_number":146,"context_line":"        \"\"\""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        # Find HSM-style \u0027crypto\u0027 plugin."}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_a70a7225","line":145,"in_reply_to":"1abeadc6_0070793e","updated":"2014-08-25 03:11:22.000000000","message":"See store_secret comment above.","commit_id":"60b83651937ec7dd4c11759c506b910ad1f16735"}]}
