Hi,
I already addressed this issue/question as a side note in thread model-relationships-to-domainusermanagement/2782, but here it’s correctly identified as a UAA subject.
Currently, I am still working only with the SME and the Preview App. I have a Project model that should have relationships to users as Project Owner, Assignee, and Executor. After downloading the DomainUserManagement document model from the UAA documentation and creating the relationships, everything seemed to work. However, only users with the userManagementAdmin role can list and select all users. All other users can only see and select themselves.
Please notice that I added a new role User_Reader to DomainUserManagement and that all my users have this role. The role User_Reader has access rights MODEL_READ, DOCUMENT_READ, and DOCUMENT_LIST. So there is no problem for downloading the document model.
Nevertheless, it seems that the userManagementAdmin role is not only necessary for managing users but also for retrieving them. UAA appears to restrict access to its API using the user-management-authorization.json policy file like that:
{
"name": "User Document Reading Policy",
"description": "The user document belongs to the currently logged-in user",
"target": "true",
"rules": [
"containsAnyRole('userManagementAdmin') || #resource == principal.username"
]
}
I believe this explains the behavior well: only users with the userManagementAdmin role can read all users (including “technical” users). Other users can only see themselves.
To address this for my use case, I may need to customize the configuration file user-management-authorization.json or introduce a new configuration file to allow users with the User_Reader role to retrieve all or certain users.
Is this the right approach?
Why hasn’t this use case been addressed until now? It actually seems quite typical, doesn’t it?