)]}'
{"keystone/middleware/auth_token.py":[{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"92c49726bbdfff2bf83ff7830b26dfb33b446db8","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        # Step 1: We need to auth with the keystone service, so get an"},{"line_number":292,"context_line":"        # admin token"},{"line_number":293,"context_line":"        if not self.admin_token:"},{"line_number":294,"context_line":"            self.admin_token \u003d self._get_admin_auth_token(self.admin_user,"},{"line_number":295,"context_line":"                                                          self.admin_password)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        # Step 2: validate the user\u0027s token with the auth service"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F0oQ%3D","line":294,"updated":"2012-02-29 05:07:09.000000000","message":"does this set admin_token for every request or just this one?","commit_id":"d6c50b9929d9f15deba268ef471020883aaa0920"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"abfed83db97a5152bcb56065aca976908eeb7858","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        # Step 1: We need to auth with the keystone service, so get an"},{"line_number":292,"context_line":"        # admin token"},{"line_number":293,"context_line":"        if not self.admin_token:"},{"line_number":294,"context_line":"            self.admin_token \u003d self._get_admin_auth_token(self.admin_user,"},{"line_number":295,"context_line":"                                                          self.admin_password)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        # Step 2: validate the user\u0027s token with the auth service"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F0nY%3D","line":294,"in_reply_to":"AAAAEn%2F%2F0oQ%3D","updated":"2012-02-29 05:18:11.000000000","message":"It would be for every request, as this object is only instantiated once in the wsgi pipeline.","commit_id":"d6c50b9929d9f15deba268ef471020883aaa0920"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"abfed83db97a5152bcb56065aca976908eeb7858","unresolved":false,"context_lines":[{"line_number":320,"context_line":"            self.admin_token \u003d None"},{"line_number":321,"context_line":"            return self._validate_user_token(user_token, False)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def _expound_claims(self, data):"},{"line_number":324,"context_line":"        token_info \u003d json.loads(data)"},{"line_number":325,"context_line":"        access_user \u003d token_info[\u0027access\u0027][\u0027user\u0027]"},{"line_number":326,"context_line":"        access_token \u003d token_info[\u0027access\u0027][\u0027token\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F0nc%3D","line":323,"updated":"2012-02-29 05:18:11.000000000","message":"I know I\u0027m not the only one who doesn\u0027t know what \u0027expound\u0027 means. I don\u0027t think dictionaries should be necessary to understand python. Can you take pity on me and rename this function?","commit_id":"d6c50b9929d9f15deba268ef471020883aaa0920"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"d27bb73484a73c38fb2fa8fc0468b54589ccdd57","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                    # Respond to client as appropriate for this auth protocol"},{"line_number":177,"context_line":"                    return self._reject_token(env, start_response)"},{"line_number":178,"context_line":"            else:"},{"line_number":179,"context_line":"                self._decorate_request(\u0027X_IDENTITY_STATUS\u0027,"},{"line_number":180,"context_line":"                                       \u0027Confirmed\u0027,"},{"line_number":181,"context_line":"                                       env,"},{"line_number":182,"context_line":"                                       proxy_headers)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEn%2F%2F0mo%3D","line":179,"updated":"2012-02-29 05:55:07.000000000","message":"can this just drop in under line 187, since it\u0027s all \"we know we have user_data\" and we\u0027re just decorating the request?\n\nGet rid of the extraneous else?","commit_id":"65d93e30dda1e4a88f6888d44cf15e20adad2330"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"e1d04a44c62be5a0104cbbafc38432ddf807ec10","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                    # Respond to client as appropriate for this auth protocol"},{"line_number":177,"context_line":"                    return self._reject_token(env, start_response)"},{"line_number":178,"context_line":"            else:"},{"line_number":179,"context_line":"                self._decorate_request(\u0027X_IDENTITY_STATUS\u0027,"},{"line_number":180,"context_line":"                                       \u0027Confirmed\u0027,"},{"line_number":181,"context_line":"                                       env,"},{"line_number":182,"context_line":"                                       proxy_headers)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEn%2F%2F0lc%3D","line":179,"in_reply_to":"AAAAEn%2F%2F0mo%3D","updated":"2012-02-29 06:02:56.000000000","message":"I want to rework this entire section - the ifs are too damn tall/deep\n\nIt is unreadable","commit_id":"65d93e30dda1e4a88f6888d44cf15e20adad2330"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"d27bb73484a73c38fb2fa8fc0468b54589ccdd57","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        conn.close()"},{"line_number":281,"context_line":"        try:"},{"line_number":282,"context_line":"            self.admin_token \u003d json.loads(data)[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":283,"context_line":"        except KeyError:"},{"line_number":284,"context_line":"            return"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def _validate_user_token(self, user_token, retry\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEn%2F%2F0mc%3D","line":283,"updated":"2012-02-29 05:55:07.000000000","message":"should also catch ValueError here - invalid json coming back will raise ValueError.\n\nWould love to send a debugging log message through the owning service at this point as well, but I don\u0027t see logging anywhere in here. Is that evil to add?","commit_id":"65d93e30dda1e4a88f6888d44cf15e20adad2330"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"e1d04a44c62be5a0104cbbafc38432ddf807ec10","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        conn.close()"},{"line_number":281,"context_line":"        try:"},{"line_number":282,"context_line":"            self.admin_token \u003d json.loads(data)[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":283,"context_line":"        except KeyError:"},{"line_number":284,"context_line":"            return"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def _validate_user_token(self, user_token, retry\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEn%2F%2F0lo%3D","line":283,"in_reply_to":"AAAAEn%2F%2F0mc%3D","updated":"2012-02-29 06:02:56.000000000","message":"I think there are lots of ways this method can fail and isn\u0027t caught (the http request above ...)  \n\nThis isn\u0027t a regression since it was like this in the original code, but I\u0027ll add a comment to the top of the function to fix this!","commit_id":"65d93e30dda1e4a88f6888d44cf15e20adad2330"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"d27bb73484a73c38fb2fa8fc0468b54589ccdd57","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        self._ensure_admin_token()"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        if not self.admin_token:"},{"line_number":294,"context_line":"            return  # FIXME(ja): bug 942984: we should log here and return 503"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        # Step 2: validate the user\u0027s token with the auth service"},{"line_number":297,"context_line":"        # since this is a priviledged operation, we need to provide"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEn%2F%2F0mY%3D","line":294,"updated":"2012-02-29 05:55:07.000000000","message":"would ideally love a warning log message to the owning service that an admin_token couldn\u0027t be identified - not for the user, just the sysadmin running the service. Again - no logging in this module so far...","commit_id":"65d93e30dda1e4a88f6888d44cf15e20adad2330"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"e1d04a44c62be5a0104cbbafc38432ddf807ec10","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        self._ensure_admin_token()"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        if not self.admin_token:"},{"line_number":294,"context_line":"            return  # FIXME(ja): bug 942984: we should log here and return 503"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        # Step 2: validate the user\u0027s token with the auth service"},{"line_number":297,"context_line":"        # since this is a priviledged operation, we need to provide"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEn%2F%2F0lg%3D","line":294,"in_reply_to":"AAAAEn%2F%2F0mY%3D","updated":"2012-02-29 06:02:56.000000000","message":"I think it should be log critical (or error or whatever).  I need termie/bcwaldon\u0027s advice on doing it the right way","commit_id":"65d93e30dda1e4a88f6888d44cf15e20adad2330"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"d27bb73484a73c38fb2fa8fc0468b54589ccdd57","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        # retry if applicable"},{"line_number":321,"context_line":"        if retry:"},{"line_number":322,"context_line":"            self.admin_token \u003d None"},{"line_number":323,"context_line":"            return self._validate_user_token(user_token, False)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def _extract_user_data(self, data):"},{"line_number":326,"context_line":"        token_info \u003d json.loads(data)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEn%2F%2F0mI%3D","line":323,"updated":"2012-02-29 05:55:07.000000000","message":"retry\u003dFalse for last parameter (since it\u0027s named in the method)?","commit_id":"65d93e30dda1e4a88f6888d44cf15e20adad2330"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"d27bb73484a73c38fb2fa8fc0468b54589ccdd57","unresolved":false,"context_lines":[{"line_number":322,"context_line":"            self.admin_token \u003d None"},{"line_number":323,"context_line":"            return self._validate_user_token(user_token, False)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def _extract_user_data(self, data):"},{"line_number":326,"context_line":"        token_info \u003d json.loads(data)"},{"line_number":327,"context_line":"        access_user \u003d token_info[\u0027access\u0027][\u0027user\u0027]"},{"line_number":328,"context_line":"        access_token \u003d token_info[\u0027access\u0027][\u0027token\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEn%2F%2F0mA%3D","line":325,"updated":"2012-02-29 05:55:07.000000000","message":"doctoring would be good to identify exactly what\u0027s expected of this method, especially that we\u0027re expecting \"data\" to be valid JSON","commit_id":"65d93e30dda1e4a88f6888d44cf15e20adad2330"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b3b085c139c35afbc14354c3d9fbb67c1bd93eea","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        # Prep headers to forward request to wsgi app or remote downstream"},{"line_number":143,"context_line":"        proxy_headers \u003d env.copy()"},{"line_number":144,"context_line":"        for header in proxy_headers.iterkeys():"},{"line_number":145,"context_line":"            # FIXME(ja): this seems bad"},{"line_number":146,"context_line":"            if header.startswith(\u0027HTTP_\u0027):"},{"line_number":147,"context_line":"                proxy_headers[header[5:]] \u003d proxy_headers[header]"},{"line_number":148,"context_line":"                del proxy_headers[header]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAEn%2F%2F0kA%3D","line":145,"updated":"2012-02-29 07:41:41.000000000","message":"I think this is sanitizing the request from potentially falsified headers?","commit_id":"7b5bec9a026d6b4dc1099a42d5ad9f181515765f"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b3b085c139c35afbc14354c3d9fbb67c1bd93eea","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        for header in proxy_headers.iterkeys():"},{"line_number":145,"context_line":"            # FIXME(ja): this seems bad"},{"line_number":146,"context_line":"            if header.startswith(\u0027HTTP_\u0027):"},{"line_number":147,"context_line":"                proxy_headers[header[5:]] \u003d proxy_headers[header]"},{"line_number":148,"context_line":"                del proxy_headers[header]"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        # Grab the token from the request"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAEn%2F%2F0j8%3D","line":147,"updated":"2012-02-29 07:41:41.000000000","message":".pop(header)","commit_id":"7b5bec9a026d6b4dc1099a42d5ad9f181515765f"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b3b085c139c35afbc14354c3d9fbb67c1bd93eea","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            return self._reject_request(env, start_response)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        # NOTE(ja): Decorate the request with user information"},{"line_number":175,"context_line":"        # X_AUTHORIZATION: unsure?"},{"line_number":176,"context_line":"        # X_TENANT: For legacy compatibility before we had ID and Name"},{"line_number":177,"context_line":"        # X_TENANT_NAME: why do we fall back to the tenant_id?"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAEn%2F%2F0jw%3D","line":175,"updated":"2012-02-29 07:41:41.000000000","message":"I don\u0027t know what this is either...","commit_id":"7b5bec9a026d6b4dc1099a42d5ad9f181515765f"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b3b085c139c35afbc14354c3d9fbb67c1bd93eea","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        # NOTE(ja): Decorate the request with user information"},{"line_number":175,"context_line":"        # X_AUTHORIZATION: unsure?"},{"line_number":176,"context_line":"        # X_TENANT: For legacy compatibility before we had ID and Name"},{"line_number":177,"context_line":"        # X_TENANT_NAME: why do we fall back to the tenant_id?"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        # Services can count on: X_TENANT_NAME, X_TENANT_ID, X_USER,"},{"line_number":180,"context_line":"        # X_USER_ID, X_ROLE"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAEn%2F%2F0jo%3D","line":177,"updated":"2012-02-29 07:41:41.000000000","message":"I think that was a bug at some point in keystone heavy; don\u0027t remember the outcome","commit_id":"7b5bec9a026d6b4dc1099a42d5ad9f181515765f"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"538a1b84120d5c0503d1c7a823fa4d8f8a15b094","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        # NOTE(ja): Decorate the request with user information"},{"line_number":175,"context_line":"        # X_AUTHORIZATION: unsure?"},{"line_number":176,"context_line":"        # X_TENANT: For legacy compatibility before we had ID and Name"},{"line_number":177,"context_line":"        # X_TENANT_NAME: why do we fall back to the tenant_id?"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        # Services can count on: X_TENANT_NAME, X_TENANT_ID, X_USER,"},{"line_number":180,"context_line":"        # X_USER_ID, X_ROLE"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAEn%2F%2F0jY%3D","line":177,"in_reply_to":"AAAAEn%2F%2F0jo%3D","updated":"2012-02-29 07:49:09.000000000","message":"I\u0027m thinking we shouldn\u0027t fallback then...","commit_id":"7b5bec9a026d6b4dc1099a42d5ad9f181515765f"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b3b085c139c35afbc14354c3d9fbb67c1bd93eea","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        resp \u003d webob.exc.HTTPUnauthorized()"},{"line_number":211,"context_line":"        return resp(env, start_response)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def _ensure_admin_token(self):"},{"line_number":214,"context_line":"        \"\"\""},{"line_number":215,"context_line":"        This function gets an admin auth token to be used by this service to"},{"line_number":216,"context_line":"        validate a user\u0027s token. Validate_token is a priviledged call so"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAEn%2F%2F0jk%3D","line":213,"updated":"2012-02-29 07:41:41.000000000","message":"Could this be..?\n\n    @property\n    def admin_token(self):","commit_id":"7b5bec9a026d6b4dc1099a42d5ad9f181515765f"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"538a1b84120d5c0503d1c7a823fa4d8f8a15b094","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        resp \u003d webob.exc.HTTPUnauthorized()"},{"line_number":211,"context_line":"        return resp(env, start_response)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def _ensure_admin_token(self):"},{"line_number":214,"context_line":"        \"\"\""},{"line_number":215,"context_line":"        This function gets an admin auth token to be used by this service to"},{"line_number":216,"context_line":"        validate a user\u0027s token. Validate_token is a priviledged call so"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAEn%2F%2F0jU%3D","line":213,"in_reply_to":"AAAAEn%2F%2F0jk%3D","updated":"2012-02-29 07:49:09.000000000","message":"it could.","commit_id":"7b5bec9a026d6b4dc1099a42d5ad9f181515765f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2766bab19669b75da8275e3fddfded7d1ec65451","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # Credentials used to verify this component with the Auth service since"},{"line_number":126,"context_line":"        # validating tokens is a privileged call"},{"line_number":127,"context_line":"        self._admin_token \u003d conf.get(\u0027admin_token\u0027)"},{"line_number":128,"context_line":"        self.admin_user \u003d conf.get(\u0027admin_user\u0027)"},{"line_number":129,"context_line":"        self.admin_password \u003d conf.get(\u0027admin_password\u0027)"},{"line_number":130,"context_line":"        self.admin_tenant_name \u003d conf.get(\u0027admin_tenant_name\u0027, \u0027admin\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0ZE%3D","line":127,"updated":"2012-02-29 18:17:33.000000000","message":"I think it would be good to just leave admin_token entirely out of the configuration. The middleware fetches a the service token on first pass through authentication and I think it\u0027s just complicating things to put it in the config file....","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2766bab19669b75da8275e3fddfded7d1ec65451","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self._admin_token \u003d conf.get(\u0027admin_token\u0027)"},{"line_number":128,"context_line":"        self.admin_user \u003d conf.get(\u0027admin_user\u0027)"},{"line_number":129,"context_line":"        self.admin_password \u003d conf.get(\u0027admin_password\u0027)"},{"line_number":130,"context_line":"        self.admin_tenant_name \u003d conf.get(\u0027admin_tenant_name\u0027, \u0027admin\u0027)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def __init__(self, app, conf):"},{"line_number":133,"context_line":"        \"\"\" Common initialization code \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0Ys%3D","line":130,"updated":"2012-02-29 18:17:33.000000000","message":"Instead of admin_xxx, can we use service_xxx, since this is middleware in the service pipelines and the user/password combos are for the service tenant users, and not necessarily admins, which I think of more as human beings :)\n\nThoughts?","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"bb81ba38b45e214fdce014daf0b8f8772ec5d2fe","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self._admin_token \u003d conf.get(\u0027admin_token\u0027)"},{"line_number":128,"context_line":"        self.admin_user \u003d conf.get(\u0027admin_user\u0027)"},{"line_number":129,"context_line":"        self.admin_password \u003d conf.get(\u0027admin_password\u0027)"},{"line_number":130,"context_line":"        self.admin_tenant_name \u003d conf.get(\u0027admin_tenant_name\u0027, \u0027admin\u0027)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def __init__(self, app, conf):"},{"line_number":133,"context_line":"        \"\"\" Common initialization code \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0O4%3D","line":130,"in_reply_to":"AAAAEn%2F%2F0VA%3D","updated":"2012-02-29 20:17:48.000000000","message":"Dean - actually service_ was used to describe a downstream openstack service if you ran auth_token in http proxy mode...  which we aren\u0027t going to support","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9d34d030d8441cf9f8bdf7a74b4917ddc560ce18","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self._admin_token \u003d conf.get(\u0027admin_token\u0027)"},{"line_number":128,"context_line":"        self.admin_user \u003d conf.get(\u0027admin_user\u0027)"},{"line_number":129,"context_line":"        self.admin_password \u003d conf.get(\u0027admin_password\u0027)"},{"line_number":130,"context_line":"        self.admin_tenant_name \u003d conf.get(\u0027admin_tenant_name\u0027, \u0027admin\u0027)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def __init__(self, app, conf):"},{"line_number":133,"context_line":"        \"\"\" Common initialization code \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0Ts%3D","line":130,"in_reply_to":"AAAAEn%2F%2F0VA%3D","updated":"2012-02-29 19:05:55.000000000","message":"I think having everything be consistent is, of course, the best prescription. I guess I\u0027m trying to push for having admin_XXX refer to things that are admin-related, and I view admin-related actions as being performed by a human and service-related (privileged API calls/escalated calls) as being performed by a service (as in this case...)\n\nThat said, it\u0027s not something I\u0027d hold up this patch for... if we wanted to keep it as admin_XXX I suppose I can live with that :)","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"a225a354179da21b0cf03f56b9eeea54dc043da7","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        self._admin_token \u003d conf.get(\u0027admin_token\u0027)"},{"line_number":128,"context_line":"        self.admin_user \u003d conf.get(\u0027admin_user\u0027)"},{"line_number":129,"context_line":"        self.admin_password \u003d conf.get(\u0027admin_password\u0027)"},{"line_number":130,"context_line":"        self.admin_tenant_name \u003d conf.get(\u0027admin_tenant_name\u0027, \u0027admin\u0027)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def __init__(self, app, conf):"},{"line_number":133,"context_line":"        \"\"\" Common initialization code \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0VA%3D","line":130,"in_reply_to":"AAAAEn%2F%2F0Ys%3D","updated":"2012-02-29 18:51:00.000000000","message":"Jay, we use of service_ and auth_ to describe the api endpoints in the config file.  Would using servce in two different ways here confusing?","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2766bab19669b75da8275e3fddfded7d1ec65451","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        # we can\u0027t validate without an admin token"},{"line_number":154,"context_line":"        # FIXME(ja): we should make self.admin_token throw"},{"line_number":155,"context_line":"        # an exception - then we don\u0027t need to check here?"},{"line_number":156,"context_line":"        if not self.admin_token:"},{"line_number":157,"context_line":"            # FIXME(ja): log that we can\u0027t get an auth token?"},{"line_number":158,"context_line":"            resp \u003d webob.exc.HTTPServiceUnavailable()"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0YU%3D","line":155,"updated":"2012-02-29 18:17:33.000000000","message":"No, I think properties should not throw exceptions. I think it\u0027s better to make a note here that the property checks for local existence and if not present, the service user and password are used to get a token that can be used to validate the user\u0027s token. If such service user validation does not succeed, service_token (admin_token here..) will be None.","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"bb81ba38b45e214fdce014daf0b8f8772ec5d2fe","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        # we can\u0027t validate without an admin token"},{"line_number":154,"context_line":"        # FIXME(ja): we should make self.admin_token throw"},{"line_number":155,"context_line":"        # an exception - then we don\u0027t need to check here?"},{"line_number":156,"context_line":"        if not self.admin_token:"},{"line_number":157,"context_line":"            # FIXME(ja): log that we can\u0027t get an auth token?"},{"line_number":158,"context_line":"            resp \u003d webob.exc.HTTPServiceUnavailable()"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0O0%3D","line":155,"in_reply_to":"AAAAEn%2F%2F0YU%3D","updated":"2012-02-29 20:17:48.000000000","message":"k - I\u0027m not a python expert.  I\u0027ll defer to you guys","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2766bab19669b75da8275e3fddfded7d1ec65451","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        conn.close()"},{"line_number":263,"context_line":"        try:"},{"line_number":264,"context_line":"            self._admin_token \u003d json.loads(data)[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":265,"context_line":"        except KeyError:"},{"line_number":266,"context_line":"            return"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        # FIXME(ja): bug 942984: returning causes the codepath to return"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0YE%3D","line":265,"updated":"2012-02-29 18:17:33.000000000","message":"Should log an error here so that there is some level of indication of what was returned from the Identity service endpoint.","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"bb81ba38b45e214fdce014daf0b8f8772ec5d2fe","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        conn.close()"},{"line_number":263,"context_line":"        try:"},{"line_number":264,"context_line":"            self._admin_token \u003d json.loads(data)[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":265,"context_line":"        except KeyError:"},{"line_number":266,"context_line":"            return"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"        # FIXME(ja): bug 942984: returning causes the codepath to return"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0Os%3D","line":265,"in_reply_to":"AAAAEn%2F%2F0YE%3D","updated":"2012-02-29 20:17:48.000000000","message":"agree!  I\u0027m unsure how to add logging in a sane way - I\u0027m going to get bcwaldon or others to help with this","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2766bab19669b75da8275e3fddfded7d1ec65451","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        # FIXME(ja): bug 942984: returning causes the codepath to return"},{"line_number":269,"context_line":"        # unauthorized.  We have a worse situation here - we are unable to"},{"line_number":270,"context_line":"        # retrieve an admin token!  We should error log the fact and the"},{"line_number":271,"context_line":"        # user needs sent 503 (service unavailable) - not 401 unauthorized"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        return self._admin_token"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0X8%3D","line":271,"updated":"2012-02-29 18:17:33.000000000","message":"This comment is now addressed and can be removed...","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"bb81ba38b45e214fdce014daf0b8f8772ec5d2fe","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        # FIXME(ja): bug 942984: returning causes the codepath to return"},{"line_number":269,"context_line":"        # unauthorized.  We have a worse situation here - we are unable to"},{"line_number":270,"context_line":"        # retrieve an admin token!  We should error log the fact and the"},{"line_number":271,"context_line":"        # user needs sent 503 (service unavailable) - not 401 unauthorized"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        return self._admin_token"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0Ok%3D","line":271,"in_reply_to":"AAAAEn%2F%2F0X8%3D","updated":"2012-02-29 20:17:48.000000000","message":"actually the bug still exists - the admin_token could timeout and we would require a new one.  When we go to get a new one the service could be down or our password could be wrong","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2766bab19669b75da8275e3fddfded7d1ec65451","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        if retry:"},{"line_number":309,"context_line":"            # FIXME(ja): we should only get a new admin_token if the service"},{"line_number":310,"context_line":"            #            tells us that our token is expired."},{"line_number":311,"context_line":"            self._admin_token \u003d None"},{"line_number":312,"context_line":"            return self._validate_user_token(user_token, False)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _extract_user_data(self, data):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0Xw%3D","line":311,"updated":"2012-02-29 18:17:33.000000000","message":"Two things:\n\n1) \n\nYou need to reattempt to acquire a new service token here above. Just calling _validate_user_token() below, without first attempting to get a new service token will fail since you will be inserting None into the X-Auth-Token header used for user token validation above...\n\n2) \n\nThere should be a log statement here to indicate that the initial user token validation return XXX and we are retrying the service token validation, assuming service token expiration, and will retry the user token validation if the service token revalidation succeeds.","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"cf142c71962cc33383b6f47638ed2d79dcc274eb","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        if retry:"},{"line_number":309,"context_line":"            # FIXME(ja): we should only get a new admin_token if the service"},{"line_number":310,"context_line":"            #            tells us that our token is expired."},{"line_number":311,"context_line":"            self._admin_token \u003d None"},{"line_number":312,"context_line":"            return self._validate_user_token(user_token, False)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _extract_user_data(self, data):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0N0%3D","line":311,"in_reply_to":"AAAAEn%2F%2F0Xw%3D","updated":"2012-02-29 20:24:35.000000000","message":"1)\n\nI don\u0027t like how this works (yet).  It kinda is doing the right thing, but because it requires this comment it isn\u0027t fixed yet.  \n\nIn _validate_user_token, headers[\u0027X-Auth-Token\u0027] is set to self.admin_token, which is a property.  That causes the function admin_token (above) to run which tries to get and return a new token.\n\nI agree the bug is still here.  I think the conditions for retry/... are wrong.\n\n2)\n\nagree.  Need someone\u0027s help or pointers for how to do logging in a wsgi middleware","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2766bab19669b75da8275e3fddfded7d1ec65451","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _extract_user_data(self, data):"},{"line_number":315,"context_line":"        token_info \u003d json.loads(data)"},{"line_number":316,"context_line":"        user \u003d token_info[\u0027access\u0027][\u0027user\u0027]"},{"line_number":317,"context_line":"        token \u003d token_info[\u0027access\u0027][\u0027token\u0027]"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        info \u003d {"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAEn%2F%2F0XQ%3D","line":316,"updated":"2012-02-29 18:17:33.000000000","message":"Might be nice to wrap this block in a defensive try: except KeyError: block with a log error indicating that something was not quite right :)","commit_id":"e4b1f5323b080f2771e63a3746581b31a9f9b478"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1b6aa436363ca689559f8799a1110d9869540ecb","unresolved":false,"context_lines":[{"line_number":402,"context_line":""},{"line_number":403,"context_line":"            conn \u003d http_connect(self.service_host,"},{"line_number":404,"context_line":"                                self.service_port,"},{"line_number":405,"context_line":"                                req.method,"},{"line_number":406,"context_line":"                                parsed.path,"},{"line_number":407,"context_line":"                                proxy_headers,"},{"line_number":408,"context_line":"                                ssl\u003d(self.service_protocol \u003d\u003d \u0027https\u0027))"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEn%2F%2F0Mw%3D","side":"PARENT","line":405,"updated":"2012-02-29 20:40:48.000000000","message":"+1 for gigantic blocks of red","commit_id":"0d677ba2992c4a142622aed8b0f65c63bdbf24ac"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1b6aa436363ca689559f8799a1110d9869540ecb","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            return self._reject_request(env, start_response)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        # NOTE(ja): Decorate the request with user information"},{"line_number":140,"context_line":"        # X_AUTHORIZATION: unsure?"},{"line_number":141,"context_line":"        # X_TENANT: For legacy compatibility before we had ID and Name"},{"line_number":142,"context_line":"        # X_TENANT_NAME: why do we fall back to the tenant_id?"},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEn%2F%2F0NE%3D","line":140,"updated":"2012-02-29 20:40:48.000000000","message":"http://wiki.openstack.org/openstack-authn#xauth-header","commit_id":"9096d042a34796821f0d716d4c8088f9bfba04f5"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"f9f71f78529041d749ac104db1e4ced8cf15d8f5","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        # if token is unauthorized return"},{"line_number":259,"context_line":"        # FIXME(ja): I\u0027m assuming the 404 status means that user_token is"},{"line_number":260,"context_line":"        #            invalid - not that the admin_token is invalid"},{"line_number":261,"context_line":"        if resp.status \u003d\u003d 404:"},{"line_number":262,"context_line":"            return False"},{"line_number":263,"context_line":"        # retry if applicable"},{"line_number":264,"context_line":"        if retry:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEn%2F%2F0Ns%3D","line":261,"updated":"2012-02-29 20:25:52.000000000","message":"I think these conditions for when the user_token is invalid vs when the admin_token is invalid, vs when the service is just failing is still wrong ...","commit_id":"9096d042a34796821f0d716d4c8088f9bfba04f5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1b6aa436363ca689559f8799a1110d9869540ecb","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        user \u003d token_info[\u0027access\u0027][\u0027user\u0027]"},{"line_number":273,"context_line":"        token \u003d token_info[\u0027access\u0027][\u0027token\u0027]"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        info \u003d {"},{"line_number":276,"context_line":"            \u0027user\u0027: user[\u0027id\u0027],"},{"line_number":277,"context_line":"            \u0027userName\u0027: user[\u0027username\u0027],"},{"line_number":278,"context_line":"            \u0027tenant\u0027: None,"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEn%2F%2F0NI%3D","line":275,"updated":"2012-02-29 20:40:48.000000000","message":"This info dict is probably the ugliest part of auth_token now (besides not using keystoneclient, yet). Suggestions:\n\n    tenant -\u003e tenantId\n    roles -\u003e roleNames","commit_id":"9096d042a34796821f0d716d4c8088f9bfba04f5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1b6aa436363ca689559f8799a1110d9869540ecb","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        # FIXME(ja): comment on why we are checking both places! (is"},{"line_number":285,"context_line":"        # one an older way of doing it?)"},{"line_number":286,"context_line":"        try:"},{"line_number":287,"context_line":"            info[\u0027tenant\u0027] \u003d token[\u0027tenant\u0027][\u0027id\u0027]"},{"line_number":288,"context_line":"            info[\u0027tenantName\u0027] \u003d token[\u0027tenant\u0027][\u0027name\u0027]"},{"line_number":289,"context_line":"        except:"},{"line_number":290,"context_line":"            info[\u0027tenant\u0027] \u003d user.get(\u0027tenantId\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEn%2F%2F0NQ%3D","line":287,"updated":"2012-02-29 20:40:48.000000000","message":"this is diablo\u0027s spec \u0026 stable/diablo\u0027s implementation","commit_id":"9096d042a34796821f0d716d4c8088f9bfba04f5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1b6aa436363ca689559f8799a1110d9869540ecb","unresolved":false,"context_lines":[{"line_number":287,"context_line":"            info[\u0027tenant\u0027] \u003d token[\u0027tenant\u0027][\u0027id\u0027]"},{"line_number":288,"context_line":"            info[\u0027tenantName\u0027] \u003d token[\u0027tenant\u0027][\u0027name\u0027]"},{"line_number":289,"context_line":"        except:"},{"line_number":290,"context_line":"            info[\u0027tenant\u0027] \u003d user.get(\u0027tenantId\u0027)"},{"line_number":291,"context_line":"            info[\u0027tenantName\u0027] \u003d user.get(\u0027tenantName\u0027)"},{"line_number":292,"context_line":"        # FIXME(ja): if no tenant, legacy auth_token set tenant to None and"},{"line_number":293,"context_line":"        #            had no tenantName. I\u0027m replicating the same for now"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEn%2F%2F0NU%3D","line":290,"updated":"2012-02-29 20:40:48.000000000","message":"this is diablo\u0027s implementation","commit_id":"9096d042a34796821f0d716d4c8088f9bfba04f5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"1b6aa436363ca689559f8799a1110d9869540ecb","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        return info"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def _decorate_request(self, values, env):"},{"line_number":299,"context_line":"        \"\"\"Add headers to request\"\"\""},{"line_number":300,"context_line":"        for (k, v) in values.iteritems():"},{"line_number":301,"context_line":"            env[\u0027HTTP_%s\u0027 % k] \u003d v"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAEn%2F%2F0M4%3D","line":299,"updated":"2012-02-29 20:40:48.000000000","message":"docstring should be revised","commit_id":"9096d042a34796821f0d716d4c8088f9bfba04f5"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"44d1f3acd9624797456feedf8bd99afeda6f6a8a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    client token being passed in (legacy Rackspace use) to support cloud files"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"What we add to the request for use by the OpenStack service"},{"line_number":47,"context_line":"-----------------------------------------------------------"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"HTTP_X_IDENTITY_STATUS"},{"line_number":50,"context_line":"    Confirmed or Invalid"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzqo%3D","line":47,"updated":"2012-03-01 21:13:18.000000000","message":"Sometime around e2 or e3, Keystone standardized \u0026 documented the following variables:\n\n    X-Identity-Status\n    X-Authorization\n    X-Tenant-Id\n    X-Tenant-Name\n    X-User-Id\n    X-User-Name\n    X-Roles\n\nBut continued to support the following for compatibility:\n\n    X-User (duplicates X-User-Name)\n    X-Tenant (duplicates X-Tenant-Id)\n    X-Role (duplicates X-Roles)\n\nOne of the other auth projects at Rackspace followed that standardized list... I\u0027d recommend doing the same here.","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":47,"context_line":"-----------------------------------------------------------"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"HTTP_X_IDENTITY_STATUS"},{"line_number":50,"context_line":"    Confirmed or Invalid"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"HTTP_X_TENANT_NAME"},{"line_number":53,"context_line":"    name of tenant if tenant is present"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzq4%3D","line":50,"updated":"2012-03-01 21:11:29.000000000","message":"do these get turned into dd/dt in rst? I forget, if not we may want to use whatever format would do that","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"736c6653cde33cc15909733300bfab67053a70b2","unresolved":false,"context_lines":[{"line_number":47,"context_line":"-----------------------------------------------------------"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"HTTP_X_IDENTITY_STATUS"},{"line_number":50,"context_line":"    Confirmed or Invalid"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"HTTP_X_TENANT_NAME"},{"line_number":53,"context_line":"    name of tenant if tenant is present"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzps%3D","line":50,"in_reply_to":"AAAAEn%2F%2Fzq4%3D","updated":"2012-03-01 21:17:10.000000000","message":"Looks like the correct format http://docutils.sourceforge.net/docs/user/rst/quickref.html#definition-lists","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"44d1f3acd9624797456feedf8bd99afeda6f6a8a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"HTTP_X_TENANT_ID"},{"line_number":56,"context_line":"    id of tenant if tenant is present"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"HTTP_X_USER"},{"line_number":59,"context_line":"    name of user"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"HTTP_X_USER_ID"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzqk%3D","line":58,"updated":"2012-03-01 21:13:18.000000000","message":"X_USER_NAME","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f6dd0966edefb3157b05dc5417c9f984e77db5f8","unresolved":false,"context_lines":[{"line_number":55,"context_line":"HTTP_X_TENANT_ID"},{"line_number":56,"context_line":"    id of tenant if tenant is present"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"HTTP_X_USER"},{"line_number":59,"context_line":"    name of user"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"HTTP_X_USER_ID"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzog%3D","line":58,"in_reply_to":"AAAAEn%2F%2FzpU%3D","updated":"2012-03-01 21:27:15.000000000","message":"Yes, but deprecated support for X-Role is missing there.","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"023e9cfbc16f575dfaa650ec15c1e961ab2e1439","unresolved":false,"context_lines":[{"line_number":55,"context_line":"HTTP_X_TENANT_ID"},{"line_number":56,"context_line":"    id of tenant if tenant is present"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"HTTP_X_USER"},{"line_number":59,"context_line":"    name of user"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"HTTP_X_USER_ID"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzpU%3D","line":58,"in_reply_to":"AAAAEn%2F%2Fzqk%3D","updated":"2012-03-01 21:21:24.000000000","message":"is http://keystone.openstack.org/middleware_architecture.html#indeterminate-identity-headers correct?","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"44d1f3acd9624797456feedf8bd99afeda6f6a8a","unresolved":false,"context_lines":[{"line_number":61,"context_line":"HTTP_X_USER_ID"},{"line_number":62,"context_line":"    id of user"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"HTTP_X_ROLE"},{"line_number":65,"context_line":"    list of roles"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzrM%3D","line":64,"updated":"2012-03-01 21:13:18.000000000","message":"X_ROLE*S*","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        self.admin_tenant_name \u003d conf.get(\u0027admin_tenant_name\u0027, \u0027admin\u0027)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __call__(self, env, start_response):"},{"line_number":123,"context_line":"        \"\"\"Handle incoming request"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        Authenticate send downstream on success."},{"line_number":126,"context_line":"        Reject request if we can\u0027t authenticate."}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzrc%3D","line":123,"updated":"2012-03-01 21:11:29.000000000","message":".","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        except InvalidUserToken:"},{"line_number":138,"context_line":"            if self.delay_auth_decision:"},{"line_number":139,"context_line":"                logger.info(\"Invalid user token - deferring reject downstream\")"},{"line_number":140,"context_line":"                self._add_headers({\u0027X_IDENTITY_STATUS\u0027: \u0027Invalid\u0027}, env)"},{"line_number":141,"context_line":"                return self.app(env, start_response)"},{"line_number":142,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzqw%3D","line":139,"updated":"2012-03-01 21:11:29.000000000","message":"single quotes here and everywhere pls","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        except InvalidUserToken:"},{"line_number":138,"context_line":"            if self.delay_auth_decision:"},{"line_number":139,"context_line":"                logger.info(\"Invalid user token - deferring reject downstream\")"},{"line_number":140,"context_line":"                self._add_headers({\u0027X_IDENTITY_STATUS\u0027: \u0027Invalid\u0027}, env)"},{"line_number":141,"context_line":"                return self.app(env, start_response)"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                logger.info(\"Invalid user token - rejecting request\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzqs%3D","line":140,"updated":"2012-03-01 21:11:29.000000000","message":"headers usually look like X-Identity-Status, why is this one different?","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"f6dd0966edefb3157b05dc5417c9f984e77db5f8","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        except InvalidUserToken:"},{"line_number":138,"context_line":"            if self.delay_auth_decision:"},{"line_number":139,"context_line":"                logger.info(\"Invalid user token - deferring reject downstream\")"},{"line_number":140,"context_line":"                self._add_headers({\u0027X_IDENTITY_STATUS\u0027: \u0027Invalid\u0027}, env)"},{"line_number":141,"context_line":"                return self.app(env, start_response)"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                logger.info(\"Invalid user token - rejecting request\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzoY%3D","line":140,"in_reply_to":"AAAAEn%2F%2FzpE%3D","updated":"2012-03-01 21:27:15.000000000","message":"I don\u0027t have a style preference, but termie\u0027s suggestion avoids bugs.","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"023e9cfbc16f575dfaa650ec15c1e961ab2e1439","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        except InvalidUserToken:"},{"line_number":138,"context_line":"            if self.delay_auth_decision:"},{"line_number":139,"context_line":"                logger.info(\"Invalid user token - deferring reject downstream\")"},{"line_number":140,"context_line":"                self._add_headers({\u0027X_IDENTITY_STATUS\u0027: \u0027Invalid\u0027}, env)"},{"line_number":141,"context_line":"                return self.app(env, start_response)"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                logger.info(\"Invalid user token - rejecting request\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzpE%3D","line":140,"in_reply_to":"AAAAEn%2F%2Fzpk%3D","updated":"2012-03-01 21:21:24.000000000","message":"if termie\u0027s suggestion to make _add_header replace(\u0027-\u0027,\u0027_\u0027).upper() then we can do it either way...\n\nX-Identity-Status preferred?","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"736c6653cde33cc15909733300bfab67053a70b2","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        except InvalidUserToken:"},{"line_number":138,"context_line":"            if self.delay_auth_decision:"},{"line_number":139,"context_line":"                logger.info(\"Invalid user token - deferring reject downstream\")"},{"line_number":140,"context_line":"                self._add_headers({\u0027X_IDENTITY_STATUS\u0027: \u0027Invalid\u0027}, env)"},{"line_number":141,"context_line":"                return self.app(env, start_response)"},{"line_number":142,"context_line":"            else:"},{"line_number":143,"context_line":"                logger.info(\"Invalid user token - rejecting request\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzpk%3D","line":140,"in_reply_to":"AAAAEn%2F%2Fzqs%3D","updated":"2012-03-01 21:17:10.000000000","message":"They go straight to env vars, now that auth_token can\u0027t stand alone","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            return resp(env, start_response)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def _get_user_token_from_header(self, env):"},{"line_number":152,"context_line":"        \"\"\"Get token id from request"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        :param env: wsgi request environment"},{"line_number":155,"context_line":"        :return token id"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzrY%3D","line":152,"updated":"2012-03-01 21:11:29.000000000","message":".","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            raise InvalidUserToken(\u0027Unable to find token in headers\u0027)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def _reject_request(self, env, start_response):"},{"line_number":166,"context_line":"        \"\"\"Redirect client to auth server"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        :param env: wsgi request environment"},{"line_number":169,"context_line":"        :param start_response: wsgi response callback"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzrU%3D","line":166,"updated":"2012-03-01 21:11:29.000000000","message":".","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        return resp(env, start_response)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def get_admin_token(self):"},{"line_number":178,"context_line":"        \"\"\"Return admin token, possibly fetching a new one"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        :return admin token id"},{"line_number":181,"context_line":"        :raise ServiceError when unable to retrieve token from keystone"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzrQ%3D","line":178,"updated":"2012-03-01 21:11:29.000000000","message":".","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        :raise ServerError when unable to communicate with keystone"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        \"\"\""},{"line_number":201,"context_line":"        conn \u003d self.httplib_class(self.auth_host, self.auth_port)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        kwargs \u003d {"},{"line_number":204,"context_line":"            \u0027headers\u0027: {"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzqg%3D","line":201,"updated":"2012-03-01 21:11:29.000000000","message":"while i see what we\u0027re doing here with the httplib class, wouldn\u0027t it be easier to have a method called \"client\" or \"http_client\" or \"get_connection\" or something else? explicitly stating httplib seems out of place since what you are really trying to get is a connection object","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        try:"},{"line_number":251,"context_line":"            token \u003d data[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":252,"context_line":"            assert token"},{"line_number":253,"context_line":"            return token"},{"line_number":254,"context_line":"        except (AssertionError, KeyError):"},{"line_number":255,"context_line":"            raise ServiceError(\u0027invalid json response\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzqA%3D","line":252,"updated":"2012-03-01 21:11:29.000000000","message":"wouldn\u0027t this dict access fail if there is no token?","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"023e9cfbc16f575dfaa650ec15c1e961ab2e1439","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        try:"},{"line_number":251,"context_line":"            token \u003d data[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027]"},{"line_number":252,"context_line":"            assert token"},{"line_number":253,"context_line":"            return token"},{"line_number":254,"context_line":"        except (AssertionError, KeyError):"},{"line_number":255,"context_line":"            raise ServiceError(\u0027invalid json response\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzpA%3D","line":252,"in_reply_to":"AAAAEn%2F%2FzqA%3D","updated":"2012-03-01 21:21:24.000000000","message":"the token could be blank string if keystone is messing up... was trying to be paranoid","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":282,"context_line":"            self.admin_token \u003d None"},{"line_number":283,"context_line":"        else:"},{"line_number":284,"context_line":"            logger.error(\u0027Bad response code while validating token: %s\u0027 %"},{"line_number":285,"context_line":"                         response.status)"},{"line_number":286,"context_line":"        if retry:"},{"line_number":287,"context_line":"            logger.info(\u0027Retrying validation\u0027)"},{"line_number":288,"context_line":"            return self._validate_user_token(user_token, False)"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzp8%3D","line":285,"updated":"2012-03-01 21:11:29.000000000","message":"logging doesn\u0027t need to use % for string replacement, pls just use a comma instead","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"44d1f3acd9624797456feedf8bd99afeda6f6a8a","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        Build headers that represent authenticated user:"},{"line_number":296,"context_line":"         * X_TENANT_NAME: name of tenant if tenant is present"},{"line_number":297,"context_line":"         * X_TENANT_ID: id of tenant if tenant is present"},{"line_number":298,"context_line":"         * X_USER: name of user"},{"line_number":299,"context_line":"         * X_USER_ID: id of user"},{"line_number":300,"context_line":"         * X_ROLE: list of roles"},{"line_number":301,"context_line":"         * X_IDENTITY_STATUS: Confirmed or Invalid"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzrA%3D","line":298,"updated":"2012-03-01 21:13:18.000000000","message":"X_USER_NAME","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"44d1f3acd9624797456feedf8bd99afeda6f6a8a","unresolved":false,"context_lines":[{"line_number":297,"context_line":"         * X_TENANT_ID: id of tenant if tenant is present"},{"line_number":298,"context_line":"         * X_USER: name of user"},{"line_number":299,"context_line":"         * X_USER_ID: id of user"},{"line_number":300,"context_line":"         * X_ROLE: list of roles"},{"line_number":301,"context_line":"         * X_IDENTITY_STATUS: Confirmed or Invalid"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        Additional (deprecated) headers include:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzrE%3D","line":300,"updated":"2012-03-01 21:13:18.000000000","message":"X_ROLE*S*","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"44d1f3acd9624797456feedf8bd99afeda6f6a8a","unresolved":false,"context_lines":[{"line_number":301,"context_line":"         * X_IDENTITY_STATUS: Confirmed or Invalid"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        Additional (deprecated) headers include:"},{"line_number":304,"context_line":"         * X_TENANT: For legacy compatibility before we had ID and Name"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        :param token_info: token object returned by keystone on authentication"},{"line_number":307,"context_line":"        :raise InvalidUserToken when unable to parse token object"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzq8%3D","line":304,"updated":"2012-03-01 21:13:18.000000000","message":"Also deprecated:\n\n    X_USER\n    X_ROLE","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"44d1f3acd9624797456feedf8bd99afeda6f6a8a","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            tenant_id \u003d user.get(\u0027tenantId\u0027)"},{"line_number":322,"context_line":"            tenant_name \u003d user.get(\u0027tenantName\u0027)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        return {"},{"line_number":325,"context_line":"            \u0027X_IDENTITY_STATUS\u0027: \u0027Confirmed\u0027,"},{"line_number":326,"context_line":"            \u0027X_TENANT\u0027: tenant_name,"},{"line_number":327,"context_line":"            \u0027X_TENANT_NAME\u0027: tenant_name,"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzq0%3D","line":324,"updated":"2012-03-01 21:13:18.000000000","message":"Same stuff here","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    def _add_headers(self, values, env):"},{"line_number":335,"context_line":"        \"\"\"Add headers to environment\"\"\""},{"line_number":336,"context_line":"        for (k, v) in values.iteritems():"},{"line_number":337,"context_line":"            env[\u0027HTTP_%s\u0027 % k] \u003d v"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2FzrI%3D","line":336,"updated":"2012-03-01 21:11:29.000000000","message":"no parens needed","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"48684617815672c9f6da82bcea0008335d352b53","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    def _add_headers(self, values, env):"},{"line_number":335,"context_line":"        \"\"\"Add headers to environment\"\"\""},{"line_number":336,"context_line":"        for (k, v) in values.iteritems():"},{"line_number":337,"context_line":"            env[\u0027HTTP_%s\u0027 % k] \u003d v"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"def filter_factory(global_conf, **local_conf):"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzp4%3D","line":337,"updated":"2012-03-01 21:11:29.000000000","message":"to keep in line with how headers are usually referred to, I think this should probably do a k \u003d k.replace(\u0027-\u0027, \u0027_\u0027).upper()","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"023e9cfbc16f575dfaa650ec15c1e961ab2e1439","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    def _add_headers(self, values, env):"},{"line_number":335,"context_line":"        \"\"\"Add headers to environment\"\"\""},{"line_number":336,"context_line":"        for (k, v) in values.iteritems():"},{"line_number":337,"context_line":"            env[\u0027HTTP_%s\u0027 % k] \u003d v"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"def filter_factory(global_conf, **local_conf):"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAEn%2F%2Fzo4%3D","line":337,"in_reply_to":"AAAAEn%2F%2Fzp4%3D","updated":"2012-03-01 21:21:24.000000000","message":"I like this idea","commit_id":"c431cc56516d406820926ccf524c649ffb3a24e9"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"97791e790dd63cfd5b4be8740e35c7f1e331a885","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    The client token being passed in (legacy Rackspace use) to support"},{"line_number":47,"context_line":"    swift/cloud files"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Used for communication between components"},{"line_number":50,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"www-authenticate"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzmg%3D","line":49,"updated":"2012-03-01 21:50:02.000000000","message":"I don\u0027t think this section makes sense anymore (was releveant to proxy mode) - thoughts dolph?","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"97791e790dd63cfd5b4be8740e35c7f1e331a885","unresolved":false,"context_lines":[{"line_number":58,"context_line":"What we add to the request for use by the OpenStack service"},{"line_number":59,"context_line":"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"HTTP_X_AUTHORIZATION"},{"line_number":62,"context_line":"    The client identity being passed in"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"HTTP_X_IDENTITY_STATUS"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzms%3D","line":61,"updated":"2012-03-01 21:50:02.000000000","message":"X_AUTHORIZATION was a auth token proxy mode thing - I think it can be removed - dolph?","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":494,"name":"termie","email":"termie@openstack.org","username":"termie"},"change_message_id":"efd39f5ded63828c8f40ad82115998827aaf0309","unresolved":false,"context_lines":[{"line_number":103,"context_line":"import webob.exc"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"logger \u003d logging.getLogger(\u0027keystone.middleware.auth_token\u0027)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"class InvalidUserToken(Exception):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2FzmY%3D","line":106,"updated":"2012-03-01 21:49:17.000000000","message":"do you prefer logger over LOG? I do too, maybe we should add that to HACKING?","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"b2e30e170c7caeb2313fe81878d68ccdb097fa74","unresolved":false,"context_lines":[{"line_number":103,"context_line":"import webob.exc"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"logger \u003d logging.getLogger(\u0027keystone.middleware.auth_token\u0027)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"class InvalidUserToken(Exception):"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzls%3D","line":106,"in_reply_to":"AAAAEn%2F%2FzmY%3D","updated":"2012-03-01 22:07:39.000000000","message":"logger makes more sense, but I also like using all caps...","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"97791e790dd63cfd5b4be8740e35c7f1e331a885","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        self.auth_port \u003d int(conf.get(\u0027auth_port\u0027))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        auth_protocol \u003d conf.get(\u0027auth_protocol\u0027, \u0027https\u0027)"},{"line_number":134,"context_line":"        if auth_protocol \u003d\u003d \u0027http\u0027:"},{"line_number":135,"context_line":"            self.http_client_class \u003d httplib.HTTPConnection"},{"line_number":136,"context_line":"        else:"},{"line_number":137,"context_line":"            self.http_client_class \u003d httplib.HTTPSConnection"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzl8%3D","line":134,"updated":"2012-03-01 21:50:02.000000000","message":"move this into the get_http_connection function?","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"b2e30e170c7caeb2313fe81878d68ccdb097fa74","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        self.auth_port \u003d int(conf.get(\u0027auth_port\u0027))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        auth_protocol \u003d conf.get(\u0027auth_protocol\u0027, \u0027https\u0027)"},{"line_number":134,"context_line":"        if auth_protocol \u003d\u003d \u0027http\u0027:"},{"line_number":135,"context_line":"            self.http_client_class \u003d httplib.HTTPConnection"},{"line_number":136,"context_line":"        else:"},{"line_number":137,"context_line":"            self.http_client_class \u003d httplib.HTTPSConnection"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzlk%3D","line":134,"in_reply_to":"AAAAEn%2F%2Fzl8%3D","updated":"2012-03-01 22:07:39.000000000","message":"I\u0027m hesitant to do that as the connection class will always be the same. I don\u0027t want to go through this conditional every time we need a new connection.","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"97791e790dd63cfd5b4be8740e35c7f1e331a885","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            \u0027X-Tenant-Name\u0027,"},{"line_number":191,"context_line":"            \u0027X-Tenant-Id\u0027,"},{"line_number":192,"context_line":"            \u0027X-User\u0027,"},{"line_number":193,"context_line":"            \u0027X-User-Id\u0027,"},{"line_number":194,"context_line":"            \u0027X-Role\u0027,"},{"line_number":195,"context_line":"        )"},{"line_number":196,"context_line":"        logger.debug(\u0027Removing headers from request environment: %s\u0027 %"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzm8%3D","line":193,"updated":"2012-03-01 21:50:02.000000000","message":"missing X-User-Name","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"b2e30e170c7caeb2313fe81878d68ccdb097fa74","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            \u0027X-Tenant-Name\u0027,"},{"line_number":191,"context_line":"            \u0027X-Tenant-Id\u0027,"},{"line_number":192,"context_line":"            \u0027X-User\u0027,"},{"line_number":193,"context_line":"            \u0027X-User-Id\u0027,"},{"line_number":194,"context_line":"            \u0027X-Role\u0027,"},{"line_number":195,"context_line":"        )"},{"line_number":196,"context_line":"        logger.debug(\u0027Removing headers from request environment: %s\u0027 %"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzlg%3D","line":193,"in_reply_to":"AAAAEn%2F%2Fzm8%3D","updated":"2012-03-01 22:07:39.000000000","message":"Done","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"97791e790dd63cfd5b4be8740e35c7f1e331a885","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            \u0027X-Tenant-Id\u0027,"},{"line_number":192,"context_line":"            \u0027X-User\u0027,"},{"line_number":193,"context_line":"            \u0027X-User-Id\u0027,"},{"line_number":194,"context_line":"            \u0027X-Role\u0027,"},{"line_number":195,"context_line":"        )"},{"line_number":196,"context_line":"        logger.debug(\u0027Removing headers from request environment: %s\u0027 %"},{"line_number":197,"context_line":"                     \u0027,\u0027.join(auth_headers))"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzm0%3D","line":194,"updated":"2012-03-01 21:50:02.000000000","message":"missing X-Roles","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"b2e30e170c7caeb2313fe81878d68ccdb097fa74","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            \u0027X-Tenant-Id\u0027,"},{"line_number":192,"context_line":"            \u0027X-User\u0027,"},{"line_number":193,"context_line":"            \u0027X-User-Id\u0027,"},{"line_number":194,"context_line":"            \u0027X-Role\u0027,"},{"line_number":195,"context_line":"        )"},{"line_number":196,"context_line":"        logger.debug(\u0027Removing headers from request environment: %s\u0027 %"},{"line_number":197,"context_line":"                     \u0027,\u0027.join(auth_headers))"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzlc%3D","line":194,"in_reply_to":"AAAAEn%2F%2Fzm0%3D","updated":"2012-03-01 22:07:39.000000000","message":"Done","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"97791e790dd63cfd5b4be8740e35c7f1e331a885","unresolved":false,"context_lines":[{"line_number":384,"context_line":"            \u0027X-Tenant-Id\u0027: tenant_id,"},{"line_number":385,"context_line":"            \u0027X-Tenant-Name\u0027: tenant_name,"},{"line_number":386,"context_line":"            \u0027X-User-Id\u0027: user_id,"},{"line_number":387,"context_line":"            \u0027X-User_Name\u0027: user_name,"},{"line_number":388,"context_line":"            \u0027X-Roles\u0027: roles,"},{"line_number":389,"context_line":"            # Deprecated"},{"line_number":390,"context_line":"            \u0027X-User\u0027: user_name,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzmc%3D","line":387,"updated":"2012-03-01 21:50:02.000000000","message":"User_Name -\u003e User-Name","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":112,"name":"Jesse Andrews","email":"anotherjesse@gmail.com","username":"anotherjesse"},"change_message_id":"97791e790dd63cfd5b4be8740e35c7f1e331a885","unresolved":false,"context_lines":[{"line_number":409,"context_line":"    def _remove_headers(self, env, keys):"},{"line_number":410,"context_line":"        \"\"\"Remove http headers from environment.\"\"\""},{"line_number":411,"context_line":"        for k in keys:"},{"line_number":412,"context_line":"            try:"},{"line_number":413,"context_line":"                del env[self._header_to_env_var(k)]"},{"line_number":414,"context_line":"            except KeyError:"},{"line_number":415,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2Fzl0%3D","line":412,"updated":"2012-03-01 21:50:02.000000000","message":"should this do:\n\n    env_key \u003d self._header_to_env_var(k)\n    if env_key in env:\n        del env[env_key]","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"b2e30e170c7caeb2313fe81878d68ccdb097fa74","unresolved":false,"context_lines":[{"line_number":409,"context_line":"    def _remove_headers(self, env, keys):"},{"line_number":410,"context_line":"        \"\"\"Remove http headers from environment.\"\"\""},{"line_number":411,"context_line":"        for k in keys:"},{"line_number":412,"context_line":"            try:"},{"line_number":413,"context_line":"                del env[self._header_to_env_var(k)]"},{"line_number":414,"context_line":"            except KeyError:"},{"line_number":415,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAEn%2F%2FzlY%3D","line":412,"in_reply_to":"AAAAEn%2F%2Fzl0%3D","updated":"2012-03-01 22:07:39.000000000","message":"Sure, that\u0027s cleaner. Fixed in all three methods.","commit_id":"55cd66c345c942f1bb9df0dca61b844e13e125b7"}]}
