)]}'
{"barbican/cmd/pkcs11_kek_rewrap.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"eb9197eb14e11306c1289e65278587c18c0fdf49","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.plugin_name \u003d utils.generate_fullname_for(self.crypto_plugin)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def rewrap_kek(self, project, kek):"},{"line_number":48,"context_line":"        with self.db_session.begin():"},{"line_number":49,"context_line":"            meta_dict \u003d json.loads(kek.plugin_meta)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"            if self.dry_run:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_42c74b12","line":48,"updated":"2015-07-07 02:43:46.000000000","message":"Per the cover comment in my review comments before, this CR\u0027s approach just deals with the pkcs11 plugin rotation. In general though, other crypto/hsm plugins could be deployed and used to create secrets. So I think we need to add a paper cut to make the \u0027rewrap_kek()\u0027 method generic on the crypto plugins.\n\nIn the mean time though, this method needs to check that the kek entity’s ‘plugin_name’ matches the pkcs11 one, otherwise it needs to skip the re-wrap.","commit_id":"eef4351cb8d65d5412eccd0c5e27d51dc1cf469c"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"b812802a5d56d332f28938d41454f27c3090b9f8","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.plugin_name \u003d utils.generate_fullname_for(self.crypto_plugin)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def rewrap_kek(self, project, kek):"},{"line_number":48,"context_line":"        with self.db_session.begin():"},{"line_number":49,"context_line":"            meta_dict \u003d json.loads(kek.plugin_meta)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"            if self.dry_run:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_cd85c7cf","line":48,"in_reply_to":"ba3cc151_42c74b12","updated":"2015-07-07 07:47:13.000000000","message":"Re: a generic rewrap kek in generic crypto plugins:\nI don\u0027t think that is the correct approach. Key wrapping is highly backend implementation specific and not everyone may have the ability to do it or want it. This is the reason why we currently don\u0027t expose wrap and unwrap in the plugin contract either.\n\nRe: checking the plugin name:\nI guess I can make this change. While in theory, Barbican is written so that someone could be running multiple crypto stores; however, in practice. I don\u0027t believe people deploying barbican would mix and match crypto store backends. I doubt you\u0027re going to use pkcs11 for some secrets and kmip for others. Personally, while I know it\u0027s theoretically possible, I think it\u0027s rather impractical and I wouldn\u0027t recommend anyone trying it in a production use-case.","commit_id":"eef4351cb8d65d5412eccd0c5e27d51dc1cf469c"}],"barbican/plugin/crypto/pkcs11.py":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"85be095a1f7419d00293e85adb2b1e9754406507","unresolved":false,"context_lines":[{"line_number":464,"context_line":"            Attribute(CKA_CLASS, CKO_SECRET_KEY),"},{"line_number":465,"context_line":"            Attribute(CKA_KEY_TYPE, CKK_AES),"},{"line_number":466,"context_line":"            Attribute(CKA_VALUE_LEN, 32),"},{"line_number":467,"context_line":"            Attribute(CKA_LABEL, hmac_label),"},{"line_number":468,"context_line":"            Attribute(CKA_PRIVATE, True),"},{"line_number":469,"context_line":"            Attribute(CKA_SENSITIVE, True),"},{"line_number":470,"context_line":"            Attribute(CKA_SIGN, True),"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_d8c3f8eb","line":467,"updated":"2015-07-01 19:39:27.000000000","message":"Hmmm...your change below has me curious about this label too...is a similar normalization needed here too? And above in line #434 as well?","commit_id":"c60fda4aa96d76c46550a1c3392e3c144c565971"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"5ea195c863c6c17288d72fceb5b84597b8f591d1","unresolved":false,"context_lines":[{"line_number":464,"context_line":"            Attribute(CKA_CLASS, CKO_SECRET_KEY),"},{"line_number":465,"context_line":"            Attribute(CKA_KEY_TYPE, CKK_AES),"},{"line_number":466,"context_line":"            Attribute(CKA_VALUE_LEN, 32),"},{"line_number":467,"context_line":"            Attribute(CKA_LABEL, hmac_label),"},{"line_number":468,"context_line":"            Attribute(CKA_PRIVATE, True),"},{"line_number":469,"context_line":"            Attribute(CKA_SENSITIVE, True),"},{"line_number":470,"context_line":"            Attribute(CKA_SIGN, True),"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_19c9d8ac","line":467,"in_reply_to":"ba3cc151_d8c3f8eb","updated":"2015-07-06 14:28:04.000000000","message":"No it doesn\u0027t. This is not affected due to the fact that this type already comes through as a str type from Barbican\u0027s config values.","commit_id":"c60fda4aa96d76c46550a1c3392e3c144c565971"},{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"85be095a1f7419d00293e85adb2b1e9754406507","unresolved":false,"context_lines":[{"line_number":485,"context_line":"        ck_attributes \u003d self.build_attributes(["},{"line_number":486,"context_line":"            Attribute(CKA_CLASS, CKO_SECRET_KEY),"},{"line_number":487,"context_line":"            Attribute(CKA_KEY_TYPE, CKK_AES),"},{"line_number":488,"context_line":"            Attribute(CKA_LABEL, str(mkek_label))"},{"line_number":489,"context_line":"        ])"},{"line_number":490,"context_line":"        rv \u003d self.lib.C_FindObjectsInit("},{"line_number":491,"context_line":"            session, ck_attributes.template, len(ck_attributes.template)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_7858ac8a","line":488,"updated":"2015-07-01 19:39:27.000000000","message":"I think this will not be consistent between Python 2.x and 3.x...maybe six.u(mkek_label) instead?","commit_id":"c60fda4aa96d76c46550a1c3392e3c144c565971"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"5ea195c863c6c17288d72fceb5b84597b8f591d1","unresolved":false,"context_lines":[{"line_number":485,"context_line":"        ck_attributes \u003d self.build_attributes(["},{"line_number":486,"context_line":"            Attribute(CKA_CLASS, CKO_SECRET_KEY),"},{"line_number":487,"context_line":"            Attribute(CKA_KEY_TYPE, CKK_AES),"},{"line_number":488,"context_line":"            Attribute(CKA_LABEL, str(mkek_label))"},{"line_number":489,"context_line":"        ])"},{"line_number":490,"context_line":"        rv \u003d self.lib.C_FindObjectsInit("},{"line_number":491,"context_line":"            session, ck_attributes.template, len(ck_attributes.template)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_fc78a22d","line":488,"in_reply_to":"ba3cc151_7858ac8a","updated":"2015-07-06 14:28:04.000000000","message":"Any type other than a str will currently cause this to fail when using the value from the KEKDatum (See how build_attributes() works). This hasn\u0027t been an issue to date because we\u0027ve only used cached mkek handles based on the config value instead. Considering our P11 plugin isn\u0027t Python 3 compatible and making it so is quite out of scope of this CR, I\u0027m not inclined to change this right now. The cast to str() is a good indicator for a person writing the Python 3 compatibility script that they need to be very type conscious on this method.","commit_id":"c60fda4aa96d76c46550a1c3392e3c144c565971"}],"bin/pkcs11-kek-rewrap":[{"author":{"_account_id":7789,"name":"John Wood","email":"john.wood@rackspace.com","username":"woodster"},"change_message_id":"85be095a1f7419d00293e85adb2b1e9754406507","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ba3cc151_bd1aa67b","updated":"2015-07-01 19:39:27.000000000","message":"It would be better to add an entry point to the setup.cfg for this script.","commit_id":"c60fda4aa96d76c46550a1c3392e3c144c565971"},{"author":{"_account_id":7262,"name":"John Vrbanac","email":"john.vrbanac@linux.com","username":"john.vrbanac"},"change_message_id":"5ea195c863c6c17288d72fceb5b84597b8f591d1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ba3cc151_1793dfa4","in_reply_to":"ba3cc151_bd1aa67b","updated":"2015-07-06 14:28:04.000000000","message":"I\u0027ll make this change when I rebase.","commit_id":"c60fda4aa96d76c46550a1c3392e3c144c565971"}]}
