)]}'
{"keystone/service.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"9defcaaf7f68301d1b5c92ccf6c0997db501fa92","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        expiry \u003d old_token_ref[\u0027expires\u0027]"},{"line_number":302,"context_line":"        auth_token_data[\u0027expires\u0027] \u003d expiry"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        return auth_token_data, (current_user_ref, tenant_ref, metadata_ref)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def _authenticate_local(self, context, auth):"},{"line_number":307,"context_line":"        \"\"\"Authenticate against the identity backend and return the auth info."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALn%2F%2FyUw%3D","line":304,"updated":"2012-11-06 20:27:04.000000000","message":"Can we get a consistent  return from the various _authenticate functions? Either: auth_token_data, (current_user_ref, tenant_ref, metadata_ref)  or just the tuple itself?  I think if we get a good contract of what is returned from one of them, it will make extensions easier.","commit_id":"b558c343ca4b901a02c9fc193c6fa922ccd1279f"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"e85ab1128308ae3916f63ecf1c3a7dd8facfb7f8","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        expiry \u003d old_token_ref[\u0027expires\u0027]"},{"line_number":302,"context_line":"        auth_token_data[\u0027expires\u0027] \u003d expiry"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        return auth_token_data, (current_user_ref, tenant_ref, metadata_ref)"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def _authenticate_local(self, context, auth):"},{"line_number":307,"context_line":"        \"\"\"Authenticate against the identity backend and return the auth info."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALn%2F%2FxY0%3D","line":304,"in_reply_to":"AAAALn%2F%2FyUw%3D","updated":"2012-11-07 09:12:42.000000000","message":"Sure, this is something that I also do not like. I\u0027ll try to work on it today.","commit_id":"b558c343ca4b901a02c9fc193c6fa922ccd1279f"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":493,"context_line":"            raise exception.Unauthorized()"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        if not auth_token_data:"},{"line_number":496,"context_line":"            LGO.debug(\"auth_token_data is empty\")"},{"line_number":497,"context_line":"            raise exception.Unauthorized()"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"        if tenant_ref:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fwh8%3D","line":496,"updated":"2012-11-08 03:59:53.000000000","message":"LGO --\u003e LOG","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":493,"context_line":"            raise exception.Unauthorized()"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        if not auth_token_data:"},{"line_number":496,"context_line":"            LGO.debug(\"auth_token_data is empty\")"},{"line_number":497,"context_line":"            raise exception.Unauthorized()"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"        if tenant_ref:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwQE%3D","line":496,"in_reply_to":"AAAALn%2F%2Fwh8%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        if not auth_token_data:"},{"line_number":496,"context_line":"            LGO.debug(\"auth_token_data is empty\")"},{"line_number":497,"context_line":"            raise exception.Unauthorized()"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"        if tenant_ref:"},{"line_number":500,"context_line":"            catalog_ref \u003d self.catalog_api.get_catalog("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwiA%3D","line":497,"updated":"2012-11-08 03:59:53.000000000","message":"confused as to how/why it should get this far and not have already raised Unauthorized? (and obviously this isn\u0027t tested at all, because the typo in 496 would have been hit)","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        if not auth_token_data:"},{"line_number":496,"context_line":"            LGO.debug(\"auth_token_data is empty\")"},{"line_number":497,"context_line":"            raise exception.Unauthorized()"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"        if tenant_ref:"},{"line_number":500,"context_line":"            catalog_ref \u003d self.catalog_api.get_catalog("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwRE%3D","line":497,"in_reply_to":"AAAALn%2F%2FwiA%3D","updated":"2012-11-08 10:45:03.000000000","message":"You\u0027re right we should never arrive here.","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":557,"context_line":"            raise exception.ValidationError("},{"line_number":558,"context_line":"                attribute\u003d\u0027token\u0027, target\u003d\u0027auth\u0027)"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"        old_token \u003d auth[\u0027token\u0027].get(\u0027id\u0027, None)"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"        try:"},{"line_number":563,"context_line":"            old_token_ref \u003d self.token_api.get_token(context\u003dcontext,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fwhs%3D","line":560,"updated":"2012-11-08 03:59:53.000000000","message":"what\u0027s the point of allowing token auth without an id? is that not a ValidationError?","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":557,"context_line":"            raise exception.ValidationError("},{"line_number":558,"context_line":"                attribute\u003d\u0027token\u0027, target\u003d\u0027auth\u0027)"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"        old_token \u003d auth[\u0027token\u0027].get(\u0027id\u0027, None)"},{"line_number":561,"context_line":""},{"line_number":562,"context_line":"        try:"},{"line_number":563,"context_line":"            old_token_ref \u003d self.token_api.get_token(context\u003dcontext,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwR0%3D","line":560,"in_reply_to":"AAAALn%2F%2Fwhs%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":596,"context_line":""},{"line_number":597,"context_line":"        user_id \u003d auth[\u0027passwordCredentials\u0027].get(\u0027userId\u0027, None)"},{"line_number":598,"context_line":"        username \u003d auth[\u0027passwordCredentials\u0027].get(\u0027username\u0027, \u0027\u0027)"},{"line_number":599,"context_line":"        password \u003d auth[\u0027passwordCredentials\u0027].get(\u0027password\u0027, \u0027\u0027)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"        if not user_id and not username:"},{"line_number":602,"context_line":"            raise exception.ValidationError("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fwgc%3D","line":599,"updated":"2012-11-08 03:59:53.000000000","message":"no reason to specify a default of empty string here, because the user may have intended to auth with an empty string. in other words, we can\u0027t distinguish between no password being provided (a validationerror) and an empty password string (a valid request).","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":596,"context_line":""},{"line_number":597,"context_line":"        user_id \u003d auth[\u0027passwordCredentials\u0027].get(\u0027userId\u0027, None)"},{"line_number":598,"context_line":"        username \u003d auth[\u0027passwordCredentials\u0027].get(\u0027username\u0027, \u0027\u0027)"},{"line_number":599,"context_line":"        password \u003d auth[\u0027passwordCredentials\u0027].get(\u0027password\u0027, \u0027\u0027)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"        if not user_id and not username:"},{"line_number":602,"context_line":"            raise exception.ValidationError("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwRM%3D","line":599,"in_reply_to":"AAAALn%2F%2Fwgc%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":603,"context_line":"                attribute\u003d\u0027username or userId\u0027,"},{"line_number":604,"context_line":"                target\u003d\u0027passwordCredentials\u0027)"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"        if not password:"},{"line_number":607,"context_line":"            raise exception.ValidationError("},{"line_number":608,"context_line":"                attribute\u003d\u0027password\u0027,"},{"line_number":609,"context_line":"                target\u003d\u0027passwordCredentials\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fwgo%3D","line":606,"updated":"2012-11-08 03:59:53.000000000","message":"why would an empty password field raise a validationerror? it seems like that\u0027d be up to the driver to judge on user create / user update / auth","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":603,"context_line":"                attribute\u003d\u0027username or userId\u0027,"},{"line_number":604,"context_line":"                target\u003d\u0027passwordCredentials\u0027)"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"        if not password:"},{"line_number":607,"context_line":"            raise exception.ValidationError("},{"line_number":608,"context_line":"                attribute\u003d\u0027password\u0027,"},{"line_number":609,"context_line":"                target\u003d\u0027passwordCredentials\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwRQ%3D","line":606,"in_reply_to":"AAAALn%2F%2Fwgo%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        Returns auth_token_data, (user_ref, tenant_ref, metadata_ref)"},{"line_number":648,"context_line":"        \"\"\""},{"line_number":649,"context_line":"        if not \u0027REMOTE_USER\u0027 in context:"},{"line_number":650,"context_line":"            raise ExternalAuthNotApplicable()"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        user_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fwhc%3D","line":649,"updated":"2012-11-08 03:59:53.000000000","message":"just a bit more readable,\n\n    if \u0027REMOTE_USER\u0027 not in context:","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        Returns auth_token_data, (user_ref, tenant_ref, metadata_ref)"},{"line_number":648,"context_line":"        \"\"\""},{"line_number":649,"context_line":"        if not \u0027REMOTE_USER\u0027 in context:"},{"line_number":650,"context_line":"            raise ExternalAuthNotApplicable()"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        user_ref \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwRU%3D","line":649,"in_reply_to":"AAAALn%2F%2Fwhc%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":649,"context_line":"        if not \u0027REMOTE_USER\u0027 in context:"},{"line_number":650,"context_line":"            raise ExternalAuthNotApplicable()"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        user_ref \u003d None"},{"line_number":653,"context_line":"        tenant_ref \u003d None"},{"line_number":654,"context_line":"        metadata_ref \u003d {}"},{"line_number":655,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwhM%3D","line":652,"updated":"2012-11-08 03:59:53.000000000","message":"why initialize any of these?","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":649,"context_line":"        if not \u0027REMOTE_USER\u0027 in context:"},{"line_number":650,"context_line":"            raise ExternalAuthNotApplicable()"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        user_ref \u003d None"},{"line_number":653,"context_line":"        tenant_ref \u003d None"},{"line_number":654,"context_line":"        metadata_ref \u003d {}"},{"line_number":655,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwRw%3D","line":652,"in_reply_to":"AAAALn%2F%2FwhM%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":653,"context_line":"        tenant_ref \u003d None"},{"line_number":654,"context_line":"        metadata_ref \u003d {}"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        username \u003d context.get(\u0027REMOTE_USER\u0027, None)"},{"line_number":657,"context_line":"        try:"},{"line_number":658,"context_line":"            user_ref \u003d self.identity_api.get_user_by_name("},{"line_number":659,"context_line":"                context\u003dcontext, user_name\u003dusername)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwhQ%3D","line":656,"updated":"2012-11-08 03:59:53.000000000","message":"you already tested for this in 649","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":653,"context_line":"        tenant_ref \u003d None"},{"line_number":654,"context_line":"        metadata_ref \u003d {}"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        username \u003d context.get(\u0027REMOTE_USER\u0027, None)"},{"line_number":657,"context_line":"        try:"},{"line_number":658,"context_line":"            user_ref \u003d self.identity_api.get_user_by_name("},{"line_number":659,"context_line":"                context\u003dcontext, user_name\u003dusername)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwRs%3D","line":656,"in_reply_to":"AAAALn%2F%2FwhQ%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":683,"context_line":""},{"line_number":684,"context_line":"    def _get_tenant_id_from_auth(self, context, auth):"},{"line_number":685,"context_line":"        \"\"\"Return a valid tenant_id or None from auth dict\"\"\""},{"line_number":686,"context_line":"        tenant_id \u003d auth.get(\u0027tenantId\u0027, None)"},{"line_number":687,"context_line":"        tenant_name \u003d auth.get(\u0027tenantName\u0027, None)"},{"line_number":688,"context_line":"        if tenant_name:"},{"line_number":689,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fwg4%3D","line":686,"updated":"2012-11-08 03:59:53.000000000","message":"docstr indicates that this will return a valid tenantId, but:\n\nA) None is not a valid tenant_id\n\nB) tenant_id isn\u0027t tested to be a valid","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":695,"context_line":"        return tenant_id"},{"line_number":696,"context_line":""},{"line_number":697,"context_line":"    def _get_tenant_ref(self, context, user_id, tenant_id):"},{"line_number":698,"context_line":"        \"\"\"Returns the tenant_ref for the user\u0027s tenant\"\"\""},{"line_number":699,"context_line":"        tenant_ref \u003d None"},{"line_number":700,"context_line":"        if tenant_id:"},{"line_number":701,"context_line":"            tenants \u003d self.identity_api.get_tenants_for_user(context, user_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fwgw%3D","line":698,"updated":"2012-11-08 03:59:53.000000000","message":"maybe merge this with the above method, so we only have to validate \u0026 fetch a tenant_ref once","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5f1600b4d278772b62f446fb75bc82bbb9ee0fad","unresolved":false,"context_lines":[{"line_number":603,"context_line":""},{"line_number":604,"context_line":"        password \u003d auth[\u0027passwordCredentials\u0027][\u0027password\u0027]"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"        if not user_id and not username:"},{"line_number":607,"context_line":"            raise exception.ValidationError("},{"line_number":608,"context_line":"                attribute\u003d\u0027username or userId\u0027,"},{"line_number":609,"context_line":"                target\u003d\u0027passwordCredentials\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALn%2F%2Fv5M%3D","line":606,"updated":"2012-11-08 16:53:38.000000000","message":"update this to use the same pattern as you did for password, which is much more reliable (if username not in passwordcredentials and userId not in passwordcredentials... raise validationerror)\n\nthe separation of request validation from request processing looks good","commit_id":"ffec00dae24f68b05a93254fa4a4f994aa5408d6"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"7ec48a319c3a318139084fbcbaf0b962d3c034dd","unresolved":false,"context_lines":[{"line_number":603,"context_line":""},{"line_number":604,"context_line":"        password \u003d auth[\u0027passwordCredentials\u0027][\u0027password\u0027]"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"        if not user_id and not username:"},{"line_number":607,"context_line":"            raise exception.ValidationError("},{"line_number":608,"context_line":"                attribute\u003d\u0027username or userId\u0027,"},{"line_number":609,"context_line":"                target\u003d\u0027passwordCredentials\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALn%2F%2FvEQ%3D","line":606,"in_reply_to":"AAAALn%2F%2Fv5M%3D","updated":"2012-11-09 09:01:25.000000000","message":"Done","commit_id":"ffec00dae24f68b05a93254fa4a4f994aa5408d6"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5f1600b4d278772b62f446fb75bc82bbb9ee0fad","unresolved":false,"context_lines":[{"line_number":674,"context_line":"                         expires\u003dexpiry))"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"    def _get_tenant_id_from_auth(self, context, auth):"},{"line_number":677,"context_line":"        \"\"\"Extrat tenant information fom auth dict."},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        Returns a valid tenant_id if it exists, or None if not specified.\"\"\""},{"line_number":680,"context_line":"        tenant_id \u003d auth.get(\u0027tenantId\u0027, None)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALn%2F%2Fv5U%3D","line":677,"updated":"2012-11-08 16:53:38.000000000","message":"extract, from","commit_id":"ffec00dae24f68b05a93254fa4a4f994aa5408d6"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"7ec48a319c3a318139084fbcbaf0b962d3c034dd","unresolved":false,"context_lines":[{"line_number":674,"context_line":"                         expires\u003dexpiry))"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"    def _get_tenant_id_from_auth(self, context, auth):"},{"line_number":677,"context_line":"        \"\"\"Extrat tenant information fom auth dict."},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        Returns a valid tenant_id if it exists, or None if not specified.\"\"\""},{"line_number":680,"context_line":"        tenant_id \u003d auth.get(\u0027tenantId\u0027, None)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALn%2F%2FvEM%3D","line":677,"in_reply_to":"AAAALn%2F%2Fv5U%3D","updated":"2012-11-09 09:01:25.000000000","message":"Done","commit_id":"ffec00dae24f68b05a93254fa4a4f994aa5408d6"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5f1600b4d278772b62f446fb75bc82bbb9ee0fad","unresolved":false,"context_lines":[{"line_number":676,"context_line":"    def _get_tenant_id_from_auth(self, context, auth):"},{"line_number":677,"context_line":"        \"\"\"Extrat tenant information fom auth dict."},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        Returns a valid tenant_id if it exists, or None if not specified.\"\"\""},{"line_number":680,"context_line":"        tenant_id \u003d auth.get(\u0027tenantId\u0027, None)"},{"line_number":681,"context_line":"        tenant_name \u003d auth.get(\u0027tenantName\u0027, None)"},{"line_number":682,"context_line":"        if tenant_name:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALn%2F%2Fv5Q%3D","line":679,"updated":"2012-11-08 16:53:38.000000000","message":"blank line at end of multiline docstr (see HACKING)","commit_id":"ffec00dae24f68b05a93254fa4a4f994aa5408d6"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"7ec48a319c3a318139084fbcbaf0b962d3c034dd","unresolved":false,"context_lines":[{"line_number":676,"context_line":"    def _get_tenant_id_from_auth(self, context, auth):"},{"line_number":677,"context_line":"        \"\"\"Extrat tenant information fom auth dict."},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        Returns a valid tenant_id if it exists, or None if not specified.\"\"\""},{"line_number":680,"context_line":"        tenant_id \u003d auth.get(\u0027tenantId\u0027, None)"},{"line_number":681,"context_line":"        tenant_name \u003d auth.get(\u0027tenantName\u0027, None)"},{"line_number":682,"context_line":"        if tenant_name:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALn%2F%2FvEI%3D","line":679,"in_reply_to":"AAAALn%2F%2Fv5Q%3D","updated":"2012-11-09 09:01:25.000000000","message":"Done","commit_id":"ffec00dae24f68b05a93254fa4a4f994aa5408d6"}],"tests/test_service.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from keystone.identity.backends import kvs as kvs_identity"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _build_user_auth(username, passwd, tenant):"},{"line_number":25,"context_line":"    auth_json \u003d {\u0027passwordCredentials\u0027: {}}"},{"line_number":26,"context_line":"    if username is not None:"},{"line_number":27,"context_line":"        auth_json[\u0027passwordCredentials\u0027][\u0027username\u0027] \u003d username"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwkY%3D","line":24,"updated":"2012-11-08 03:59:53.000000000","message":"should differentiate between tenant_id and tenant_name","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from keystone.identity.backends import kvs as kvs_identity"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _build_user_auth(username, passwd, tenant):"},{"line_number":25,"context_line":"    auth_json \u003d {\u0027passwordCredentials\u0027: {}}"},{"line_number":26,"context_line":"    if username is not None:"},{"line_number":27,"context_line":"        auth_json[\u0027passwordCredentials\u0027][\u0027username\u0027] \u003d username"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwQs%3D","line":24,"in_reply_to":"AAAALn%2F%2FwkY%3D","updated":"2012-11-08 10:45:03.000000000","message":"This function was just renamed from the previous implementation. I agree with you though.","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _build_user_auth(username, passwd, tenant):"},{"line_number":25,"context_line":"    auth_json \u003d {\u0027passwordCredentials\u0027: {}}"},{"line_number":26,"context_line":"    if username is not None:"},{"line_number":27,"context_line":"        auth_json[\u0027passwordCredentials\u0027][\u0027username\u0027] \u003d username"},{"line_number":28,"context_line":"    if passwd is not None:"},{"line_number":29,"context_line":"        auth_json[\u0027passwordCredentials\u0027][\u0027password\u0027] \u003d passwd"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fwkk%3D","line":26,"updated":"2012-11-08 03:59:53.000000000","message":"if None is an expected value, the function should just accept kwargs with defaults of username\u003dNone, etc","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def _build_user_auth(username, passwd, tenant):"},{"line_number":25,"context_line":"    auth_json \u003d {\u0027passwordCredentials\u0027: {}}"},{"line_number":26,"context_line":"    if username is not None:"},{"line_number":27,"context_line":"        auth_json[\u0027passwordCredentials\u0027][\u0027username\u0027] \u003d username"},{"line_number":28,"context_line":"    if passwd is not None:"},{"line_number":29,"context_line":"        auth_json[\u0027passwordCredentials\u0027][\u0027password\u0027] \u003d passwd"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwPs%3D","line":26,"in_reply_to":"AAAALn%2F%2Fwkk%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    if passwd is not None:"},{"line_number":29,"context_line":"        auth_json[\u0027passwordCredentials\u0027][\u0027password\u0027] \u003d passwd"},{"line_number":30,"context_line":"    if tenant is not None:"},{"line_number":31,"context_line":"        auth_json[\u0027tenantName\u0027] \u003d tenant"},{"line_number":32,"context_line":"    return auth_json"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwkU%3D","line":31,"updated":"2012-11-08 03:59:53.000000000","message":"(without a docstr / reading the impl, i would have assume that \u0027tenant\u0027 here is a \u0027tenant_id\u0027, as it\u0027s the unique identifier _","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    if passwd is not None:"},{"line_number":29,"context_line":"        auth_json[\u0027passwordCredentials\u0027][\u0027password\u0027] \u003d passwd"},{"line_number":30,"context_line":"    if tenant is not None:"},{"line_number":31,"context_line":"        auth_json[\u0027tenantName\u0027] \u003d tenant"},{"line_number":32,"context_line":"    return auth_json"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwPo%3D","line":31,"in_reply_to":"AAAALn%2F%2FwkU%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def test_unscoped_token(self):"},{"line_number":66,"context_line":"        \"\"\"Verify getting an unscoped token with password creds\"\"\""},{"line_number":67,"context_line":"        body_dict \u003d _build_user_auth(\u0027FOO\u0027, \u0027foo2\u0027, None)"},{"line_number":68,"context_line":"        unscoped_token \u003d self.api.authenticate({}, body_dict)"},{"line_number":69,"context_line":"        tenant \u003d unscoped_token[\"access\"][\"token\"].get(\"tenant\", None)"},{"line_number":70,"context_line":"        self.assertEqual(tenant, None)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwkM%3D","line":67,"updated":"2012-11-08 03:59:53.000000000","message":"continuing the above, arguments like these make it difficult to read what\u0027s being tested at a glance, without knowing the impl of _build_user_auth","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def test_unscoped_token(self):"},{"line_number":66,"context_line":"        \"\"\"Verify getting an unscoped token with password creds\"\"\""},{"line_number":67,"context_line":"        body_dict \u003d _build_user_auth(\u0027FOO\u0027, \u0027foo2\u0027, None)"},{"line_number":68,"context_line":"        unscoped_token \u003d self.api.authenticate({}, body_dict)"},{"line_number":69,"context_line":"        tenant \u003d unscoped_token[\"access\"][\"token\"].get(\"tenant\", None)"},{"line_number":70,"context_line":"        self.assertEqual(tenant, None)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwQQ%3D","line":67,"in_reply_to":"AAAALn%2F%2FwkM%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_auth_invalid_token(self):"},{"line_number":73,"context_line":"        \"\"\"Verify exception is raised if invalid token\"\"\""},{"line_number":74,"context_line":"        body_dict \u003d {\"token\": {\"id\": \"foobar\"}}"},{"line_number":75,"context_line":"        self.assertRaises("},{"line_number":76,"context_line":"            exception.Unauthorized,"},{"line_number":77,"context_line":"            self.api.authenticate,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwkA%3D","line":74,"updated":"2012-11-08 03:59:53.000000000","message":"would prefer to see uuid.uuid4().hex used to indicate arbitrary values -- I have absolutely no idea which of \u0027FOO\u0027, \u0027foo2\u0027 and \u0027foobar\u0027 are expected to be valid values.","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_auth_invalid_token(self):"},{"line_number":73,"context_line":"        \"\"\"Verify exception is raised if invalid token\"\"\""},{"line_number":74,"context_line":"        body_dict \u003d {\"token\": {\"id\": \"foobar\"}}"},{"line_number":75,"context_line":"        self.assertRaises("},{"line_number":76,"context_line":"            exception.Unauthorized,"},{"line_number":77,"context_line":"            self.api.authenticate,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwQM%3D","line":74,"in_reply_to":"AAAALn%2F%2FwkA%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def test_auth_invalid_user(self):"},{"line_number":81,"context_line":"        \"\"\"Verify exception is raised if invalid user\"\"\""},{"line_number":82,"context_line":"        body_dict \u003d _build_user_auth(\"bazonk\", \"fingler\", None)"},{"line_number":83,"context_line":"        self.assertRaises("},{"line_number":84,"context_line":"            exception.Unauthorized,"},{"line_number":85,"context_line":"            self.api.authenticate,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fwj8%3D","line":82,"updated":"2012-11-08 03:59:53.000000000","message":"same here, what about this user is invalid such that auth should fail?","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def test_auth_invalid_user(self):"},{"line_number":81,"context_line":"        \"\"\"Verify exception is raised if invalid user\"\"\""},{"line_number":82,"context_line":"        body_dict \u003d _build_user_auth(\"bazonk\", \"fingler\", None)"},{"line_number":83,"context_line":"        self.assertRaises("},{"line_number":84,"context_line":"            exception.Unauthorized,"},{"line_number":85,"context_line":"            self.api.authenticate,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwQI%3D","line":82,"in_reply_to":"AAAALn%2F%2Fwj8%3D","updated":"2012-11-08 10:45:03.000000000","message":"Done","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"12234427f86858846e2c4b2ca83073c34e19836f","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            _build_user_auth(\u0027FOO\u0027, \u0027foo2\u0027, None))"},{"line_number":180,"context_line":"        remote_token \u003d self.api.authenticate("},{"line_number":181,"context_line":"            {\u0027REMOTE_USER\u0027: \u0027FOO\u0027},"},{"line_number":182,"context_line":"            _build_user_auth(\u0027FOO\u0027, \u0027nosir\u0027, None))"},{"line_number":183,"context_line":"        self.assertEqualTokens(local_token, remote_token)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def test_unscoped_remote_authn_jsonless(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2Fwjo%3D","line":182,"updated":"2012-11-08 03:59:53.000000000","message":"what is \u0027nosir\u0027?","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"087e58f712d5c6b09ea38a08130ce87ad65c052e","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            _build_user_auth(\u0027FOO\u0027, \u0027foo2\u0027, None))"},{"line_number":180,"context_line":"        remote_token \u003d self.api.authenticate("},{"line_number":181,"context_line":"            {\u0027REMOTE_USER\u0027: \u0027FOO\u0027},"},{"line_number":182,"context_line":"            _build_user_auth(\u0027FOO\u0027, \u0027nosir\u0027, None))"},{"line_number":183,"context_line":"        self.assertEqualTokens(local_token, remote_token)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def test_unscoped_remote_authn_jsonless(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAALn%2F%2FwQw%3D","line":182,"in_reply_to":"AAAALn%2F%2Fwjo%3D","updated":"2012-11-08 10:45:03.000000000","message":"I\u0027ve adjusted all of these.","commit_id":"849ebeff2a2e65658865b6bdcd8b4488cfda0907"},{"author":{"_account_id":1955,"name":"Alan Pevec","email":"alan.pevec@redhat.com","username":"apevec"},"change_message_id":"488d592792ea6e3bcc4c123273be1c7fdb221307","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        \"\"\"Assert that two tokens are equal."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        Compare two tokens except for their ids. This also truncates"},{"line_number":59,"context_line":"        the time in the comparison."},{"line_number":60,"context_line":"        \"\"\""},{"line_number":61,"context_line":"        def normalize(token):"},{"line_number":62,"context_line":"            token[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d \u0027dummy\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAMH%2F%2F50E%3D","line":59,"updated":"2012-11-16 09:19:21.000000000","message":"This is a regression from Change-Id: I45a1167a473df02a4461286b8a09723315018fcb\nwhere \u0027issued_at\u0027 was changed to timeutils.strtime()\n\nIt should use assertCloseEnoughForGovernmentWork instead of [:-8] truncation!","commit_id":"be754ff2bc05a0d262469edd7ce8fac19d457231"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"9cbacbcb90f8a35c0d5c1dccdd91b9e31e53bd93","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        \"\"\"Assert that two tokens are equal."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        Compare two tokens except for their ids. This also truncates"},{"line_number":59,"context_line":"        the time in the comparison."},{"line_number":60,"context_line":"        \"\"\""},{"line_number":61,"context_line":"        def normalize(token):"},{"line_number":62,"context_line":"            token[\u0027access\u0027][\u0027token\u0027][\u0027id\u0027] \u003d \u0027dummy\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAMH%2F%2F5zU%3D","line":59,"in_reply_to":"AAAAMH%2F%2F50E%3D","updated":"2012-11-16 09:43:03.000000000","message":"Done in Change-Id: I14311f56e6dd0103620b58e64bf0c78c7e32f61c","commit_id":"be754ff2bc05a0d262469edd7ce8fac19d457231"}]}
