Improvement #8129
openFix cdm admin user authorization
0%
Description
------------------------
gitlabId --> 130 https://gitlab.com/entgra/product-iots/-/issues/130
labels --> Type: Improvement,
assignees -->
created_at --> 2019-08-16 18:51:53 IST +0530
updated_at --> 2021-10-12 10:06:07 IST +0530
------------------------
- if the user has the "/device-mgt/admin" permission<br>
 OR
- if the user has the "/device-mgt/devices/any-device/permitted-actions-under-owning-device" permission<br>
 OR
- if the user is the owner of the device
- Description
 Currently, the authorization of the carbon device-mgt admin role is checked through the "/device-mgt/devices/any-device/permitted-actions-under-owning-device" permission. The isAdminUser(String username, int tenantId) method in DeviceAccessAuthorizationServiceImpl checks if the user is an admin by looking for this permission.<br>
 The following improvements are suggested:
 1. The "/device-mgt/devices/any-device/permitted-actions-under-owning-device" permission should be renamed as it lacks clarity on what this permission entails.
 2. The above permission should be moved to an admin level in the permission tree.
 3. The isAdmin method should check for the "/device-mgt/admin" permission and another method should be implemented to check for the above-mentioned permission.
 4. Three conditions must be checked to authorize a user:
- Related Issues:
 https://gitlab.com/entgra/product-iots/issues/31
       Updated by Entgra Admin about 3 years ago
      Updated by Entgra Admin about 3 years ago
      
    
    From Gitlab
                ------------------------
                author: tcdlpds 
                created_at: 2019-09-05 17:18:06 IST +0530 
                updated_at: 2019-09-05 17:18:06 IST +0530 
                ------------------------
changed milestone to %5
       Updated by Entgra Admin about 3 years ago
      Updated by Entgra Admin about 3 years ago
      
    
    From Gitlab
                ------------------------
                author: milanperera 
                created_at: 2019-09-09 01:49:06 IST +0530 
                updated_at: 2019-09-09 01:49:06 IST +0530 
                ------------------------
assigned to @milanperera
       Updated by Entgra Admin about 3 years ago
      Updated by Entgra Admin about 3 years ago
      
    
    From Gitlab
                ------------------------
                author: tcdlpds 
                created_at: 2019-10-14 07:42:59 IST +0530 
                updated_at: 2019-10-14 07:42:59 IST +0530 
                ------------------------
changed milestone to %6
       Updated by Entgra Admin about 3 years ago
      Updated by Entgra Admin about 3 years ago
      
    
    From Gitlab
                ------------------------
                author: inosh 
                created_at: 2020-03-25 12:08:27 IST +0530 
                updated_at: 2020-03-25 12:08:27 IST +0530 
                ------------------------
changed milestone to %10
       Updated by Entgra Admin about 3 years ago
      Updated by Entgra Admin about 3 years ago
      
    
    From Gitlab
                ------------------------
                author: tcdlpds 
                created_at: 2020-09-16 20:16:01 IST +0530 
                updated_at: 2020-09-16 20:16:01 IST +0530 
                ------------------------
unassigned @milanperera
       Updated by Viranga  Gunarathna over 2 years ago
      Updated by Viranga  Gunarathna over 2 years ago
      
    
    - Project changed from product-uem 5.3.0 GA to 32
       Updated by Viranga  Gunarathna over 1 year ago
      Updated by Viranga  Gunarathna over 1 year ago
      
    
    - Project changed from 33 to Backlog