keystone/keystone/api
Lance Bragstad d2cc4c83c0 Consolidate user protection tests
This commit removes user policies from policy.v3cloudsample.json. By
incorporating system-scope, domain-scope, project-scope, and default
roles, we've effectively made these policies obsolete. We can simplify
what we maintain and provide a more consistent, unified view of
default user behavior by removing them.

This commit also adds an important filter to the GET /v3/users API by
making sure the users in the response are filtered properly if the API
was called with a domain-scoped token. This is needed in case domain
configuration isn't setup and short-circuits normalization of the
domain ID, which sometimes comes from the token if it is
domain-scoped.  Regardless of domain configuration being used, we
should protect against cases where data leaks across domains in the
name of security.

Finally, this commit moves a couple of tests from test_v3_protection
to test_users protection tests that ensures we do reasonable filtering
while normalizing domain IDs. The remaining tests from
test_v3_protection have been removed because they are no longer
applicable. These tests were testing an HTTP 403 was returned when a
domain users attempted to filter users for domains they didn't have
authorization on. We don't use this approach consistently in keystone.
Most other places where filtering is implemented, we ignore invalid
filters and instead return an empty list. For domain users attempting
to fish information out of another domain, they will receive an empty
list to be consistent with other parts of the API.

Change-Id: I60b2e2b8af172c369eab0eb2c29f056f5c98ad16
Parial-Bug: 1806762
2019-03-26 12:58:15 +00:00
..
_shared Replace 'tenant_id' with 'project_id' 2019-02-04 16:17:52 +01:00
__init__.py Convert S3 and EC2 auth to flask native dispatching 2018-10-11 15:27:46 -07:00
auth.py Make collection_key and member_key raise if unset 2018-10-12 11:18:41 -07:00
credentials.py Use request_body_json function 2018-12-10 15:48:23 +00:00
discovery.py bump Keystone version for Stein 2019-01-22 15:34:06 +13:00
domains.py Allow domain users to access the GET domain API 2019-01-11 20:21:39 +00:00
ec2tokens.py Make collection_key and member_key raise if unset 2018-10-12 11:18:41 -07:00
endpoints.py Convert auth to flask native dispatching 2018-10-09 23:23:03 -07:00
groups.py Implement system reader role for groups 2018-12-19 20:14:17 +00:00
limits.py Add domain level limit support - API 2019-02-19 11:09:13 +08:00
os_ep_filter.py Move json_home "extension" rel functions 2018-08-16 20:49:01 +00:00
os_federation.py Convert auth to flask native dispatching 2018-10-09 23:23:03 -07:00
os_inherit.py Add build_target arguement to enforcer 2018-09-28 15:50:44 -05:00
os_oauth1.py Convert auth to flask native dispatching 2018-10-09 23:23:03 -07:00
os_revoke.py Move json_home "extension" rel functions 2018-08-16 20:49:01 +00:00
os_simple_cert.py Move json_home "extension" rel functions 2018-08-16 20:49:01 +00:00
policy.py Convert policy API to flask 2018-08-31 07:14:32 +00:00
projects.py Implement domain admin functionality for projects 2019-03-20 20:21:33 +00:00
regions.py Convert regions API to flask native dispatching 2018-08-13 20:05:57 +00:00
registered_limits.py Add hint back 2018-09-20 14:58:43 +08:00
role_assignments.py Implement domain reader for role_assignments 2019-03-21 18:49:20 +00:00
role_inferences.py Convert role_inferences API to flask native dispatching 2018-08-13 20:06:35 +00:00
roles.py Merge "Add hint back" 2018-10-03 21:51:14 +00:00
s3tokens.py Convert S3 and EC2 auth to flask native dispatching 2018-10-11 15:27:46 -07:00
services.py Convert services api to flask native dispatching 2018-08-13 20:06:11 +00:00
system.py Add build_target arguement to enforcer 2018-09-28 15:50:44 -05:00
trusts.py Use ForbiddenAction for invalid action instead of Forbidden 2019-03-18 17:14:21 +08:00
users.py Consolidate user protection tests 2019-03-26 12:58:15 +00:00