Comment 0 for bug 1748027

Revision history for this message
Lance Bragstad (lbragstad) wrote :

Keystone implemented scope_types for oslo.policy RuleDefault objects in the Queens release [0]. In order to take full advantage of scope_types, keystone is going to have to evolve policy enforcement checks in the user API. This is documented in each patch with FIXMEs [1].

GET /v3/users/{user_id}

- Someone with a system role assignment that passes the check string should be able to call this API for any user in the system
- Someone with a domain role assignment that passes the check string should be able to call this API for any user within the domain
- Someone with a valid token should be able to call this API for their user

GET /v3/users

- Someone with a system role assignment that passes the check string should be able to call this API and get a list of all users in the system
- Someone with a domain role assignment that passes the check string should be able to call this API and get a list of all users within that domain

POST /v3/users

- Someone with a system role assignment that passes the check string should be able to create users anywhere in the system
- Someone with a domain role assignment that passes the check string should only be able to create users within their domain
- Someone with a project role assignment that passes the check string shouldn't be able to create users since users are domain-scoped entities.

PATCH /v3/users/{user_id}

- Someone with a system role assignment that passes the check string should be able to update any user in the system
- Someone with a domain role assignment that passes the check string should only be able to update users within their domain, this should also include rejecting requests to update domain IDs for users that doesn't match the domain they are a part of
- Someone with a project role assignment that passes the check string shouldn't be able to update users since users are domain-scoped.

[0] https://review.openstack.org/#/c/526203/
[1] https://review.openstack.org/#/c/526203/5/keystone/common/policies/user.py@21