)]}'
{"doc/source/images/authComp.svg":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"a18eeb5013db05cd265ecabbb26ca940d4540355","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\" standalone\u003d\"no\"?\u003e"},{"line_number":2,"context_line":"\u003c!-- Created with Inkscape (http://www.inkscape.org/) --\u003e"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"\u003csvg"}],"source_content_type":"application/xml","patch_set":6,"id":"AAAAM3%2F%2FlRU%3D","line":1,"updated":"2013-01-15 02:15:20.000000000","message":"I don\u0027t think this file is used.  Was it an early version that became graphs_authComp.svg?","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"c717251d3859dcf2b6eda354b1a3474fcde4d730","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\" standalone\u003d\"no\"?\u003e"},{"line_number":2,"context_line":"\u003c!-- Created with Inkscape (http://www.inkscape.org/) --\u003e"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"\u003csvg"}],"source_content_type":"application/xml","patch_set":6,"id":"AAAAM3%2F%2FlLo%3D","line":1,"in_reply_to":"AAAAM3%2F%2FlRU%3D","updated":"2013-01-15 03:10:34.000000000","message":"Not sure. I just copied the entire dir over. I can remove it if we are absolutely sure it\u0027s not being used.","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"}],"doc/source/middlewarearchitecture.rst":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1c091a12100ecf3c81e48149fb6c9177886e197b","unresolved":false,"context_lines":[{"line_number":242,"context_line":"  ``memcache_secret_key`` option will be ignored."},{"line_number":243,"context_line":"* ``memcache_secret_key``: (optional) if defined, a random string"},{"line_number":244,"context_line":"  to be used for encryption key derivation. It is ignored if"},{"line_number":245,"context_line":"  ``memcache_security_strategy`` is ``MAC``."},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"Exchanging User Information"},{"line_number":248,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"AAAAM3%2F%2Flcs%3D","line":245,"updated":"2013-01-15 00:15:02.000000000","message":"Hmm, I\u0027m not really sure how this document deviated from \"middleware architecture\" to \"middleware architecture and configuration\" but this section really belongs in openstack-manuals somewhere.\n\nAdd \"DocImpact\" to the bottom of your commit message. I\u0027m sort of impartial on whether you should include this in this commit or not, as several toher things here need to be moved as well.","commit_id":"06bab80e5546cf32a005813f0ed322ef1b4d5e69"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"31427adee20edf87b18c0dc756405f438a2d5855","unresolved":false,"context_lines":[{"line_number":242,"context_line":"  ``memcache_secret_key`` option will be ignored."},{"line_number":243,"context_line":"* ``memcache_secret_key``: (optional) if defined, a random string"},{"line_number":244,"context_line":"  to be used for encryption key derivation. It is ignored if"},{"line_number":245,"context_line":"  ``memcache_security_strategy`` is ``MAC``."},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"Exchanging User Information"},{"line_number":248,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"AAAAM3%2F%2FlaU%3D","line":245,"in_reply_to":"AAAAM3%2F%2Flcs%3D","updated":"2013-01-15 00:28:51.000000000","message":"That\u0027s the doc where we mentioned how to configure auth_token middleware. But sure, I\u0027ll add DocImpact.","commit_id":"06bab80e5546cf32a005813f0ed322ef1b4d5e69"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"a18eeb5013db05cd265ecabbb26ca940d4540355","unresolved":false,"context_lines":[{"line_number":204,"context_line":"* ``token_cache_time``: (optional, default 300 seconds) Only valid if"},{"line_number":205,"context_line":"  memcache_servers is defined."},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"When deploy auth_token middleware with Swift, user may elect"},{"line_number":208,"context_line":"to use Swift MemcacheRing instead of the local Keystone memcache."},{"line_number":209,"context_line":"Swift MemcacheRing object is passed in from the request environment and its"},{"line_number":210,"context_line":"identified by \u0027swift.cache\u0027 by default. However it could be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"AAAAM3%2F%2FlRM%3D","line":207,"updated":"2013-01-15 02:15:20.000000000","message":"\"When deploying \"  \"the user may elect\"","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"a18eeb5013db05cd265ecabbb26ca940d4540355","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"When deploy auth_token middleware with Swift, user may elect"},{"line_number":208,"context_line":"to use Swift MemcacheRing instead of the local Keystone memcache."},{"line_number":209,"context_line":"Swift MemcacheRing object is passed in from the request environment and its"},{"line_number":210,"context_line":"identified by \u0027swift.cache\u0027 by default. However it could be"},{"line_number":211,"context_line":"different, depending on deployment. To use Swift MemcacheRing, you must"},{"line_number":212,"context_line":"provide the ``cache`` option."}],"source_content_type":"text/x-rst","patch_set":6,"id":"AAAAM3%2F%2FlRI%3D","line":209,"updated":"2013-01-15 02:15:20.000000000","message":"\"The Swift MemcacheRing object is passed \"  \"and it defaults to \u0027switft.cache.\"","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"}],"keystoneclient/middleware/auth_token.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":172,"context_line":"               default\u003dos.path.expanduser(\u0027~/keystone-signing\u0027)),"},{"line_number":173,"context_line":"    cfg.ListOpt(\u0027memcache_servers\u0027),"},{"line_number":174,"context_line":"    cfg.IntOpt(\u0027token_cache_time\u0027, default\u003d300),"},{"line_number":175,"context_line":"    cfg.StrOpt(\u0027memcache_value_treatment\u0027, default\u003d\u0027NONE\u0027),"},{"line_number":176,"context_line":"    cfg.StrOpt(\u0027memcache_crypt_key_derivation_secret\u0027, default\u003d\u0027blahblah!!!\u0027),"},{"line_number":177,"context_line":"]"},{"line_number":178,"context_line":"CONF.register_opts(opts, group\u003d\u0027keystone_authtoken\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmYM%3D","line":175,"updated":"2013-01-14 17:21:24.000000000","message":"can\u0027t you just default it to None / don\u0027t define a default? explicitly setting memcache_value_treatment\u003dNONE in *.conf seems weird, which is what this implies\n\n\u0027memcache_value_treatment\u0027 -\u003e \u0027memcache_security_strategy\u0027?","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"f633000f6ef56f315c3393741e902be4d3d8ddf1","unresolved":false,"context_lines":[{"line_number":172,"context_line":"               default\u003dos.path.expanduser(\u0027~/keystone-signing\u0027)),"},{"line_number":173,"context_line":"    cfg.ListOpt(\u0027memcache_servers\u0027),"},{"line_number":174,"context_line":"    cfg.IntOpt(\u0027token_cache_time\u0027, default\u003d300),"},{"line_number":175,"context_line":"    cfg.StrOpt(\u0027memcache_value_treatment\u0027, default\u003d\u0027NONE\u0027),"},{"line_number":176,"context_line":"    cfg.StrOpt(\u0027memcache_crypt_key_derivation_secret\u0027, default\u003d\u0027blahblah!!!\u0027),"},{"line_number":177,"context_line":"]"},{"line_number":178,"context_line":"CONF.register_opts(opts, group\u003d\u0027keystone_authtoken\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmKg%3D","line":175,"in_reply_to":"AAAAM3%2F%2FmYM%3D","updated":"2013-01-14 18:28:02.000000000","message":"Sounds good.","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    cfg.ListOpt(\u0027memcache_servers\u0027),"},{"line_number":174,"context_line":"    cfg.IntOpt(\u0027token_cache_time\u0027, default\u003d300),"},{"line_number":175,"context_line":"    cfg.StrOpt(\u0027memcache_value_treatment\u0027, default\u003d\u0027NONE\u0027),"},{"line_number":176,"context_line":"    cfg.StrOpt(\u0027memcache_crypt_key_derivation_secret\u0027, default\u003d\u0027blahblah!!!\u0027),"},{"line_number":177,"context_line":"]"},{"line_number":178,"context_line":"CONF.register_opts(opts, group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmVk%3D","line":176,"updated":"2013-01-14 17:21:24.000000000","message":"can you default this to something even less secure? e.g. just use an empty string:\n\n  default\u003d\u0027\u0027\n\nyou could also set this to a constant and throw a warning every time it\u0027s used, e.g.:\n\n  DEFAULT_MEMCACHE_SECRET_KEY \u003d \u0027\u0027\n  cfg.StrOpt(\u0027memcache_secret_key\u0027, default\u003dDEFAULT_MEMCACHE_SECRET_KEY),\n\n  if memcache_value_treatment \u003d\u003d \u0027CRYPT\u0027:\n    if memcache_secret_key \u003d\u003d DEFAULT_MEMCACHE_SECRET_KEY:\n      log.warning(\u0027Using the default memcache_crypt_key_derivation_secret value\u0027)\n    # do the encryption anyway\n\nFinally, \u0027memcache_crypt_key_derivation_secret\u0027 is really long, so I used \u0027memcache_secret_key\u0027 above. hint hint ;)","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"f633000f6ef56f315c3393741e902be4d3d8ddf1","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    cfg.ListOpt(\u0027memcache_servers\u0027),"},{"line_number":174,"context_line":"    cfg.IntOpt(\u0027token_cache_time\u0027, default\u003d300),"},{"line_number":175,"context_line":"    cfg.StrOpt(\u0027memcache_value_treatment\u0027, default\u003d\u0027NONE\u0027),"},{"line_number":176,"context_line":"    cfg.StrOpt(\u0027memcache_crypt_key_derivation_secret\u0027, default\u003d\u0027blahblah!!!\u0027),"},{"line_number":177,"context_line":"]"},{"line_number":178,"context_line":"CONF.register_opts(opts, group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmKs%3D","line":176,"in_reply_to":"AAAAM3%2F%2FmVk%3D","updated":"2013-01-14 18:28:02.000000000","message":"Nice! I knew I am going to get some alt suggestions on memcache_crypt_key_derivation. :)","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":270,"context_line":""},{"line_number":271,"context_line":"        # Token caching via memcache"},{"line_number":272,"context_line":"        self._cache \u003d None"},{"line_number":273,"context_line":"        self._iso8601 \u003d None"},{"line_number":274,"context_line":"        self._use_keystone_cache \u003d False"},{"line_number":275,"context_line":"        self._cache_initialized \u003d False    # cache already initialzied?"},{"line_number":276,"context_line":"        # memcache value treatment, ENCRYPT, MAC, or NONE"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmYg%3D","line":273,"updated":"2013-01-14 17:21:24.000000000","message":"remove iso8601 references, this looks like a bad rebase","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                    import memcache"},{"line_number":301,"context_line":"                    self.LOG.info(\u0027Using Keystone memcache for caching token\u0027)"},{"line_number":302,"context_line":"                    self._cache \u003d memcache.Client(memcache_servers)"},{"line_number":303,"context_line":"                    self._iso8601 \u003d iso8601"},{"line_number":304,"context_line":"                    self._use_keystone_cache \u003d True"},{"line_number":305,"context_line":"                except ImportError as e:"},{"line_number":306,"context_line":"                    msg \u003d \u0027disabled caching due to missing libraries %s\u0027 % (e)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmYc%3D","line":303,"updated":"2013-01-14 17:21:24.000000000","message":"see above","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":670,"context_line":"        return env.get(env_key, default)"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"    def _protect_cache_value(self, token, data):"},{"line_number":673,"context_line":"        \"\"\" Encrypt or sign data if necessary \"\"\""},{"line_number":674,"context_line":"        try:"},{"line_number":675,"context_line":"            if self._cache_value_treatment \u003d\u003d \u0027ENCRYPT\u0027:"},{"line_number":676,"context_line":"                return memcache_crypt.encrypt_data(token,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmXM%3D","line":673,"updated":"2013-01-14 17:21:24.000000000","message":"put period at the end of one line summaries (applies to all new docstrings below)","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":680,"context_line":"                return memcache_crypt.sign_data(token, data)"},{"line_number":681,"context_line":"            else:"},{"line_number":682,"context_line":"                return data"},{"line_number":683,"context_line":"        except Exception, e:"},{"line_number":684,"context_line":"            msg \u003d \u0027Failed to encrypt/signed cache data. Err\u003d%s\u0027 % (e)"},{"line_number":685,"context_line":"            self.LOG.error(msg)"},{"line_number":686,"context_line":"            return data"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmX8%3D","line":683,"updated":"2013-01-14 17:21:24.000000000","message":"Exception:\n\nside note: the \"Exception, e\" syntax is deprecated in favor of \"Exception as e\" because it can be easily confused with the tuple syntax, e.g. \"Exception, StandardError\"","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":681,"context_line":"            else:"},{"line_number":682,"context_line":"                return data"},{"line_number":683,"context_line":"        except Exception, e:"},{"line_number":684,"context_line":"            msg \u003d \u0027Failed to encrypt/signed cache data. Err\u003d%s\u0027 % (e)"},{"line_number":685,"context_line":"            self.LOG.error(msg)"},{"line_number":686,"context_line":"            return data"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmXo%3D","line":684,"updated":"2013-01-14 17:21:24.000000000","message":"msg \u003d \u0027Failed to encrypt/signed cache data.\u0027","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":682,"context_line":"                return data"},{"line_number":683,"context_line":"        except Exception, e:"},{"line_number":684,"context_line":"            msg \u003d \u0027Failed to encrypt/signed cache data. Err\u003d%s\u0027 % (e)"},{"line_number":685,"context_line":"            self.LOG.error(msg)"},{"line_number":686,"context_line":"            return data"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":"    def _unprotect_cache_value(self, token, data):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmXw%3D","line":685,"updated":"2013-01-14 17:21:24.000000000","message":"self.LOG.exception(msg)","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":686,"context_line":"            return data"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":"    def _unprotect_cache_value(self, token, data):"},{"line_number":689,"context_line":"        \"\"\" Encrypt or verify signed data if necessary \"\"\""},{"line_number":690,"context_line":"        if data is None:"},{"line_number":691,"context_line":"            return data"},{"line_number":692,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmW0%3D","line":689,"updated":"2013-01-14 17:21:24.000000000","message":"Decrypt?","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":699,"context_line":"                return memcache_crypt.verify_signed_data(token, data)"},{"line_number":700,"context_line":"            else:"},{"line_number":701,"context_line":"                return data"},{"line_number":702,"context_line":"        except Exception, e:"},{"line_number":703,"context_line":"            msg \u003d \u0027Failed to decrypt/verify cache data. Err\u003d%s\u0027 % (e)"},{"line_number":704,"context_line":"            self.LOG.error(msg)"},{"line_number":705,"context_line":"            # this should have the same effect as data not found in cache"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmX4%3D","line":702,"updated":"2013-01-14 17:21:24.000000000","message":"same as above","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":741,"context_line":"    def _cache_store(self, token, data, expires\u003dNone):"},{"line_number":742,"context_line":"        \"\"\" Store value into memcache"},{"line_number":743,"context_line":""},{"line_number":744,"context_line":"        \"\"\""},{"line_number":745,"context_line":"        key \u003d self._get_cache_key(token)"},{"line_number":746,"context_line":"        data \u003d self._protect_cache_value(token, data)"},{"line_number":747,"context_line":"        data_to_store \u003d data"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmWI%3D","line":744,"updated":"2013-01-14 17:21:24.000000000","message":"should technically move the closing \"\"\" up to the first line","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":749,"context_line":"            data_to_store \u003d (data, expires)"},{"line_number":750,"context_line":"        # we need to special-case set() because of the incompatibility between"},{"line_number":751,"context_line":"        # Swift MemcacheRing and python-memcached. See"},{"line_number":752,"context_line":"        # https://bugs.launchpad.net/swift/+bug/1095730"},{"line_number":753,"context_line":"        if self._use_keystone_cache:"},{"line_number":754,"context_line":"            self._cache.set(key,"},{"line_number":755,"context_line":"                            data_to_store,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmWY%3D","line":752,"updated":"2013-01-14 17:21:24.000000000","message":"nice comment","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":753,"context_line":"        if self._use_keystone_cache:"},{"line_number":754,"context_line":"            self._cache.set(key,"},{"line_number":755,"context_line":"                            data_to_store,"},{"line_number":756,"context_line":"                            time\u003dself.token_cache_time)"},{"line_number":757,"context_line":"        else:"},{"line_number":758,"context_line":"            self._cache.set(key,"},{"line_number":759,"context_line":"                            data_to_store,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmS8%3D","line":756,"updated":"2013-01-14 17:21:24.000000000","message":"is this supposed to be str(self.token_cache_time)? ...","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"848360b07165e66df862b9d4fe25b90712c8a293","unresolved":false,"context_lines":[{"line_number":753,"context_line":"        if self._use_keystone_cache:"},{"line_number":754,"context_line":"            self._cache.set(key,"},{"line_number":755,"context_line":"                            data_to_store,"},{"line_number":756,"context_line":"                            time\u003dself.token_cache_time)"},{"line_number":757,"context_line":"        else:"},{"line_number":758,"context_line":"            self._cache.set(key,"},{"line_number":759,"context_line":"                            data_to_store,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2Fl%2BY%3D","line":756,"in_reply_to":"AAAAM3%2F%2FmLI%3D","updated":"2013-01-14 19:26:10.000000000","message":"Ah, then just remove the int() below, as it\u0027s already an int AFAIK","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"f633000f6ef56f315c3393741e902be4d3d8ddf1","unresolved":false,"context_lines":[{"line_number":753,"context_line":"        if self._use_keystone_cache:"},{"line_number":754,"context_line":"            self._cache.set(key,"},{"line_number":755,"context_line":"                            data_to_store,"},{"line_number":756,"context_line":"                            time\u003dself.token_cache_time)"},{"line_number":757,"context_line":"        else:"},{"line_number":758,"context_line":"            self._cache.set(key,"},{"line_number":759,"context_line":"                            data_to_store,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmLI%3D","line":756,"in_reply_to":"AAAAM3%2F%2FmS8%3D","updated":"2013-01-14 18:28:02.000000000","message":"memcache client works with both int or str","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":757,"context_line":"        else:"},{"line_number":758,"context_line":"            self._cache.set(key,"},{"line_number":759,"context_line":"                            data_to_store,"},{"line_number":760,"context_line":"                            timeout\u003dint(self.token_cache_time))"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    def _cache_put(self, token, data):"},{"line_number":763,"context_line":"        \"\"\"Put token data into the cache."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmTA%3D","line":760,"updated":"2013-01-14 17:21:24.000000000","message":"because token_cache_time should already be an int","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1c091a12100ecf3c81e48149fb6c9177886e197b","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"# defalt memcache secret key. Will be used for encryption key and token"},{"line_number":152,"context_line":"# hash derivation. DO NOT use the default for obvious security reasons."},{"line_number":153,"context_line":"DEFAULT_MEMCACHE_SECRET_KEY \u003d \u0027change_me\u0027"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"# when deploy Keystone auth_token middleware with Swift, user may elect"},{"line_number":156,"context_line":"# to use Swift memcache instead of the local Keystone memcache. Swift memcache"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2Flcg%3D","line":153,"updated":"2013-01-15 00:15:02.000000000","message":"this is definitely better; but would still vote for an empty string","commit_id":"06bab80e5546cf32a005813f0ed322ef1b4d5e69"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"31427adee20edf87b18c0dc756405f438a2d5855","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"# defalt memcache secret key. Will be used for encryption key and token"},{"line_number":152,"context_line":"# hash derivation. DO NOT use the default for obvious security reasons."},{"line_number":153,"context_line":"DEFAULT_MEMCACHE_SECRET_KEY \u003d \u0027change_me\u0027"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"# when deploy Keystone auth_token middleware with Swift, user may elect"},{"line_number":156,"context_line":"# to use Swift memcache instead of the local Keystone memcache. Swift memcache"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FlaA%3D","line":153,"in_reply_to":"AAAAM3%2F%2Flcg%3D","updated":"2013-01-15 00:28:51.000000000","message":"Empty string means no key derivation at all. Which means, users with a token can still hack memcache to change his own token access data. I rather have something than nothing.","commit_id":"06bab80e5546cf32a005813f0ed322ef1b4d5e69"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1c091a12100ecf3c81e48149fb6c9177886e197b","unresolved":false,"context_lines":[{"line_number":176,"context_line":"               default\u003dos.path.expanduser(\u0027~/keystone-signing\u0027)),"},{"line_number":177,"context_line":"    cfg.ListOpt(\u0027memcache_servers\u0027),"},{"line_number":178,"context_line":"    cfg.IntOpt(\u0027token_cache_time\u0027, default\u003d300),"},{"line_number":179,"context_line":"    cfg.StrOpt(\u0027memcache_security_strategy\u0027, default\u003d\u0027\u0027),"},{"line_number":180,"context_line":"    cfg.StrOpt(\u0027memcache_secret_key\u0027, default\u003dDEFAULT_MEMCACHE_SECRET_KEY),"},{"line_number":181,"context_line":"]"},{"line_number":182,"context_line":"CONF.register_opts(opts, group\u003d\u0027keystone_authtoken\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2Flco%3D","line":179,"updated":"2013-01-15 00:15:02.000000000","message":"default\u003dNone","commit_id":"06bab80e5546cf32a005813f0ed322ef1b4d5e69"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1c091a12100ecf3c81e48149fb6c9177886e197b","unresolved":false,"context_lines":[{"line_number":692,"context_line":"                return data"},{"line_number":693,"context_line":"        except Exception as e:"},{"line_number":694,"context_line":"            msg \u003d \u0027Failed to encrypt/signed cache data.\u0027"},{"line_number":695,"context_line":"            self.LOG.error(msg)"},{"line_number":696,"context_line":"            msg \u003d \u0027%s Exception\u003d%s\u0027 % (msg, e)"},{"line_number":697,"context_line":"            self.LOG.exception(msg)"},{"line_number":698,"context_line":"            return data"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2Flcc%3D","line":695,"updated":"2013-01-15 00:15:02.000000000","message":"you\u0027re trying to do way more work than you have to (and logging everything twice as a result):\n\n  except:\n    self.LOG.exception(\u0027Failed to encrypt/sign cache data.\u0027)\n    return data\n\nUnless there\u0027s a specific error you\u0027re expecting and want to suppress, this is the easiest way to log a backtrace and move on.\n\nSee: http://paste.openstack.org/raw/29453/","commit_id":"06bab80e5546cf32a005813f0ed322ef1b4d5e69"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1c091a12100ecf3c81e48149fb6c9177886e197b","unresolved":false,"context_lines":[{"line_number":715,"context_line":"            msg \u003d \u0027Failed to decrypt/verify cache data.\u0027"},{"line_number":716,"context_line":"            self.LOG.error(msg)"},{"line_number":717,"context_line":"            msg \u003d \u0027%s Exception\u003d%s\u0027 % (msg, e)"},{"line_number":718,"context_line":"            self.LOG.exception(msg)"},{"line_number":719,"context_line":"            # this should have the same effect as data not found in cache"},{"line_number":720,"context_line":"            return None"},{"line_number":721,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2FlbY%3D","line":718,"updated":"2013-01-15 00:15:02.000000000","message":"see above","commit_id":"06bab80e5546cf32a005813f0ed322ef1b4d5e69"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"a18eeb5013db05cd265ecabbb26ca940d4540355","unresolved":false,"context_lines":[{"line_number":116,"context_line":"from keystoneclient.common import cms"},{"line_number":117,"context_line":"from keystoneclient import utils"},{"line_number":118,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":119,"context_line":"from keystoneclient.middleware import memcache_crypt"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"CONF \u003d None"},{"line_number":122,"context_line":"try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FlQ4%3D","line":119,"updated":"2013-01-15 02:15:20.000000000","message":"m comes before o","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"a18eeb5013db05cd265ecabbb26ca940d4540355","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    cfg.ListOpt(\u0027memcache_servers\u0027),"},{"line_number":178,"context_line":"    cfg.IntOpt(\u0027token_cache_time\u0027, default\u003d300),"},{"line_number":179,"context_line":"    cfg.StrOpt(\u0027memcache_security_strategy\u0027, default\u003dNone),"},{"line_number":180,"context_line":"    cfg.StrOpt(\u0027memcache_secret_key\u0027, default\u003dDEFAULT_MEMCACHE_SECRET_KEY),"},{"line_number":181,"context_line":"]"},{"line_number":182,"context_line":"CONF.register_opts(opts, group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FlQs%3D","line":180,"updated":"2013-01-15 02:15:20.000000000","message":"Instead default this to None and have the whole processs stop if they attempt to use encryption without setting an explicit key.  If that is not sufficient, generate a key as a UUID.  If the data encrypted in memcache is not retrievable, dump it.  The inability to unencrypt the cached data  will not break the server.","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"c717251d3859dcf2b6eda354b1a3474fcde4d730","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    cfg.ListOpt(\u0027memcache_servers\u0027),"},{"line_number":178,"context_line":"    cfg.IntOpt(\u0027token_cache_time\u0027, default\u003d300),"},{"line_number":179,"context_line":"    cfg.StrOpt(\u0027memcache_security_strategy\u0027, default\u003dNone),"},{"line_number":180,"context_line":"    cfg.StrOpt(\u0027memcache_secret_key\u0027, default\u003dDEFAULT_MEMCACHE_SECRET_KEY),"},{"line_number":181,"context_line":"]"},{"line_number":182,"context_line":"CONF.register_opts(opts, group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FlLk%3D","line":180,"in_reply_to":"AAAAM3%2F%2FlOg%3D","updated":"2013-01-15 03:10:34.000000000","message":"Problem with UUID is that it is not static. Which means if you are running multiple instance of Keystone, each instance will get a different key derivation. In that case, cache protection will be rather useless and become a hindrance because the values will always be invalidated. For a single instance, UUID is useful.","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"472be5c8d299e8b8668d3cea19db5f9a957c774d","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    cfg.ListOpt(\u0027memcache_servers\u0027),"},{"line_number":178,"context_line":"    cfg.IntOpt(\u0027token_cache_time\u0027, default\u003d300),"},{"line_number":179,"context_line":"    cfg.StrOpt(\u0027memcache_security_strategy\u0027, default\u003dNone),"},{"line_number":180,"context_line":"    cfg.StrOpt(\u0027memcache_secret_key\u0027, default\u003dDEFAULT_MEMCACHE_SECRET_KEY),"},{"line_number":181,"context_line":"]"},{"line_number":182,"context_line":"CONF.register_opts(opts, group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FlOg%3D","line":180,"in_reply_to":"AAAAM3%2F%2FlQs%3D","updated":"2013-01-15 02:28:32.000000000","message":"I\u0027d still like it to start if it\u0027s only minimally (mis)configured.\n\nSeeing as it\u0027s just a cache, +1 for \"if None then too bad, you get a UUID\" :)","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"e3162ee516622c882b1dd0fabb846e867b788a95","unresolved":false,"context_lines":[{"line_number":693,"context_line":"                return memcache_crypt.sign_data(token, data)"},{"line_number":694,"context_line":"            else:"},{"line_number":695,"context_line":"                return data"},{"line_number":696,"context_line":"        except Exception as e:"},{"line_number":697,"context_line":"            msg \u003d \u0027Failed to encrypt/signed cache data.\u0027"},{"line_number":698,"context_line":"            self.LOG.exception(msg)"},{"line_number":699,"context_line":"            return data"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FlZI%3D","line":696,"updated":"2013-01-15 00:40:33.000000000","message":"you can remove the \u0027as e\u0027 now since you\u0027re not using e","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"e3162ee516622c882b1dd0fabb846e867b788a95","unresolved":false,"context_lines":[{"line_number":694,"context_line":"            else:"},{"line_number":695,"context_line":"                return data"},{"line_number":696,"context_line":"        except Exception as e:"},{"line_number":697,"context_line":"            msg \u003d \u0027Failed to encrypt/signed cache data.\u0027"},{"line_number":698,"context_line":"            self.LOG.exception(msg)"},{"line_number":699,"context_line":"            return data"},{"line_number":700,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FlZE%3D","line":697,"updated":"2013-01-15 00:40:33.000000000","message":"also, \"signed\" should be \"sign\", if i\u0027m reading it correctly","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"e3162ee516622c882b1dd0fabb846e867b788a95","unresolved":false,"context_lines":[{"line_number":712,"context_line":"                return memcache_crypt.verify_signed_data(token, data)"},{"line_number":713,"context_line":"            else:"},{"line_number":714,"context_line":"                return data"},{"line_number":715,"context_line":"        except Exception as e:"},{"line_number":716,"context_line":"            msg \u003d \u0027Failed to decrypt/verify cache data.\u0027"},{"line_number":717,"context_line":"            self.LOG.exception(msg)"},{"line_number":718,"context_line":"            # this should have the same effect as data not found in cache"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FlZA%3D","line":715,"updated":"2013-01-15 00:40:33.000000000","message":"same as above","commit_id":"93e59156c7da07411aa6ba3731b07e6ab03a5063"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"de176ee4f9297eca29e2a3ab4b49db5f64bd8a07","unresolved":false,"context_lines":[{"line_number":680,"context_line":"        if (self._memcache_security_strategy \u003d\u003d \u0027ENCRYPT\u0027 or"},{"line_number":681,"context_line":"            self._memcache_security_strategy \u003d\u003d \u0027MAC\u0027):"},{"line_number":682,"context_line":"            if self._memcache_secret_key \u003d\u003d DEFAULT_MEMCACHE_SECRET_KEY:"},{"line_number":683,"context_line":"                self.LOG.warn(\u0027Using the default memcache secret key\u0027)"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"    def _protect_cache_value(self, token, data):"},{"line_number":686,"context_line":"        \"\"\" Encrypt or sign data if necessary. \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2Fj5g%3D","line":683,"updated":"2013-01-15 22:31:39.000000000","message":"Use the actual conf variable name here:\n\n  Using the default memcache_secret_key","commit_id":"8cec38ee3b2d9d09a67f0e580a364e4af7631733"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f2e8483cb741375e0a10b72eea4a6c20b69ea0a4","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        self._cache \u003d None"},{"line_number":273,"context_line":"        self._use_keystone_cache \u003d False"},{"line_number":274,"context_line":"        self._cache_initialized \u003d False    # cache already initialzied?"},{"line_number":275,"context_line":"        # memcache value treatment, ENCRYPT, MAC, or NONE"},{"line_number":276,"context_line":"        self._memcache_security_strategy \u003d \\"},{"line_number":277,"context_line":"            self._conf_get(\u0027memcache_security_strategy\u0027)"},{"line_number":278,"context_line":"        if self._memcache_security_strategy is not None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2Fjn8%3D","line":275,"updated":"2013-01-16 02:54:50.000000000","message":"drop the \u0027, or NONE\u0027","commit_id":"e86b4dff662d92006519b9f7e4dbf4ba68400c8c"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f2e8483cb741375e0a10b72eea4a6c20b69ea0a4","unresolved":false,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def _assert_memcache_secret_key_is_valid(self):"},{"line_number":292,"context_line":"        if (self._memcache_security_strategy \u003d\u003d \u0027ENCRYPT\u0027 or"},{"line_number":293,"context_line":"            self._memcache_security_strategy \u003d\u003d \u0027MAC\u0027):"},{"line_number":294,"context_line":"            if (self._memcache_secret_key is None or"},{"line_number":295,"context_line":"                len(self._memcache_secret_key) \u003d\u003d 0):"},{"line_number":296,"context_line":"                raise Exception(\u0027Invalid memcache_secret_key. It must not \u0027 +"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2FjoA%3D","line":293,"updated":"2013-01-16 02:54:50.000000000","message":"is not None","commit_id":"e86b4dff662d92006519b9f7e4dbf4ba68400c8c"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f2e8483cb741375e0a10b72eea4a6c20b69ea0a4","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        if (self._memcache_security_strategy \u003d\u003d \u0027ENCRYPT\u0027 or"},{"line_number":293,"context_line":"            self._memcache_security_strategy \u003d\u003d \u0027MAC\u0027):"},{"line_number":294,"context_line":"            if (self._memcache_secret_key is None or"},{"line_number":295,"context_line":"                len(self._memcache_secret_key) \u003d\u003d 0):"},{"line_number":296,"context_line":"                raise Exception(\u0027Invalid memcache_secret_key. It must not \u0027 +"},{"line_number":297,"context_line":"                                \u0027be None or zero length when memcache \u0027 +"},{"line_number":298,"context_line":"                                \u0027protection is enabled.\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2Fjn4%3D","line":295,"updated":"2013-01-16 02:54:50.000000000","message":"This can all be simplified to:\n\n  if self._memcache_security_strategy is not None and \\\n          not self._memcache_secret_key:","commit_id":"e86b4dff662d92006519b9f7e4dbf4ba68400c8c"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f2e8483cb741375e0a10b72eea4a6c20b69ea0a4","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                len(self._memcache_secret_key) \u003d\u003d 0):"},{"line_number":296,"context_line":"                raise Exception(\u0027Invalid memcache_secret_key. It must not \u0027 +"},{"line_number":297,"context_line":"                                \u0027be None or zero length when memcache \u0027 +"},{"line_number":298,"context_line":"                                \u0027protection is enabled.\u0027)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def _init_cache(self, env):"},{"line_number":301,"context_line":"        cache \u003d self._conf_get(\u0027cache\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2Fjns%3D","line":298,"updated":"2013-01-16 02:54:50.000000000","message":"drop the plus signs completely, you don\u0027t need them inside the parens\n\nalso, users won\u0027t set it to None in the config file, they\u0027ll just leave the value empty or not set it. this would suffice:\n\n  \u0027mecmache_secret_key must be defined when a memcache_security_strategy is defined.\u0027","commit_id":"e86b4dff662d92006519b9f7e4dbf4ba68400c8c"}],"keystoneclient/middleware/memcache_crypt.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":36,"context_line":"try:"},{"line_number":37,"context_line":"    import cPickle as pickle"},{"line_number":38,"context_line":"except ImportError:"},{"line_number":39,"context_line":"    import pickle"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# make sure pycrypt is available"},{"line_number":42,"context_line":"CRYPTO_AVAILABLE \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmQw%3D","line":39,"updated":"2013-01-14 17:21:24.000000000","message":"careful... do you really need to persist functions and classes and stuff, or just data? if json can\u0027t encode it, i wouldn\u0027t want it going into memcache","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"f633000f6ef56f315c3393741e902be4d3d8ddf1","unresolved":false,"context_lines":[{"line_number":36,"context_line":"try:"},{"line_number":37,"context_line":"    import cPickle as pickle"},{"line_number":38,"context_line":"except ImportError:"},{"line_number":39,"context_line":"    import pickle"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# make sure pycrypt is available"},{"line_number":42,"context_line":"CRYPTO_AVAILABLE \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmF4%3D","line":39,"in_reply_to":"AAAAM3%2F%2FmQw%3D","updated":"2013-01-14 18:28:02.000000000","message":"Yeah, json sound reasonable.","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":42,"context_line":"CRYPTO_AVAILABLE \u003d False"},{"line_number":43,"context_line":"try:"},{"line_number":44,"context_line":"    from Crypto.Cipher import AES"},{"line_number":45,"context_line":"    CRYPTO_AVAILABLE \u003d True"},{"line_number":46,"context_line":"except ImportError:"},{"line_number":47,"context_line":"    pass"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmSo%3D","line":45,"updated":"2013-01-14 17:21:24.000000000","message":"you don\u0027t need to store a boolean if you do...","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    from Crypto.Cipher import AES"},{"line_number":45,"context_line":"    CRYPTO_AVAILABLE \u003d True"},{"line_number":46,"context_line":"except ImportError:"},{"line_number":47,"context_line":"    pass"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# prefix marker indicating data is HMACed (signed by a secret key)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmS0%3D","line":47,"updated":"2013-01-14 17:21:24.000000000","message":"AES \u003d None","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"f633000f6ef56f315c3393741e902be4d3d8ddf1","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    from Crypto.Cipher import AES"},{"line_number":45,"context_line":"    CRYPTO_AVAILABLE \u003d True"},{"line_number":46,"context_line":"except ImportError:"},{"line_number":47,"context_line":"    pass"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# prefix marker indicating data is HMACed (signed by a secret key)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmF0%3D","line":47,"in_reply_to":"AAAAM3%2F%2FmS0%3D","updated":"2013-01-14 18:28:02.000000000","message":"Good suggestion!","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    pass"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"def check_crypto_availability(f):"},{"line_number":83,"context_line":"    \"\"\" check to make sure Crypto module is available \"\"\""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @functools.wraps(f)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmSc%3D","line":82,"updated":"2013-01-14 17:21:24.000000000","message":"because this raises an exception rather than returning true/false, i think this decorator should be called require_crypto / requires_crypto","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"f633000f6ef56f315c3393741e902be4d3d8ddf1","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    pass"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"def check_crypto_availability(f):"},{"line_number":83,"context_line":"    \"\"\" check to make sure Crypto module is available \"\"\""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @functools.wraps(f)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmFw%3D","line":82,"in_reply_to":"AAAAM3%2F%2FmSc%3D","updated":"2013-01-14 18:28:02.000000000","message":"Agreed.","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    @functools.wraps(f)"},{"line_number":86,"context_line":"    def wrapper(*args, **kwds):"},{"line_number":87,"context_line":"        if CRYPTO_AVAILABLE is False:"},{"line_number":88,"context_line":"            raise CryptoUnavailableError()"},{"line_number":89,"context_line":"        return f(*args, **kwds)"},{"line_number":90,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmSk%3D","line":87,"updated":"2013-01-14 17:21:24.000000000","message":"if AES is None:","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"def verify_signed_data(token, data):"},{"line_number":127,"context_line":"    \"\"\" verify data integrity by ensuring MAC is valid"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    \"\"\""},{"line_number":130,"context_line":"    if data.startswith(MAC_MARKER):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmSE%3D","line":127,"updated":"2013-01-14 17:21:24.000000000","message":"sentence case; use a period; close the docstr on the same line","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"@check_crypto_availability"},{"line_number":147,"context_line":"def encrypt_data(token, secret, data):"},{"line_number":148,"context_line":"    \"\"\" encryptes the data"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    \"\"\""},{"line_number":151,"context_line":"    iv \u003d os.urandom(16)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmR8%3D","line":148,"updated":"2013-01-14 17:21:24.000000000","message":"docstr is useless (entirely redundant with function name)","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"@check_crypto_availability"},{"line_number":161,"context_line":"def decrypt_data(token, secret, data):"},{"line_number":162,"context_line":"    \"\"\" decrypts the data"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    \"\"\""},{"line_number":165,"context_line":"    if data.startswith(ENCRYPT_MARKER):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmR0%3D","line":162,"updated":"2013-01-14 17:21:24.000000000","message":"same as above","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    \"\"\" decrypts the data"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    \"\"\""},{"line_number":165,"context_line":"    if data.startswith(ENCRYPT_MARKER):"},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            # encrypted data"},{"line_number":168,"context_line":"            encoded_data \u003d data[len(ENCRYPT_MARKER):]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmRE%3D","line":165,"updated":"2013-01-14 17:21:24.000000000","message":"i imagine ayoung would be super excited if you used cms ;)","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        except:"},{"line_number":177,"context_line":"            raise DecryptError(\u0027data appeared to be corrupted\u0027)"},{"line_number":178,"context_line":"    else:"},{"line_number":179,"context_line":"        # doesn\u0027t appear to be encrypted data"},{"line_number":180,"context_line":"        return data"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmRo%3D","line":179,"updated":"2013-01-14 17:21:24.000000000","message":"cool","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"}],"tests/test_auth_token_middleware.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":743,"context_line":"            \u0027memcache_crypt_key_derivation_secret\u0027: \u0027mysecret\u0027,"},{"line_number":744,"context_line":"        }"},{"line_number":745,"context_line":"        auth \u003d auth_token.AuthProtocol(FakeApp(), conf)"},{"line_number":746,"context_line":"        encrypted_data \u003d auth._protect_cache_value(\u0027token\u0027, \u0027This is a test\u0027)"},{"line_number":747,"context_line":"        self.assertEqual(\u0027{ENCRYPT:AES256}\u0027, encrypted_data[:16])"},{"line_number":748,"context_line":"        self.assertEqual("},{"line_number":749,"context_line":"            \u0027This is a test\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmQA%3D","line":746,"updated":"2013-01-14 17:21:24.000000000","message":"use uuid\u0027s here and then verify that you can get those arbitrary values back out","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":750,"context_line":"            auth._unprotect_cache_value(\u0027token\u0027, encrypted_data))"},{"line_number":751,"context_line":"        # should return None if unable to decrypt"},{"line_number":752,"context_line":"        self.assertIsNone("},{"line_number":753,"context_line":"            auth._unprotect_cache_value(\u0027token\u0027, \u0027{ENCRYPT:AES256}blahblah\u0027))"},{"line_number":754,"context_line":"        self.assertIsNone("},{"line_number":755,"context_line":"            auth._unprotect_cache_value(\u0027mykey\u0027, encrypted_data))"},{"line_number":756,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmP4%3D","line":753,"updated":"2013-01-14 17:21:24.000000000","message":"above applies to every mention of \u0027blah\u0027 (it\u0027s not clear if those are supposed to be arbitrary values or if they\u0027re supposed to match another \u0027blah\u0027 somewhere else)","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":764,"context_line":"            \u0027memcache_crypt_key_derivation_secret\u0027: \u0027mysecret\u0027,"},{"line_number":765,"context_line":"        }"},{"line_number":766,"context_line":"        auth \u003d auth_token.AuthProtocol(FakeApp(), conf)"},{"line_number":767,"context_line":"        signed_data \u003d auth._protect_cache_value(\u0027mykey\u0027, \u0027This is a test!\u0027)"},{"line_number":768,"context_line":"        self.assertEqual("},{"line_number":769,"context_line":"            signed_data,"},{"line_number":770,"context_line":"            \u0027{MAC:SHA1}gAJ9cQEoVQNtYWNxAlUcU2ZqWHFTc0ZlYWdEWE93TERFaXJ0bHF0d\u0027 +"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmP8%3D","line":767,"updated":"2013-01-14 17:21:24.000000000","message":"same","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":785,"context_line":"            \u0027memcache_crypt_key_derivation_secret\u0027: \u0027mysecret\u0027,"},{"line_number":786,"context_line":"        }"},{"line_number":787,"context_line":"        auth \u003d auth_token.AuthProtocol(FakeApp(), conf)"},{"line_number":788,"context_line":"        data \u003d auth._protect_cache_value(\u0027mykey\u0027, \u0027This is a test!\u0027)"},{"line_number":789,"context_line":"        self.assertEqual(data, \u0027This is a test!\u0027)"},{"line_number":790,"context_line":"        self.assertEqual("},{"line_number":791,"context_line":"            \u0027This is a test!\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmP0%3D","line":788,"updated":"2013-01-14 17:21:24.000000000","message":"same","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":824,"context_line":"        }"},{"line_number":825,"context_line":"        auth \u003d auth_token.AuthProtocol(FakeApp(), conf)"},{"line_number":826,"context_line":"        expected \u003d \u0027tokens/\u0027 + memcache_crypt.hash_data(\u0027mytoken\u0027 + \u0027abc!\u0027)"},{"line_number":827,"context_line":"        self.assertEqual(auth._get_cache_key(\u0027mytoken\u0027), expected)"},{"line_number":828,"context_line":""},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"class TokenEncodingTest(testtools.TestCase):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmQM%3D","line":827,"updated":"2013-01-14 17:21:24.000000000","message":"nice coverage","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"}],"tests/test_memcache_crypt.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5ecf11df90bd570a1c249df7344b10f516846432","unresolved":false,"context_lines":[{"line_number":1,"context_line":"import unittest2 as unittest"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"from keystoneclient.middleware import memcache_crypt"},{"line_number":4,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2Fotk%3D","line":1,"updated":"2013-01-11 19:21:39.000000000","message":"use testtools instead; may need to rebase on master to pick it up","commit_id":"b5009b7b500dab8fc2bf8a7287785e961efbc972"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"57a837f2330a87223e2c46a0f12e79e42e30de06","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        self.assertEqual("},{"line_number":49,"context_line":"            memcache_crypt.decrypt_data(\u0027mykey\u0027, \u0027mysecret\u0027,"},{"line_number":50,"context_line":"                                        \u0027Not Encrypted!!!\u0027),"},{"line_number":51,"context_line":"            \u0027Not Encrypted!!!\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def test_no_pycrypt(self):"},{"line_number":54,"context_line":"        memcache_crypt.CRYPTO_AVAILABLE \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FmPY%3D","line":51,"updated":"2013-01-14 17:21:24.000000000","message":"%s/!!!/!/g lol","commit_id":"dac8ec7feb32e0b3252e5e4f6345fe5c2580c0f7"}]}
