)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds a new class for security context."},{"line_number":10,"context_line":"This class is used to store important authorization"},{"line_number":11,"context_line":"information for incomming request."},{"line_number":12,"context_line":"Pecan allows to have hooks for processing requests."},{"line_number":13,"context_line":"This patch adds a new hook which extracts information from"},{"line_number":14,"context_line":"keystone auth_token, creates a new class for security context"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAUH%2F%2FcFg%3D","line":11,"updated":"2014-01-13 22:30:58.000000000","message":"information for incoming requests.","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch adds a new class for security context."},{"line_number":10,"context_line":"This class is used to store important authorization"},{"line_number":11,"context_line":"information for incomming request."},{"line_number":12,"context_line":"Pecan allows to have hooks for processing requests."},{"line_number":13,"context_line":"This patch adds a new hook which extracts information from"},{"line_number":14,"context_line":"keystone auth_token, creates a new class for security context"},{"line_number":15,"context_line":"and adds this security context as a part of request"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAUH%2F%2FcFc%3D","line":12,"updated":"2014-01-13 22:30:58.000000000","message":"Pecan allows hooks for processing requests.","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":11,"context_line":"information for incomming request."},{"line_number":12,"context_line":"Pecan allows to have hooks for processing requests."},{"line_number":13,"context_line":"This patch adds a new hook which extracts information from"},{"line_number":14,"context_line":"keystone auth_token, creates a new class for security context"},{"line_number":15,"context_line":"and adds this security context as a part of request"},{"line_number":16,"context_line":"accesible via request.security_context."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAUH%2F%2FcFA%3D","line":14,"updated":"2014-01-13 22:30:58.000000000","message":"a keystone auth_token, creates a new class for a security context,","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Pecan allows to have hooks for processing requests."},{"line_number":13,"context_line":"This patch adds a new hook which extracts information from"},{"line_number":14,"context_line":"keystone auth_token, creates a new class for security context"},{"line_number":15,"context_line":"and adds this security context as a part of request"},{"line_number":16,"context_line":"accesible via request.security_context."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"We need to agree on SecurityContext class structure."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAUH%2F%2FcE8%3D","line":15,"updated":"2014-01-13 22:30:58.000000000","message":"and adds this security context as a part of the request","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"We need to agree on SecurityContext class structure."},{"line_number":19,"context_line":"right now it is just copy\u0026paste from Nova."},{"line_number":20,"context_line":"Paul had a good ideas about SecurityContext class"},{"line_number":21,"context_line":"structure."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I42539c06b6dc325172e90c32dabc3bd5476a628f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAUH%2F%2FcEs%3D","line":20,"updated":"2014-01-13 22:30:58.000000000","message":"Paul had good ideas about SecurityContext class","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"878d41857161040665fb747a3c4345cd6e4f50b8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Gerrit Code Review \u003creview@openstack.org\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-01-14 23:46:45 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP: Add security context for each incomming request."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch uses RequestContext from"},{"line_number":10,"context_line":"https://review.openstack.org/#/c/63201/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"AAAAUH%2F%2FVBg%3D","line":7,"updated":"2014-01-15 00:34:57.000000000","message":"s/incomming/incoming/","commit_id":"9d153335a81af61712b390cfd661260ea21940cb"},{"author":{"_account_id":2506,"name":"devdatta-kulkarni","email":"kulkarni.devdatta@gmail.com","username":"devdatta-kulkarni"},"change_message_id":"64cab9b2386ab19a23395886762cabd6746f86e7","unresolved":false,"context_lines":[{"line_number":10,"context_line":"This patch adds a new hook which extracts information from"},{"line_number":11,"context_line":"keystone auth_token, creates a new instance of RequestContext"},{"line_number":12,"context_line":"and adds this context as a part of a request"},{"line_number":13,"context_line":"accesible via request.security_context."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I42539c06b6dc325172e90c32dabc3bd5476a628f"},{"line_number":16,"context_line":"Partly-Implements: blueprint rbac-filtering"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"AAAAVn%2F%2FykM%3D","line":13,"updated":"2014-03-04 04:36:54.000000000","message":"accessible.","commit_id":"53e5061574184c6ca18e6cd1959b5a4a7358a3fa"}],"solum/api/auth.py":[{"author":{"_account_id":9124,"name":"Clayton Coleman","email":"ccoleman@redhat.com","username":"clayton.coleman"},"change_message_id":"bf4855a07bec4c6d730cd7810867e678d4a5ffb9","unresolved":false,"context_lines":[{"line_number":54,"context_line":"class AuthInformationHook(hooks.PecanHook):"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def before(self, state):"},{"line_number":57,"context_line":"        user_id \u003d state.request.headers.get(\u0027X_USER\u0027)"},{"line_number":58,"context_line":"        user_id \u003d state.request.headers.get(\u0027X_USER_ID\u0027, user_id)"},{"line_number":59,"context_line":"        if user_id is None:"},{"line_number":60,"context_line":"            LOG.debug(\"Neither X_USER_ID nor X_USER found in request\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2FqdI%3D","line":57,"updated":"2014-01-03 21:35:23.000000000","message":"Suggest declaring a local \n\nheaders \u003d state.request.headers, makes the rest of the method a lot more readable.","commit_id":"c6343318c13f4f19d1412ddd106379a8e68c8b1b"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if \u0027X_TENANT_ID\u0027 in headers:"},{"line_number":67,"context_line":"            # This is the new header since Keystone went to ID/Name"},{"line_number":68,"context_line":"            project_id \u003d headers[\u0027X_TENANT_ID\u0027]"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            # This is for legacy compatibility"},{"line_number":71,"context_line":"            project_id \u003d headers[\u0027X_TENANT\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fbi0%3D","line":68,"updated":"2014-01-13 22:30:58.000000000","message":"should we also call this tenant_id? My understanding is that a given tenant may have multiple projects, so this is a 1:N relation. Coping this 1:1 does not seem right.","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            project_id \u003d headers[\u0027X_TENANT_ID\u0027]"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            # This is for legacy compatibility"},{"line_number":71,"context_line":"            project_id \u003d headers[\u0027X_TENANT\u0027]"},{"line_number":72,"context_line":"        project_name \u003d headers.get(\u0027X_TENANT_NAME\u0027)"},{"line_number":73,"context_line":"        user_name \u003d headers.get(\u0027X_USER_NAME\u0027)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fbgo%3D","line":71,"updated":"2014-01-13 22:30:58.000000000","message":"Here, also, I think we need to decide if we want to track tenant_id or project_id.","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        remote_address \u003d state.request.remote_addr"},{"line_number":82,"context_line":"        if CONF.use_forwarded_for:"},{"line_number":83,"context_line":"            remote_address \u003d headers.get("},{"line_number":84,"context_line":"                \u0027X-Forwarded-For\u0027, remote_address)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        service_catalog \u003d None"},{"line_number":87,"context_line":"        if headers.get(\u0027X_SERVICE_CATALOG\u0027) is not None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Fbao%3D","line":84,"updated":"2014-01-13 22:30:58.000000000","message":"The X-Forwarded-For header may have more than one IP address in it. If so, it will be a comma delimited list. Typically the last entry in that list is the IP of the proxy that most recently relayed the request, so the first IP in the list is usually what you want in order to find the actual client IP address. I suggest adding detection to determine if the contents of the header is an IP address, or a delimited list, and if it\u0027s a list, to parse it out accordingly.","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        if headers.get(\u0027X_SERVICE_CATALOG\u0027) is not None:"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                catalog_header \u003d headers.get(\u0027X_SERVICE_CATALOG\u0027)"},{"line_number":90,"context_line":"                service_catalog \u003d jsonutils.loads(catalog_header)"},{"line_number":91,"context_line":"            except ValueError:"},{"line_number":92,"context_line":"                raise Exception("},{"line_number":93,"context_line":"                    _(\u0027Invalid service catalog json.\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FbWs%3D","line":90,"updated":"2014-01-13 22:30:58.000000000","message":"Might this call take some time, and be infrequently accessed? Maybe it would make more sense to just load catalog_header by default, and allow the code that accesses the security context to expand the catalog as needed. That might speed up auth quite a bit, assuming this happens on every request.","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        return"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def after(self, state):"},{"line_number":108,"context_line":"        print"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _get_roles(self, req):"},{"line_number":111,"context_line":"        \"\"\"Get the list of roles.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FcDs%3D","line":108,"updated":"2014-01-13 22:30:58.000000000","message":"print? Was this in here for debugging? I\u0027m expecting something like a null return here.","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5d6c19f8100d8549b81e202ecb709ff92489ae97","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        \"\"\"Get the list of roles.\"\"\""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        if \u0027X_ROLES\u0027 in req.headers:"},{"line_number":114,"context_line":"            roles \u003d req.headers.get(\u0027X_ROLES\u0027, \u0027\u0027)"},{"line_number":115,"context_line":"        else:"},{"line_number":116,"context_line":"            # Fallback to deprecated role header:"},{"line_number":117,"context_line":"            roles \u003d req.headers.get(\u0027X_ROLE\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FbQU%3D","line":114,"updated":"2014-01-13 22:30:58.000000000","message":"If this is pulling in a header value, you are going to get a string. Maybe it would be more useful for us to have roles in an array, or an object so you can easily test for the existence of a role without iterating a string comparison over the full string each time. Note that role lists may end up being rather long.","commit_id":"2be040aca4a803acb32b3a82226112871e91f48c"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"878d41857161040665fb747a3c4345cd6e4f50b8","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        # We need to support both, just in case"},{"line_number":68,"context_line":"        if \u0027X_TENANT_ID\u0027 in headers:"},{"line_number":69,"context_line":"            # This is the new header since Keystone went to ID/Name"},{"line_number":70,"context_line":"            project_id \u003d headers[\u0027X_TENANT_ID\u0027]"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            # This is for legacy compatibility"},{"line_number":73,"context_line":"            project_id \u003d headers[\u0027X_TENANT\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FU%2B8%3D","line":70,"updated":"2014-01-15 00:34:57.000000000","message":"This looks like a misuse of project_id. My understanding is that tenant_id !\u003d project_id, so this mapping looks wrong. Can\u0027t a given tenant have multiple project_id values? Please comment. The same comment applies to line 73 of this file.","commit_id":"9d153335a81af61712b390cfd661260ea21940cb"},{"author":{"_account_id":4715,"name":"Angus Salkeld","email":"asalkeld@redhat.com","username":"asalkeld"},"change_message_id":"087520cf9a9e6c4e977d0e24d93bb020dbc0b7ce","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        # We need to support both, just in case"},{"line_number":68,"context_line":"        if \u0027X_TENANT_ID\u0027 in headers:"},{"line_number":69,"context_line":"            # This is the new header since Keystone went to ID/Name"},{"line_number":70,"context_line":"            project_id \u003d headers[\u0027X_TENANT_ID\u0027]"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            # This is for legacy compatibility"},{"line_number":73,"context_line":"            project_id \u003d headers[\u0027X_TENANT\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FUrs%3D","line":70,"in_reply_to":"AAAAUH%2F%2FU%2B8%3D","updated":"2014-01-15 02:17:02.000000000","message":"project and tenant are the same. There has been agreement to move to \"project\" on the mailing list. I\u0027d suggest looking for X-Project-Id and ignoring legacy headers as we are starting fresh.\n\nsee: https://github.com/openstack/ceilometer/blob/master/ceilometer/api/acl.py#L61","commit_id":"9d153335a81af61712b390cfd661260ea21940cb"},{"author":{"_account_id":9094,"name":"Paul Montgomery","email":"PaulMontgomery.code@gmail.com","username":"paulmo"},"change_message_id":"7e296dc412db7ae815cb6e92fdd511d1035f74eb","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        # We need to support both, just in case"},{"line_number":68,"context_line":"        if \u0027X_TENANT_ID\u0027 in headers:"},{"line_number":69,"context_line":"            # This is the new header since Keystone went to ID/Name"},{"line_number":70,"context_line":"            project_id \u003d headers[\u0027X_TENANT_ID\u0027]"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            # This is for legacy compatibility"},{"line_number":73,"context_line":"            project_id \u003d headers[\u0027X_TENANT\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FRok%3D","line":70,"in_reply_to":"AAAAUH%2F%2FUrs%3D","updated":"2014-01-15 15:47:02.000000000","message":"+1 Angus","commit_id":"9d153335a81af61712b390cfd661260ea21940cb"},{"author":{"_account_id":8334,"name":"Noorul Islam K M","email":"noorul@noorul.com","username":"noorul"},"change_message_id":"5fa15f61b3c340d13117fed091682b8930a6ca54","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from keystoneclient.middleware import auth_token"},{"line_number":16,"context_line":"from oslo.config import cfg"},{"line_number":17,"context_line":"from pecan import hooks"},{"line_number":18,"context_line":"from solum.common import context"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2FJ1I%3D","line":15,"updated":"2014-01-16 22:33:13.000000000","message":"3rd party imports should be separated by blank line","commit_id":"e21eb0247b9397f86544615e7e3cf98786c8c3a7"},{"author":{"_account_id":8334,"name":"Noorul Islam K M","email":"noorul@noorul.com","username":"noorul"},"change_message_id":"5fa15f61b3c340d13117fed091682b8930a6ca54","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        state.request.security_context \u003d ctx"},{"line_number":115,"context_line":"        return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def after(self, state):"},{"line_number":118,"context_line":"        pass"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def _get_roles(self, req):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2FJ0s%3D","line":117,"updated":"2014-01-16 22:33:13.000000000","message":"Why are you overriding this method and doing nothing?","commit_id":"e21eb0247b9397f86544615e7e3cf98786c8c3a7"},{"author":{"_account_id":8334,"name":"Noorul Islam K M","email":"noorul@noorul.com","username":"noorul"},"change_message_id":"5fa15f61b3c340d13117fed091682b8930a6ca54","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            # Fallback to deprecated role header:"},{"line_number":127,"context_line":"            roles \u003d req.headers.get(\u0027X_ROLE\u0027, \u0027\u0027)"},{"line_number":128,"context_line":"            if roles:"},{"line_number":129,"context_line":"                LOG.warn(_(\"Sourcing roles from deprecated X-Role HTTP \""},{"line_number":130,"context_line":"                           \"header\"))"},{"line_number":131,"context_line":"        return [r.strip() for r in roles.split(\u0027,\u0027)]"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2FJ0M%3D","line":129,"updated":"2014-01-16 22:33:13.000000000","message":"Is it x_role?","commit_id":"e21eb0247b9397f86544615e7e3cf98786c8c3a7"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5da7d81d3184612d2bdff87e45bfb84e3d9746bd","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        roles \u003d self._get_roles(state.request)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        project_id \u003d headers[\u0027X-Project-Id\u0027]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        project_name \u003d headers.get(\u0027X_TENANT_NAME\u0027)"},{"line_number":71,"context_line":"        user_name \u003d headers.get(\u0027X_USER_NAME\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2FJD8%3D","line":68,"updated":"2014-01-17 02:07:58.000000000","message":"Should this be using headers.get like lines 70 and 71 do? What\u0027s different? This key name uses dashes, but the others use underscores? Why?","commit_id":"9350a1adbd13ba4677ac326296ab143a9c758af1"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"4ccabbd0fce5888d80cca15ece4f8a5938199e60","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                                         service_catalog\u003dservice_catalog)"},{"line_number":124,"context_line":"            state.request.security_context \u003d ctx"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            LOG.debug(\"The identity provides is not confirmed.\")"},{"line_number":127,"context_line":"            raise Exception(\u0027Not authorized. Identity is not confirmed.\u0027)"},{"line_number":128,"context_line":"        return"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAVn%2F%2Fyu8%3D","line":126,"updated":"2014-03-04 04:08:49.000000000","message":"The provided identity is not confirmed.","commit_id":"53e5061574184c6ca18e6cd1959b5a4a7358a3fa"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"4ccabbd0fce5888d80cca15ece4f8a5938199e60","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            state.request.security_context \u003d ctx"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            LOG.debug(\"The identity provides is not confirmed.\")"},{"line_number":127,"context_line":"            raise Exception(\u0027Not authorized. Identity is not confirmed.\u0027)"},{"line_number":128,"context_line":"        return"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _get_roles(self, req):"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAVn%2F%2Fyuo%3D","line":127,"updated":"2014-03-04 04:08:49.000000000","message":"Consider: \"Not authorized. Identity not confirmed.\"","commit_id":"53e5061574184c6ca18e6cd1959b5a4a7358a3fa"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"4ccabbd0fce5888d80cca15ece4f8a5938199e60","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            # Fallback to deprecated role header:"},{"line_number":137,"context_line":"            roles \u003d req.headers.get(\u0027X-Role\u0027, \u0027\u0027)"},{"line_number":138,"context_line":"            if roles:"},{"line_number":139,"context_line":"                LOG.warn(_(\"Sourcing roles from deprecated X-Role HTTP \""},{"line_number":140,"context_line":"                           \"header\"))"},{"line_number":141,"context_line":"        return [r.strip() for r in roles.split(\u0027,\u0027)]"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAVn%2F%2FytU%3D","line":139,"updated":"2014-03-04 04:08:49.000000000","message":"Consider: \"X-Roles request header is missing. Using deprecated X-Role header instead.\"","commit_id":"53e5061574184c6ca18e6cd1959b5a4a7358a3fa"},{"author":{"_account_id":9537,"name":"Julien Vey","email":"vey.julien@gmail.com","username":"julienvey"},"change_message_id":"87e468cb4c46c67179795711eeb936f545effabe","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        headers \u003d state.request.headers"},{"line_number":84,"context_line":"        user_id \u003d headers.get(\u0027X-User-Id\u0027)"},{"line_number":85,"context_line":"        if user_id is None:"},{"line_number":86,"context_line":"            LOG.debug(\"X-USER-ID was not found in request\")"},{"line_number":87,"context_line":"            raise Exception(\u0027Not authorized\u0027)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        roles \u003d self._get_roles(state.request)"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAVn%2F%2Ftkk%3D","line":86,"updated":"2014-03-04 15:06:24.000000000","message":"X-User-Id instead of X-USER-ID","commit_id":"c82e35345250bb03bfae13c5afbd7ec9043092b0"},{"author":{"_account_id":9537,"name":"Julien Vey","email":"vey.julien@gmail.com","username":"julienvey"},"change_message_id":"87e468cb4c46c67179795711eeb936f545effabe","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        user_id \u003d headers.get(\u0027X-User-Id\u0027)"},{"line_number":85,"context_line":"        if user_id is None:"},{"line_number":86,"context_line":"            LOG.debug(\"X-USER-ID was not found in request\")"},{"line_number":87,"context_line":"            raise Exception(\u0027Not authorized\u0027)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        roles \u003d self._get_roles(state.request)"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAVn%2F%2FtbI%3D","line":87,"updated":"2014-03-04 15:06:24.000000000","message":"Just a question, Will this exception be catch and transform into a 401 response ? or should we think about doing it.\n\nI\u0027m afraid this will result in a 500 error for the client.","commit_id":"c82e35345250bb03bfae13c5afbd7ec9043092b0"},{"author":{"_account_id":8443,"name":"Georgy Okrokvertskhov","email":"gokrokvertskhov@mirantis.com","username":"gokrokvertskhov"},"change_message_id":"67aeba25ea2786a9ecfb9a1abd6909eaf6715391","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        user_id \u003d headers.get(\u0027X-User-Id\u0027)"},{"line_number":85,"context_line":"        if user_id is None:"},{"line_number":86,"context_line":"            LOG.debug(\"X-USER-ID was not found in request\")"},{"line_number":87,"context_line":"            raise Exception(\u0027Not authorized\u0027)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        roles \u003d self._get_roles(state.request)"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAVn%2F%2Fowk%3D","line":87,"in_reply_to":"AAAAVn%2F%2FtbI%3D","updated":"2014-03-04 22:40:31.000000000","message":"Yes. It returns 401 status code. Here is a link for the logs from patch 26 when trigger API test failed doe to this reason. http://logs.openstack.org/58/64458/26/check/gate-solum-devstack-dsvm/d4f2702/logs/screen-solum.txt.gz#_2014-03-04_00_53_34_574","commit_id":"c82e35345250bb03bfae13c5afbd7ec9043092b0"}],"solum/api/context.py":[{"author":{"_account_id":9124,"name":"Clayton Coleman","email":"ccoleman@redhat.com","username":"clayton.coleman"},"change_message_id":"bf4855a07bec4c6d730cd7810867e678d4a5ffb9","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from solum.openstack.common import timeutils"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def generate_request_id():"},{"line_number":27,"context_line":"    return \u0027req-\u0027 + str(uuid.uuid4())"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2Fqd8%3D","line":26,"updated":"2014-01-03 21:35:23.000000000","message":"Is there no oslo common function for this yet?  Needs inline doc string","commit_id":"c6343318c13f4f19d1412ddd106379a8e68c8b1b"},{"author":{"_account_id":9124,"name":"Clayton Coleman","email":"ccoleman@redhat.com","username":"clayton.coleman"},"change_message_id":"bf4855a07bec4c6d730cd7810867e678d4a5ffb9","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        self.read_deleted \u003d read_deleted"},{"line_number":40,"context_line":"        if not timestamp:"},{"line_number":41,"context_line":"            timestamp \u003d timeutils.utcnow()"},{"line_number":42,"context_line":"        if isinstance(timestamp, six.string_types):"},{"line_number":43,"context_line":"            timestamp \u003d timeutils.parse_strtime(timestamp)"},{"line_number":44,"context_line":"        self.timestamp \u003d timestamp"},{"line_number":45,"context_line":"        if not request_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAT3%2F%2FqeM%3D","line":42,"updated":"2014-01-03 21:35:23.000000000","message":"Shouldn\u0027t this be above line 40, with line 40 being an elseif?","commit_id":"c6343318c13f4f19d1412ddd106379a8e68c8b1b"},{"author":{"_account_id":8443,"name":"Georgy Okrokvertskhov","email":"gokrokvertskhov@mirantis.com","username":"gokrokvertskhov"},"change_message_id":"f9798703af25f068c88b3a2890a69f29b292364a","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        self.read_deleted \u003d read_deleted"},{"line_number":40,"context_line":"        if not timestamp:"},{"line_number":41,"context_line":"            timestamp \u003d timeutils.utcnow()"},{"line_number":42,"context_line":"        if isinstance(timestamp, six.string_types):"},{"line_number":43,"context_line":"            timestamp \u003d timeutils.parse_strtime(timestamp)"},{"line_number":44,"context_line":"        self.timestamp \u003d timestamp"},{"line_number":45,"context_line":"        if not request_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FcKE%3D","line":42,"in_reply_to":"AAAAT3%2F%2FqeM%3D","updated":"2014-01-13 21:40:53.000000000","message":"No. In openstack.comon.timeutils the function utcnow can be overridden, so anyway we need to check what was returned by this function and parse it correctly.","commit_id":"c6343318c13f4f19d1412ddd106379a8e68c8b1b"}],"solum/tests/api/test_auth.py":[{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"878d41857161040665fb747a3c4345cd6e4f50b8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 - Mirantis Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FU%2FM%3D","line":1,"updated":"2014-01-15 00:34:57.000000000","message":"Is this a correction because of the way you copied the license header from another file? If there is copyrighted code, we should be preserving the copyright of the original author, and adding to it for derivative work.","commit_id":"9d153335a81af61712b390cfd661260ea21940cb"},{"author":{"_account_id":8443,"name":"Georgy Okrokvertskhov","email":"gokrokvertskhov@mirantis.com","username":"gokrokvertskhov"},"change_message_id":"5b151929c083d3ab4e02299d17b7a276d0db42b5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 - Mirantis Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F%2FUcw%3D","line":1,"in_reply_to":"AAAAUH%2F%2FU%2FM%3D","updated":"2014-01-15 03:50:00.000000000","message":"This was a wrong copy\u0026paste from another file. All tests are new.","commit_id":"9d153335a81af61712b390cfd661260ea21940cb"},{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"5da7d81d3184612d2bdff87e45bfb84e3d9746bd","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self.assertEqual(ctx.get_priv(\u0027auth_token\u0027),"},{"line_number":77,"context_line":"                         fakes.fakeAuthTokenHeaders[\u0027X_AUTH_TOKEN\u0027])"},{"line_number":78,"context_line":"        self.assertEqual(ctx.get_pub(\u0027project_id\u0027),"},{"line_number":79,"context_line":"                         fakes.fakeAuthTokenHeaders[\u0027X-Project-Id\u0027])"},{"line_number":80,"context_line":"        self.assertEqual(ctx.get_pub(\u0027user_name\u0027),"},{"line_number":81,"context_line":"                         fakes.fakeAuthTokenHeaders[\u0027X_USER_NAME\u0027])"},{"line_number":82,"context_line":"        self.assertEqual(ctx.get_pub(\u0027user_id\u0027),"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAUH%2F%2FJA4%3D","line":79,"updated":"2014-01-17 02:07:58.000000000","message":"Here again, the key is using dashes rather than underscores. Why?","commit_id":"9350a1adbd13ba4677ac326296ab143a9c758af1"}],"solum/tests/fakes.py":[{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"886c83871f3f2da428c20d1cef39de41c44bc99c","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"fakeAuthTokenHeaders \u003d {\u0027X_USER_ID\u0027: u\u0027773a902f022949619b5c2f32cd89d419\u0027,"},{"line_number":48,"context_line":"                        \u0027X_ROLES\u0027: [u\u0027admin\u0027, u\u0027ResellerAdmin\u0027, u\u0027_member_\u0027],"},{"line_number":49,"context_line":"                        \u0027X_TENANT_ID\u0027: u\u00275588aebbcdc24e17a061595f80574376\u0027,"},{"line_number":50,"context_line":"                        \u0027X_TENANT_NAME\u0027: \u0027test\u0027,"},{"line_number":51,"context_line":"                        \u0027X_USER_NAME\u0027: \u0027test\u0027,"},{"line_number":52,"context_line":"                        \u0027X_AUTH_TOKEN\u0027: u\u00275588aebbcdc24e17a061595f80574376\u0027}"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F%2FPs4%3D","line":49,"updated":"2014-01-15 23:16:45.000000000","message":"This should be adjusted to X-Project-ID","commit_id":"e21eb0247b9397f86544615e7e3cf98786c8c3a7"}],"test-requirements.txt":[{"author":{"_account_id":668,"name":"Adrian Otto","email":"aotto@aotto.com","username":"aotto"},"change_message_id":"886c83871f3f2da428c20d1cef39de41c44bc99c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"hacking\u003e\u003d0.8.0,\u003c0.9"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"coverage\u003e\u003d3.6"},{"line_number":4,"context_line":"discover"},{"line_number":5,"context_line":"fixtures\u003e\u003d0.3.14"},{"line_number":6,"context_line":"python-subunit"},{"line_number":7,"context_line":"sphinx\u003e\u003d1.1.2,\u003c1.2"}],"source_content_type":"text/plain","patch_set":13,"id":"AAAAUH%2F%2FPtU%3D","line":4,"updated":"2014-01-15 23:16:45.000000000","message":"I would prefer if this list were sorted alphabetically, so It\u0027s easier to notice duplicate entries.","commit_id":"e21eb0247b9397f86544615e7e3cf98786c8c3a7"}]}
