ca3166707b
When a federated user logs in, openstack_auth receives an unscoped token and no user_domain_name parameter. Currently, if the federated user has a role in one or more domains, but no roles in any projects, openstack_auth prevents authorization and denies the user's login with the error "You are not authorized for any projects or domains." This is a problem because first, it's inaccurate, as the user is authorized for at least one domain, and second, a keystone administrator may want to give federated users access to a domain without any projects in it, for example so delegate the creation of projects to the federated users themselves. This patch allows federated users without project roles to log in by looking up domains as well as projects when attempting to scope the token. This lookup is skipped if the domain was passed as part of the request. This patch also slightly restructures the OpenStackAuthTestsWebSSO and OpenStackAuthTestsV3 tests because mox needs to simulate only one instance of the plugin but two instances of the client objects for every call to authenticate(). Closes-bug: #1649101 Change-Id: I151218ff28c0728898ed5315d63dd8122ce3b166 |
||
---|---|---|
.. | ||
conf | ||
templates/auth | ||
__init__.py | ||
data_v2.py | ||
data_v3.py | ||
models.py | ||
run_tests.py | ||
settings.py | ||
tests.py | ||
urls.py |