)]}'
{"keystoneauth/auth/identity/v3/__init__.py":[{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"04c83e35ec838eda72db5999e012bf5bda54a002","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from keystoneauth.auth.identity.v3.base import *  # noqa"},{"line_number":14,"context_line":"from keystoneauth.auth.identity.v3.federation import *  # noqa"},{"line_number":15,"context_line":"from keystoneauth.auth.identity.v3.password import *  # noqa"},{"line_number":16,"context_line":"from keystoneauth.auth.identity.v3.token import *  # noqa"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"__all__ \u003d [\u0027Auth\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_aa3e9225","line":16,"updated":"2015-06-10 07:43:12.000000000","message":"you\u0027ll need to import the k2k file to export it from __all__","commit_id":"64499b2fcce5199322206fdc8ebd604d1664d439"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"3b1176f9525caa27c164f798deaadf8288ae5c24","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from keystoneauth.auth.identity.v3.base import *  # noqa"},{"line_number":14,"context_line":"from keystoneauth.auth.identity.v3.federation import *  # noqa"},{"line_number":15,"context_line":"from keystoneauth.auth.identity.v3.password import *  # noqa"},{"line_number":16,"context_line":"from keystoneauth.auth.identity.v3.token import *  # noqa"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"__all__ \u003d [\u0027Auth\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_dc8bca1d","line":16,"in_reply_to":"3afb71cf_aa3e9225","updated":"2015-06-10 14:25:45.000000000","message":"Done","commit_id":"64499b2fcce5199322206fdc8ebd604d1664d439"}],"keystoneauth/auth/identity/v3/federation.py":[{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"5b1eef9ed70e1faf808bd5a23db061fa2c8f1005","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        \"\"\"Fetch unscoped federated token.\"\"\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class Keystone2KeystoneAuthPlugin(base.BaseAuth):"},{"line_number":119,"context_line":"    \"\"\"Plugin to execute the keystone to keyestone authentication flow."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    In this plugin, an ECP wrapped SAML assertion provided by a keystone"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_1e48fd5a","line":118,"updated":"2015-06-04 21:54:26.000000000","message":"Initial comments.\n\nI think we should treat this plugin as something extra and something new (not to be used as OS_AUTH_PLUGIN or whatever we have today). I can imagine a situation where user normally uses his local cloud, with his local-auth plugin of choice (say, password for now), where he scopes his token to a local project and so on. Basically stuff people do today. \nNow, suddently, the user decides to burst into remote cloud - he should indicate that such action should be executed, and only then this plugin should be executed, accepting existing local auth plugin as a parameter (we already have it), because this is where a local scoped token and service providers list are,. But it should also accept scope for remote cloud - project, domain, trust, whatever.\n\nI\u0027d be happy to see this plugins structure more like FederationBaseAuth, so with methos like get_unscoped_auth_ref _get_scoping_data and so on.\n\nLet\u0027s also try imagining how to make it easily consumable from wrappers like OSC.","commit_id":"4022e013afb8a03de260feaa54db565dd084370f"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"f62ff9d30be13e0e5307359732cbf92f58209dcc","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        self._sp_response \u003d None"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    @classmethod"},{"line_number":162,"context_line":"    def remote_auth_url(cls, auth_url):"},{"line_number":163,"context_line":"        \"\"\"Return auth_url of the remote OpenStack cloud."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        Remote cloud\u0027s auth_url is an endpoint for getting federated unscoped"}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_13509a5c","line":162,"updated":"2015-06-08 15:42:23.000000000","message":"why do you have this method since we are passing the sp_auth_url?\n\nbesides that, why the \"auth_url\" is from the remote keystone instead of the local keystone? We are always going to execute the whole flow (get ecp assertion, send to remote cloud and so son) when the token expires.","commit_id":"f0afda34ae7c6f89b3e392bf6d2cbad6f2178684"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"eb5c7da7a57007ef0a3bd64cca24b4f1b71837bf","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        self._sp_response \u003d None"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    @classmethod"},{"line_number":162,"context_line":"    def remote_auth_url(cls, auth_url):"},{"line_number":163,"context_line":"        \"\"\"Return auth_url of the remote OpenStack cloud."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        Remote cloud\u0027s auth_url is an endpoint for getting federated unscoped"}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_26658be0","line":162,"in_reply_to":"3afb71cf_13509a5c","updated":"2015-06-08 21:29:20.000000000","message":"auth_url is from the remote keystone, because it\u0027s the _local_plugin object that has all the information (local auth_url, scoping information etc), and this plugin is for connecting, getting unscoped and scoped token from the remote cloud.\nWe need this method because sp_auth_url is a federation auth_url e.g. https://keystone:5000/v3/OS-FEDERATION/identity_providers/blah/protocols/blah/auth . No that\u0027s enough to get an unscoped token, but how do we get scoped token? We need to hit proper auth_url, https://keystone:5000/v3/auth/tokens. This is also a reason why i insist on storing remote\u0027s cloud endpoint in the auth_url in K2KAuthPlugin. Take a look at a patch one level up where I added functionality for automated scoping the token. It works pretty much like FederationBaseAuthPlugin class, so from user perspective all the details (ecp, unscoped fed token, scoping the token) are hidden.","commit_id":"f0afda34ae7c6f89b3e392bf6d2cbad6f2178684"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"0fcbff1705f5c3407229f7b5bfb7bc2395843fe1","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def __init__(self, base_plugin, service_provider, sp_url, sp_auth_url):"},{"line_number":152,"context_line":"        super(Keystone2KeystoneAuthPlugin, self).__init__("},{"line_number":153,"context_line":"            auth_url\u003dself.remote_auth_url(sp_auth_url))"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        self._base_plugin \u003d base_plugin"},{"line_number":156,"context_line":"        self.sp_id \u003d service_provider"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_5c485687","line":153,"updated":"2015-06-08 20:44:59.000000000","message":"should add a comment somewhere to specify why we have this auth_url","commit_id":"08f6e6c589963daa7e8f5906a4036bcdbc8d4347"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"0fcbff1705f5c3407229f7b5bfb7bc2395843fe1","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        PATTERN \u003d \u0027/v3/OS-FEDERATION/\u0027"},{"line_number":184,"context_line":"        index \u003d len(auth_url)"},{"line_number":185,"context_line":"        try:"},{"line_number":186,"context_line":"            index \u003d auth_url.index(PATTERN)"},{"line_number":187,"context_line":"        except ValueError:"},{"line_number":188,"context_line":"            return auth_url"},{"line_number":189,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_a2004402","line":186,"updated":"2015-06-08 20:44:59.000000000","message":"why not simplify this with a conditional? something like:\n\n  index \u003d auth_url.index(PATTERN) if PATTERN in auth_url else len(auth_url)\n  return auth_url[:index]","commit_id":"08f6e6c589963daa7e8f5906a4036bcdbc8d4347"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"ec3d6802d86a76ae032aacf6e18f35ecf2b0920e","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        PATTERN \u003d \u0027/v3/OS-FEDERATION/\u0027"},{"line_number":184,"context_line":"        index \u003d len(auth_url)"},{"line_number":185,"context_line":"        try:"},{"line_number":186,"context_line":"            index \u003d auth_url.index(PATTERN)"},{"line_number":187,"context_line":"        except ValueError:"},{"line_number":188,"context_line":"            return auth_url"},{"line_number":189,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_c8ffe1a8","line":186,"in_reply_to":"3afb71cf_a2004402","updated":"2015-06-08 21:33:48.000000000","message":"because you would be looking for a substring PATTERN in auth_url, and if it is there you would call index() and look for it again. If you want it shorter, then find() is probably better.","commit_id":"08f6e6c589963daa7e8f5906a4036bcdbc8d4347"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"0fcbff1705f5c3407229f7b5bfb7bc2395843fe1","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    def get_options(cls):"},{"line_number":209,"context_line":"        # TODO(rodrigods): this is not a regular plugin - it contains another"},{"line_number":210,"context_line":"        # plugin. So we may use any AuthPlugin to authenticate and then pass"},{"line_number":211,"context_line":"        # to this one in order to request a token from ta Service Provider."},{"line_number":212,"context_line":"        options \u003d super(Keystone2KeystoneAuthPlugin, cls).get_options()"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        options.extend(["}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_829f88b3","line":211,"updated":"2015-06-08 20:44:59.000000000","message":"because of this TODO we should mark this as WIP, maybe ask for jamielennox help for this?","commit_id":"08f6e6c589963daa7e8f5906a4036bcdbc8d4347"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"ec3d6802d86a76ae032aacf6e18f35ecf2b0920e","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    def get_options(cls):"},{"line_number":209,"context_line":"        # TODO(rodrigods): this is not a regular plugin - it contains another"},{"line_number":210,"context_line":"        # plugin. So we may use any AuthPlugin to authenticate and then pass"},{"line_number":211,"context_line":"        # to this one in order to request a token from ta Service Provider."},{"line_number":212,"context_line":"        options \u003d super(Keystone2KeystoneAuthPlugin, cls).get_options()"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        options.extend(["}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_c816c1f0","line":211,"in_reply_to":"3afb71cf_829f88b3","updated":"2015-06-08 21:33:48.000000000","message":"allright, but what is wrong with that for now? you will create local auth plugin somewhere else....","commit_id":"08f6e6c589963daa7e8f5906a4036bcdbc8d4347"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"607a6b55ad6e3b160dd0e5ffb50038cb5729555f","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        \"\"\"Fetch unscoped federated token.\"\"\""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"class Keystone2KeystoneAuthPlugin(base.BaseAuth):"},{"line_number":120,"context_line":"    \"\"\"Plugin to execute the keystone to keyestone authentication flow."},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    In this plugin, an ECP wrapped SAML assertion provided by a keystone"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_9a46bd4d","line":119,"updated":"2015-06-09 07:59:12.000000000","message":"nit: put this in another file.","commit_id":"1c3c96c89fb9209b06aa0bddac95e7f06d208372"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"607a6b55ad6e3b160dd0e5ffb50038cb5729555f","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    PAOS_HEADER \u003d \u0027application/vnd.paos+xml\u0027"},{"line_number":149,"context_line":"    ECP_SP_SAML2_REQUEST_HEADERS \u003d {\u0027Content-Type\u0027: PAOS_HEADER}"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def __init__(self, base_plugin, service_provider, sp_url, sp_auth_url):"},{"line_number":152,"context_line":"        super(Keystone2KeystoneAuthPlugin, self).__init__("},{"line_number":153,"context_line":"            auth_url\u003dself.remote_auth_url(sp_auth_url))"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_173e26da","line":151,"updated":"2015-06-09 07:59:12.000000000","message":"why sp_url and sp_auth_url? wouldn\u0027t these come from the accessinfo of the base plugin?","commit_id":"1c3c96c89fb9209b06aa0bddac95e7f06d208372"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"be5da0fd027ff513c4f907e21e93cce15fe8a37a","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                  scoped."},{"line_number":180,"context_line":"        :rtype: string"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        PATTERN \u003d \u0027/v3/OS-FEDERATION/\u0027"},{"line_number":184,"context_line":"        index \u003d len(auth_url)"},{"line_number":185,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_c8490f62","line":182,"updated":"2015-06-09 08:49:50.000000000","message":"return auth_url.replace(\u0027/v3/OS-FEDERATION\u0027, \u0027\u0027)","commit_id":"1c3c96c89fb9209b06aa0bddac95e7f06d208372"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"d327bbba5bfa5e38c126b838004091fcd67437ad","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                  scoped."},{"line_number":180,"context_line":"        :rtype: string"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        PATTERN \u003d \u0027/v3/OS-FEDERATION/\u0027"},{"line_number":184,"context_line":"        index \u003d len(auth_url)"},{"line_number":185,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_e91f2d06","line":182,"in_reply_to":"3afb71cf_c8490f62","updated":"2015-06-09 12:37:23.000000000","message":"there is /v3/OS-FEDERATION/identity_providers/\u003cSOMETHING\u003eprotocols/\u003cSOMETHING\u003e/auth and we want to cut off whole pattern only starting with /v3/OS-FEDERATION","commit_id":"1c3c96c89fb9209b06aa0bddac95e7f06d208372"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"d327bbba5bfa5e38c126b838004091fcd67437ad","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    def get_options(cls):"},{"line_number":209,"context_line":"        # TODO(rodrigods): this is not a regular plugin - it contains another"},{"line_number":210,"context_line":"        # plugin. So we may use any AuthPlugin to authenticate and then pass"},{"line_number":211,"context_line":"        # to this one in order to request a token from ta Service Provider."},{"line_number":212,"context_line":"        options \u003d super(Keystone2KeystoneAuthPlugin, cls).get_options()"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        options.extend(["}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_094289ae","line":211,"updated":"2015-06-09 12:37:23.000000000","message":"i don\u0027t see anything pending here.","commit_id":"1c3c96c89fb9209b06aa0bddac95e7f06d208372"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"a9ca1b913bea13e7b69a6697b58be463b45bb38d","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        options \u003d super(Keystone2KeystoneAuthPlugin, cls).get_options()"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        options.extend(["},{"line_number":215,"context_line":"            cfg.StrOpt(\"service-provider\", help\u003d\"Service Provider\u0027s ID\"),"},{"line_number":216,"context_line":"            cfg.StrOpt(\"sp-url\", help\u003d\"Service Provider\u0027s URL\"),"},{"line_number":217,"context_line":"            cfg.StrOpt(\"sp-auth-url\","},{"line_number":218,"context_line":"                       help\u003d\"Service Provider\u0027s Authentication URL\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_3dcfc32a","line":215,"updated":"2015-06-09 08:39:16.000000000","message":"required\u003dTrue - though it doesn\u0027t do anything yet","commit_id":"1c3c96c89fb9209b06aa0bddac95e7f06d208372"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"d327bbba5bfa5e38c126b838004091fcd67437ad","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        options \u003d super(Keystone2KeystoneAuthPlugin, cls).get_options()"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        options.extend(["},{"line_number":215,"context_line":"            cfg.StrOpt(\"service-provider\", help\u003d\"Service Provider\u0027s ID\"),"},{"line_number":216,"context_line":"            cfg.StrOpt(\"sp-url\", help\u003d\"Service Provider\u0027s URL\"),"},{"line_number":217,"context_line":"            cfg.StrOpt(\"sp-auth-url\","},{"line_number":218,"context_line":"                       help\u003d\"Service Provider\u0027s Authentication URL\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_6919fdd6","line":215,"in_reply_to":"3afb71cf_3dcfc32a","updated":"2015-06-09 12:37:23.000000000","message":"Done","commit_id":"1c3c96c89fb9209b06aa0bddac95e7f06d208372"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"be5da0fd027ff513c4f907e21e93cce15fe8a37a","unresolved":false,"context_lines":[{"line_number":262,"context_line":"            msg \u003d msg % {\u0027status_code\u0027: resp.status_code, \u0027err\u0027: resp.reason}"},{"line_number":263,"context_line":"            raise exceptions.AuthorizationFailure(msg)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        validate_ecp(resp)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        return str(resp.text)"},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_48075f18","line":265,"updated":"2015-06-09 08:49:50.000000000","message":"why is this a function rather than just inline?","commit_id":"1c3c96c89fb9209b06aa0bddac95e7f06d208372"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"607a6b55ad6e3b160dd0e5ffb50038cb5729555f","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        :param session: a session object to send out HTTP requests."},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        \"\"\""},{"line_number":304,"context_line":"        if not self._sp_response or self._needs_reauthenticate():"},{"line_number":305,"context_line":"            # Store the Service Provider response to prevent re-posting the"},{"line_number":306,"context_line":"            # ECP wrapped assertion a 2nd time"},{"line_number":307,"context_line":"            self._sp_response \u003d ("}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_3a7a2978","line":304,"updated":"2015-06-09 07:59:12.000000000","message":"I\u0027m not sure why you are caching here. This will only get called when the plugin needs to get a new token - so most likely _needs_reauthenticate() is true. \n\nWhat are you protecting?","commit_id":"1c3c96c89fb9209b06aa0bddac95e7f06d208372"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"53d9ef2ae7251983cb999b9c759abf4195705c9d","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            # ECP wrapped assertion a 2nd time"},{"line_number":307,"context_line":"            self._sp_response \u003d ("},{"line_number":308,"context_line":"                self._send_service_provider_ecp_authn_response(session))"},{"line_number":309,"context_line":"            return self._sp_response"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    def get_auth_ref(self, session, **kwargs):"},{"line_number":312,"context_line":"        response \u003d self._get_unscoped_token(session)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_3d07c319","line":309,"updated":"2015-06-09 08:22:37.000000000","message":"nothing is being returned here if the initial statement doesn\u0027t isn\u0027t true.","commit_id":"1c3c96c89fb9209b06aa0bddac95e7f06d208372"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"5c999451d21c15bfa1bd20cb64c89adfb243a124","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        \"\"\"Fetch unscoped federated token.\"\"\""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"class Keystone2KeystoneAuthPlugin(base.BaseAuth):"},{"line_number":120,"context_line":"    \"\"\"Plugin to execute the keystone to keyestone authentication flow."},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    In this plugin, an ECP wrapped SAML assertion provided by a keystone"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_8e609802","line":119,"updated":"2015-06-09 23:23:59.000000000","message":"put this in another file","commit_id":"e2dbe638d06ea0b3de40690f757f928f7b0a491f"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"5c999451d21c15bfa1bd20cb64c89adfb243a124","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    :param base_plugin: Auth plugin already authenticated against the keystone"},{"line_number":127,"context_line":"                        IdP."},{"line_number":128,"context_line":"    :type base_plugin: ``keystoneauth.auth.v3.base.BaseAuth``"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    :param service_provider: The Service Provider ID."},{"line_number":131,"context_line":"    :type sp_id: string"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_e905c610","line":128,"updated":"2015-06-09 23:23:59.000000000","message":"it doesn\u0027t have to be a v3.base.BaseAuth, it can be any plugin, it just has to implement the get_sp_auth_url etc functions and this plugin should handle it if it doesn\u0027t","commit_id":"e2dbe638d06ea0b3de40690f757f928f7b0a491f"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"5c999451d21c15bfa1bd20cb64c89adfb243a124","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.sp_auth_url \u003d self._local_cloud_plugin.get_sp_auth_url(session,"},{"line_number":161,"context_line":"                                                                    self.sp_id)"},{"line_number":162,"context_line":"        self.sp_url \u003d self._local_cloud_plugin.get_sp_url(session, self.sp_id)"},{"line_number":163,"context_line":"        self.auth_url \u003d self._remote_auth_url(self.sp_auth_url)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @classmethod"},{"line_number":166,"context_line":"    def _remote_auth_url(cls, auth_url):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_8943f241","line":163,"updated":"2015-06-09 23:23:59.000000000","message":"i really dislike this pattern of saving variables on the object that aren\u0027t going to be relevant for long. Partially because it leaves variables around and it\u0027s not thread safe.\n\nThey should just be returned and kept local to the function.\n\nIs a user supposed to be able to see these - why are they public?","commit_id":"e2dbe638d06ea0b3de40690f757f928f7b0a491f"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"5c999451d21c15bfa1bd20cb64c89adfb243a124","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    def get_ecp_assertion(self, session):"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        def validate_ecp(resp):"},{"line_number":248,"context_line":"            if resp.headers[\u0027Content-Type\u0027] !\u003d self.PAOS_HEADER:"},{"line_number":249,"context_line":"                raise exceptions.InvalidResponse(resp)"},{"line_number":250,"context_line":"            if not resp.text:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_c96b2ab8","line":247,"updated":"2015-06-09 23:23:59.000000000","message":"why is this a inner function? why not just have it inline?","commit_id":"e2dbe638d06ea0b3de40690f757f928f7b0a491f"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"3c83d5d6457aef2cf53f7f8613c1b727b1340407","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    def get_ecp_assertion(self, session):"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        def validate_ecp(resp):"},{"line_number":248,"context_line":"            if resp.headers[\u0027Content-Type\u0027] !\u003d self.PAOS_HEADER:"},{"line_number":249,"context_line":"                raise exceptions.InvalidResponse(resp)"},{"line_number":250,"context_line":"            if not resp.text:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_478a771c","line":247,"in_reply_to":"3afb71cf_c96b2ab8","updated":"2015-06-10 14:48:56.000000000","message":"it makes sense to move such validations out of the main stream of the logic. \nin the methods like get_ecp_assertion main steps are :send token, receive assetion, validate_assertion. It\u0027s for readibility and my personal taste. Plus it\u0027s a bold boundary where validation code starts and ends, engineer who read the code doesn\u0027t need to wonder whether in line X the assertion is still being validated or we moved on.\nHaving said that I should probably validate response in another inner function.","commit_id":"e2dbe638d06ea0b3de40690f757f928f7b0a491f"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"5c999451d21c15bfa1bd20cb64c89adfb243a124","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            if not resp.text:"},{"line_number":251,"context_line":"                raise exceptions.InvalidResponse(resp)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        url \u003d self._local_cloud_plugin.auth_url + self.REQUEST_ECP_URL"},{"line_number":254,"context_line":"        resp \u003d session.post(url\u003durl,"},{"line_number":255,"context_line":"                            data\u003dself._ecp_assertion_request_data(session),"},{"line_number":256,"context_line":"                            raise_exc\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_a97eae67","line":253,"updated":"2015-06-09 23:23:59.000000000","message":"don\u0027t do .auth_url you want to do get_endpoint(interface\u003dauth.AUTH_INTERFACE)","commit_id":"e2dbe638d06ea0b3de40690f757f928f7b0a491f"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"5c999451d21c15bfa1bd20cb64c89adfb243a124","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        :param session: a session object to send out HTTP requests."},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        \"\"\""},{"line_number":280,"context_line":"        response \u003d session.post("},{"line_number":281,"context_line":"            self.sp_url,"},{"line_number":282,"context_line":"            headers\u003dself.ECP_SP_SAML2_REQUEST_HEADERS,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_e9ef061c","line":279,"updated":"2015-06-09 23:23:59.000000000","message":"why not just determine the sp_auth_urls here where you use them?\n\nyou also need to handle the case where some of them are None","commit_id":"e2dbe638d06ea0b3de40690f757f928f7b0a491f"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"5c999451d21c15bfa1bd20cb64c89adfb243a124","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    def get_auth_ref(self, session, **kwargs):"},{"line_number":298,"context_line":"        self._setup_remote_auth_url(session)"},{"line_number":299,"context_line":"        response \u003d self._send_service_provider_ecp_authn_response(session)"},{"line_number":300,"context_line":"        return access.create(resp\u003dresponse)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_a9cc6ebb","line":300,"updated":"2015-06-09 23:23:59.000000000","message":"that makes this function 2 lines, 1 of which is calling another function. merge them.","commit_id":"e2dbe638d06ea0b3de40690f757f928f7b0a491f"}],"keystoneauth/auth/identity/v3/k2k.py":[{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"04c83e35ec838eda72db5999e012bf5bda54a002","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        sp_auth_url \u003d self._local_cloud_plugin.get_sp_auth_url(session,"},{"line_number":53,"context_line":"                                                               self.sp_id)"},{"line_number":54,"context_line":"        sp_url \u003d self._local_cloud_plugin.get_sp_url(session, self.sp_id)"},{"line_number":55,"context_line":"        sp_auth_url \u003d self._remote_auth_url(self.sp_auth_url)"},{"line_number":56,"context_line":"        return (sp_url, sp_auth_url)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_ea5c8a7e","line":55,"updated":"2015-06-10 07:43:12.000000000","message":"self.sp_auth_url no longer exists. We need some tests through here.","commit_id":"64499b2fcce5199322206fdc8ebd604d1664d439"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"3b1176f9525caa27c164f798deaadf8288ae5c24","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        sp_auth_url \u003d self._local_cloud_plugin.get_sp_auth_url(session,"},{"line_number":53,"context_line":"                                                               self.sp_id)"},{"line_number":54,"context_line":"        sp_url \u003d self._local_cloud_plugin.get_sp_url(session, self.sp_id)"},{"line_number":55,"context_line":"        sp_auth_url \u003d self._remote_auth_url(self.sp_auth_url)"},{"line_number":56,"context_line":"        return (sp_url, sp_auth_url)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_72d2bd29","line":55,"in_reply_to":"3afb71cf_ea5c8a7e","updated":"2015-06-10 14:25:45.000000000","message":"removed the method. The one below is going to be used in the next patchset for scoping the unscoped token so I\u0027ve made it public.","commit_id":"64499b2fcce5199322206fdc8ebd604d1664d439"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"04c83e35ec838eda72db5999e012bf5bda54a002","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        PATTERN \u003d \u0027/v3/OS-FEDERATION/\u0027"},{"line_number":81,"context_line":"        index \u003d len(auth_url)"},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            index \u003d auth_url.index(PATTERN)"},{"line_number":84,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_2a6aa2ee","line":81,"updated":"2015-06-10 07:43:12.000000000","message":"this is just auth_url.replace(\u0027/v3/OS-FEDERATION\u0027, \u0027\u0027)","commit_id":"64499b2fcce5199322206fdc8ebd604d1664d439"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"3b1176f9525caa27c164f798deaadf8288ae5c24","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        PATTERN \u003d \u0027/v3/OS-FEDERATION/\u0027"},{"line_number":81,"context_line":"        index \u003d len(auth_url)"},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            index \u003d auth_url.index(PATTERN)"},{"line_number":84,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_7ce976b6","line":81,"in_reply_to":"3afb71cf_2a6aa2ee","updated":"2015-06-10 14:25:45.000000000","message":"the /v3/OS-FEDERATION is in the middle of the URL not in the end so we cannot just replace it with \u0027\u0027","commit_id":"64499b2fcce5199322206fdc8ebd604d1664d439"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"04c83e35ec838eda72db5999e012bf5bda54a002","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            return auth_url[:index]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @classmethod"},{"line_number":90,"context_line":"    def load_from_plugin(cls, auth_plugin, service_provider):"},{"line_number":91,"context_line":"        \"\"\"Class method used to extract the necessary data from the token."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        :param auth_plugin: instance of authentication plugin used for"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_2a9ce20d","line":90,"updated":"2015-06-10 07:43:12.000000000","message":"i don\u0027t think this function does anything anymore","commit_id":"64499b2fcce5199322206fdc8ebd604d1664d439"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"3b1176f9525caa27c164f798deaadf8288ae5c24","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            return auth_url[:index]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @classmethod"},{"line_number":90,"context_line":"    def load_from_plugin(cls, auth_plugin, service_provider):"},{"line_number":91,"context_line":"        \"\"\"Class method used to extract the necessary data from the token."},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        :param auth_plugin: instance of authentication plugin used for"}],"source_content_type":"text/x-python","patch_set":14,"id":"3afb71cf_1cdba21c","line":90,"in_reply_to":"3afb71cf_2a9ce20d","updated":"2015-06-10 14:25:45.000000000","message":"Done","commit_id":"64499b2fcce5199322206fdc8ebd604d1664d439"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"a94759d123da3e5cdd9d7112430d0faadcbbcf4b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def _get_ecp_assertion(self, session):"},{"line_number":109,"context_line":"        url \u003d self._local_cloud_plugin.get_endpoint("},{"line_number":110,"context_line":"            session, interface\u003dauth_base.AUTH_INTERFACE)"},{"line_number":111,"context_line":"        resp \u003d session.post("},{"line_number":112,"context_line":"            url\u003durl + self.REQUEST_ECP_URL,"},{"line_number":113,"context_line":"            data\u003dself._ecp_assertion_request_data(session),"},{"line_number":114,"context_line":"            raise_exc\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1af86dd1_66ce5085","line":111,"updated":"2015-06-11 21:51:24.000000000","message":"This code isn\u0027t working for me. I have not-quite-kilo keystone servers set up and it really wants me to post this request as json, with a header, like \n\n        resp \u003d session.post(\n            url\u003durl + self.REQUEST_ECP_URL,\n            json\u003dself._ecp_assertion_request_data(session),\n            headers \u003d {\u0027Content-Type\u0027: \u0027application/json\u0027},\n            raise_exc\u003dFalse)\n\nand this changes the content-type on line 126 as well (I get \u0027content-type\u0027: \u0027text/xml\u0027)\n\nDo you think this is a problem with the client code, or just because my servers are slightly out of date?","commit_id":"200a0c0c037868fd0d233b04776294bbd6e3f4a8"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"43108ff7531ff3bfb16552b7db269f374b172880","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def _get_ecp_assertion(self, session):"},{"line_number":109,"context_line":"        url \u003d self._local_cloud_plugin.get_endpoint("},{"line_number":110,"context_line":"            session, interface\u003dauth_base.AUTH_INTERFACE)"},{"line_number":111,"context_line":"        resp \u003d session.post("},{"line_number":112,"context_line":"            url\u003durl + self.REQUEST_ECP_URL,"},{"line_number":113,"context_line":"            data\u003dself._ecp_assertion_request_data(session),"},{"line_number":114,"context_line":"            raise_exc\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1af86dd1_4d63561b","line":111,"in_reply_to":"1af86dd1_66ce5085","updated":"2015-06-12 14:38:20.000000000","message":"Done","commit_id":"200a0c0c037868fd0d233b04776294bbd6e3f4a8"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"544a44d12733dbad913a82fb5130866ce46871c2","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            msg \u003d msg % {\u0027status_code\u0027: resp.status_code, \u0027err\u0027: resp.reason}"},{"line_number":124,"context_line":"            raise exceptions.AuthorizationFailure(msg)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        if not resp.text or resp.headers[\u0027Content-Type\u0027] !\u003d self.PAOS_HEADER:"},{"line_number":127,"context_line":"            raise exceptions.InvalidResponse(resp)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        return str(resp.text)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1af86dd1_c62f44f5","line":126,"updated":"2015-06-11 21:58:05.000000000","message":"The API doc example suggests the response content type will be \"text/xml\" - and that\u0027s what I\u0027m seeing.\n\nhttp://specs.openstack.org/openstack/keystone-specs/api/v3/identity-api-v3-os-federation-ext.html#generate-an-ecp-wrapped-saml-assertion","commit_id":"200a0c0c037868fd0d233b04776294bbd6e3f4a8"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"43108ff7531ff3bfb16552b7db269f374b172880","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            msg \u003d msg % {\u0027status_code\u0027: resp.status_code, \u0027err\u0027: resp.reason}"},{"line_number":124,"context_line":"            raise exceptions.AuthorizationFailure(msg)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        if not resp.text or resp.headers[\u0027Content-Type\u0027] !\u003d self.PAOS_HEADER:"},{"line_number":127,"context_line":"            raise exceptions.InvalidResponse(resp)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        return str(resp.text)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1af86dd1_087c2c71","line":126,"in_reply_to":"1af86dd1_c62f44f5","updated":"2015-06-12 14:38:20.000000000","message":"Done","commit_id":"200a0c0c037868fd0d233b04776294bbd6e3f4a8"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"b506c2ecff9404556596f361e2b884545e1ec48d","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    ECP_SP_SAML2_REQUEST_HEADERS \u003d {\u0027Content-Type\u0027: PAOS_HEADER}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, base_plugin, service_provider):"},{"line_number":45,"context_line":"        super(Keystone2Keystone, self).__init__(auth_url\u003dNone)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        self._local_cloud_plugin \u003d base_plugin"},{"line_number":48,"context_line":"        self._sp_id \u003d service_provider"}],"source_content_type":"text/x-python","patch_set":20,"id":"1af86dd1_905279dc","line":45,"updated":"2015-06-12 18:23:37.000000000","message":"The auth_url is always None. Maybe it should be set by a call to \n\nremote_auth_url(\nself._local_cloud_plugin.get_sp_url(session, sp_u_auth._sp_id)\n)","commit_id":"fb673803675b83a4c60d828ea4b54df38bba5af9"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"6840ede4c02a900284c5160022a3a63c4f6ebd2c","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            session, interface\u003dauth_base.AUTH_INTERFACE)"},{"line_number":111,"context_line":"        headers, body \u003d self._ecp_assertion_request(session)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        resp \u003d session.post(url\u003durl + self.REQUEST_ECP_URL, json\u003dbody,"},{"line_number":114,"context_line":"                            headers\u003dheaders, raise_exc\u003dFalse)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        # NOTE(marek-denis): I am not sure whether disablig exceptions in the"}],"source_content_type":"text/x-python","patch_set":20,"id":"1af86dd1_36cf42b2","line":113,"updated":"2015-06-12 17:17:16.000000000","message":"works much better!","commit_id":"fb673803675b83a4c60d828ea4b54df38bba5af9"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f00aeec7a0e0c069f169b4bf46a8f48b6ea65a60","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    HTTP_MOVED_TEMPORARILY \u003d 302"},{"line_number":40,"context_line":"    REQUEST_ECP_URL \u003d \u0027/auth/OS-FEDERATION/saml2/ecp\u0027"},{"line_number":41,"context_line":"    PAOS_HEADER \u003d \u0027application/vnd.paos+xml\u0027"},{"line_number":42,"context_line":"    ECP_SP_SAML2_REQUEST_HEADERS \u003d {\u0027Content-Type\u0027: PAOS_HEADER}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, base_plugin, service_provider):"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_31589a56","line":41,"updated":"2015-06-13 02:33:51.000000000","message":"nit: this is only used once in the line below, seems like overkill","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"54fa924e4c5d72997c43005599a08000bb9d02e0","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    HTTP_MOVED_TEMPORARILY \u003d 302"},{"line_number":40,"context_line":"    REQUEST_ECP_URL \u003d \u0027/auth/OS-FEDERATION/saml2/ecp\u0027"},{"line_number":41,"context_line":"    PAOS_HEADER \u003d \u0027application/vnd.paos+xml\u0027"},{"line_number":42,"context_line":"    ECP_SP_SAML2_REQUEST_HEADERS \u003d {\u0027Content-Type\u0027: PAOS_HEADER}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, base_plugin, service_provider):"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_c155c0c6","line":41,"in_reply_to":"fa32b979_31589a56","updated":"2015-06-15 06:27:52.000000000","message":"Done","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f00aeec7a0e0c069f169b4bf46a8f48b6ea65a60","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        return options"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _ecp_assertion_request(self, session):"},{"line_number":87,"context_line":"        headers \u003d {\u0027Content-Type\u0027: \u0027application/json\u0027}"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        token_id \u003d self._local_cloud_plugin.get_auth_ref(session).auth_token"},{"line_number":90,"context_line":"        body \u003d {"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_f1179252","line":87,"updated":"2015-06-13 02:33:51.000000000","message":"i\u0027m wondering if this is needed? won\u0027t a post request automatically insert the application/json header?","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"54fa924e4c5d72997c43005599a08000bb9d02e0","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        return options"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _ecp_assertion_request(self, session):"},{"line_number":87,"context_line":"        headers \u003d {\u0027Content-Type\u0027: \u0027application/json\u0027}"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        token_id \u003d self._local_cloud_plugin.get_auth_ref(session).auth_token"},{"line_number":90,"context_line":"        body \u003d {"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_416e90ca","line":87,"in_reply_to":"fa32b979_1e66a9ed","updated":"2015-06-15 06:27:52.000000000","message":"removed headers.","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"34b87c9b36a2963aabbaeb41c93f35bd788f5089","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        return options"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _ecp_assertion_request(self, session):"},{"line_number":87,"context_line":"        headers \u003d {\u0027Content-Type\u0027: \u0027application/json\u0027}"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        token_id \u003d self._local_cloud_plugin.get_auth_ref(session).auth_token"},{"line_number":90,"context_line":"        body \u003d {"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_1e66a9ed","line":87,"in_reply_to":"fa32b979_f1179252","updated":"2015-06-15 05:19:46.000000000","message":"it will if you\u0027re passing it as json\u003d","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f00aeec7a0e0c069f169b4bf46a8f48b6ea65a60","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        :param sp_auth_url: Federated authentication URL of the keystone SP."},{"line_number":146,"context_line":"                            It is specified by IdP, for example:"},{"line_number":147,"context_line":"                            https://sp.com/v3/OS-FEDERATION/identity_providers/idp_id/protocols/protocol_id/auth"},{"line_number":148,"context_line":"        :type sp_auth_url: string"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_715e2247","line":147,"updated":"2015-06-13 02:33:51.000000000","message":"line too long?\n\n  https://sp.com/v3/OS-FEDERATION/identity_providers/idp_id/\\\n  protocols/protocol_id/auth\n\n?","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"54fa924e4c5d72997c43005599a08000bb9d02e0","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        :param sp_auth_url: Federated authentication URL of the keystone SP."},{"line_number":146,"context_line":"                            It is specified by IdP, for example:"},{"line_number":147,"context_line":"                            https://sp.com/v3/OS-FEDERATION/identity_providers/idp_id/protocols/protocol_id/auth"},{"line_number":148,"context_line":"        :type sp_auth_url: string"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_617394b2","line":147,"in_reply_to":"fa32b979_715e2247","updated":"2015-06-15 06:27:52.000000000","message":"Done","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"34b87c9b36a2963aabbaeb41c93f35bd788f5089","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        sp_auth_url \u003d self._local_cloud_plugin.get_sp_auth_url("},{"line_number":171,"context_line":"            session, self._sp_id)"},{"line_number":172,"context_line":"        sp_url \u003d self._local_cloud_plugin.get_sp_url(session, self._sp_id)"},{"line_number":173,"context_line":"        return (sp_auth_url, sp_url)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def get_auth_ref(self, session, **kwargs):"},{"line_number":176,"context_line":"        sp_auth_url, sp_url \u003d self._get_sp_urls(session)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_9eee3921","line":173,"updated":"2015-06-15 05:19:46.000000000","message":"nit: this function is a little useless. why not just combine it into get_auth_ref","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"54fa924e4c5d72997c43005599a08000bb9d02e0","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        sp_auth_url \u003d self._local_cloud_plugin.get_sp_auth_url("},{"line_number":171,"context_line":"            session, self._sp_id)"},{"line_number":172,"context_line":"        sp_url \u003d self._local_cloud_plugin.get_sp_url(session, self._sp_id)"},{"line_number":173,"context_line":"        return (sp_auth_url, sp_url)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def get_auth_ref(self, session, **kwargs):"},{"line_number":176,"context_line":"        sp_auth_url, sp_url \u003d self._get_sp_urls(session)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_a13c3c94","line":173,"in_reply_to":"fa32b979_9eee3921","updated":"2015-06-15 06:27:52.000000000","message":"Done","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"34b87c9b36a2963aabbaeb41c93f35bd788f5089","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        # NOTE(rodrigods): we set the auth_url only when we access the"},{"line_number":179,"context_line":"        # sp_auth_url for the first time."},{"line_number":180,"context_line":"        if not self.auth_url:"},{"line_number":181,"context_line":"            self.auth_url \u003d self._remote_auth_url(sp_auth_url)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        response \u003d self._send_service_provider_ecp_authn_response("},{"line_number":184,"context_line":"            session, sp_url, sp_auth_url)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_9e871961","line":181,"updated":"2015-06-15 05:19:46.000000000","message":"hmm, i\u0027m a little torn on this. maybe just leave auth_url as none for now.","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"54fa924e4c5d72997c43005599a08000bb9d02e0","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        # NOTE(rodrigods): we set the auth_url only when we access the"},{"line_number":179,"context_line":"        # sp_auth_url for the first time."},{"line_number":180,"context_line":"        if not self.auth_url:"},{"line_number":181,"context_line":"            self.auth_url \u003d self._remote_auth_url(sp_auth_url)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        response \u003d self._send_service_provider_ecp_authn_response("},{"line_number":184,"context_line":"            session, sp_url, sp_auth_url)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_819b38c9","line":181,"in_reply_to":"fa32b979_9e871961","updated":"2015-06-15 06:27:52.000000000","message":"i removed the \u0027caching\u0027 step, however i am not sure if this is exactly what you wanted to have.","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"f8799594fb81a4b674f0927e31f90685f4dececd","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return options"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _ecp_assertion_request(self, session):"},{"line_number":86,"context_line":"        token_id \u003d self._local_cloud_plugin.get_auth_ref(session).auth_token"},{"line_number":87,"context_line":"        body \u003d {"},{"line_number":88,"context_line":"            \u0027auth\u0027: {"},{"line_number":89,"context_line":"                \u0027identity\u0027: {"}],"source_content_type":"text/x-python","patch_set":22,"id":"fa32b979_fa44111c","line":86,"updated":"2015-06-15 18:02:14.000000000","message":"this should call \"get_access()\"","commit_id":"ad73346ba62beabe7385406ad24e40ed3b6327b8"},{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"89d856d47dd0801f5a6d7be434f0cf867db203e9","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        response \u003d session.post("},{"line_number":151,"context_line":"            sp_url,"},{"line_number":152,"context_line":"            headers\u003dself.ECP_SP_SAML2_REQUEST_HEADERS,"},{"line_number":153,"context_line":"            data\u003dself._get_ecp_assertion(session),"},{"line_number":154,"context_line":"            authenticated\u003dFalse,"},{"line_number":155,"context_line":"            redirect\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa32b979_466874b9","line":152,"updated":"2015-06-17 08:21:50.000000000","message":"careful - i think this modifies the dict. you might want to build this here.","commit_id":"23db5a6934dae77a7f126d7519972fa214ad5ff9"}],"keystoneauth/tests/unit/auth/test_identity_v3_federation.py":[{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"47711e2302067b689b6a5983b390b5e2e092cb25","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # The IdP should return a ECP wrapped assertion when requested"},{"line_number":130,"context_line":"        self.requests_mock.register_uri("},{"line_number":131,"context_line":"            \u0027POST\u0027,"},{"line_number":132,"context_line":"            self.REQUEST_ECP_URL,"},{"line_number":133,"context_line":"            status_code\u003d200)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        # The SP should respond with a 302"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_45ed33ee","line":132,"updated":"2015-06-08 12:29:06.000000000","message":"so i understand why it doesn\u0027t return anything :-)","commit_id":"5145b7a3cba6e72439c76d0c343481c43cb50d5c"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"f00aeec7a0e0c069f169b4bf46a8f48b6ea65a60","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from keystoneauth.tests.unit import saml2_fixtures"},{"line_number":22,"context_line":"from keystoneauth.tests.unit import utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class TesterFederationPlugin(v3.FederationBaseAuth):"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_114f9693","line":24,"updated":"2015-06-13 02:33:51.000000000","message":"six should be between the uuid and keystoneauth imports, on it\u0027s own line, since it\u0027s a 3rd party lib","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"54fa924e4c5d72997c43005599a08000bb9d02e0","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from keystoneauth.tests.unit import saml2_fixtures"},{"line_number":22,"context_line":"from keystoneauth.tests.unit import utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class TesterFederationPlugin(v3.FederationBaseAuth):"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa32b979_a1bf5ccf","line":24,"in_reply_to":"fa32b979_114f9693","updated":"2015-06-15 06:27:52.000000000","message":"Done","commit_id":"0f3815d61ea90ce32ff0cc9ac4477ed44bedd2f2"}],"setup.cfg":[{"author":{"_account_id":7191,"name":"Jamie Lennox","email":"jamielennox@gmail.com","username":"jamielennox"},"change_message_id":"89d856d47dd0801f5a6d7be434f0cf867db203e9","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    v2token \u003d keystoneauth.auth.identity.v2:Token"},{"line_number":33,"context_line":"    v3password \u003d keystoneauth.auth.identity.v3:Password"},{"line_number":34,"context_line":"    v3token \u003d keystoneauth.auth.identity.v3:Token"},{"line_number":35,"context_line":"    k2k \u003d keystoneauth.auth.identity.v3:Keystone2Keystone"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"[build_sphinx]"},{"line_number":38,"context_line":"source-dir \u003d doc/source"}],"source_content_type":"text/x-ttcn-cfg","patch_set":23,"id":"fa32b979_86a8bcdc","line":35,"updated":"2015-06-17 08:21:50.000000000","message":"let\u0027s not do this until we have all the scoping information and such correct.","commit_id":"23db5a6934dae77a7f126d7519972fa214ad5ff9"}]}
