django_openstack_auth/openstack_auth/tests
Colleen Murphy ca3166707b Allow federated users to auth with domain scope
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
2017-01-25 19:42:26 +01:00
..
conf Makes policy.check aware of domain scoped token 2015-11-23 22:18:48 +00:00
templates/auth Initial commit. 2012-07-03 02:25:01 -07:00
__init__.py Initial commit. 2012-07-03 02:25:01 -07:00
data_v2.py Move d-o-a auth library to keystoneauth 2015-12-09 13:46:45 +00:00
data_v3.py Add K2K Auth Dropdown 2017-01-19 13:00:08 -07:00
models.py Initial commit. 2012-07-03 02:25:01 -07:00
run_tests.py Fix the py27dj19 tests 2016-01-15 13:12:24 +00:00
settings.py Add K2K Auth Dropdown 2017-01-19 13:00:08 -07:00
tests.py Allow federated users to auth with domain scope 2017-01-25 19:42:26 +01:00
urls.py Update URLs to Django 1.8+ style 2016-02-16 19:41:52 +00:00