-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74798/
-----------------------------------------------------------

Review request for ranger, Akshay Tupe, Anand Nadar, Ankita Sinha, Madhan 
Neethiraj, Monika Kachhadiya, Siddhesh Phatak, Subhrat Chaudhary, and Vanita 
Ubale.


Bugs: RANGER-4617
    https://issues.apache.org/jira/browse/RANGER-4617


Repository: ranger


Description
-------

Currently in dataset-summary API we have a field 
"principalsCount" which gives details of principal in dataset policy ,Also 
adding field "aclPrincipalsCount" which will give details of principals in 
dataset ACL will also be helpful for getting more information for a dataset


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/model/RangerGds.java 
d10a70f23 
  security-admin/src/main/java/org/apache/ranger/biz/GdsDBStore.java bf348e4ed 


Diff: https://reviews.apache.org/r/74798/diff/1/


Testing
-------

1)create user,group,role
2)Create a dataset and add the above principals in Dataset-ACL
3)get the dataset by service/gds/dataset/summary API in field 
"aclPrincipalsCount" you will get count of above added principals in 
datasetSummary

Request =======> service/gds/dataset/summary/
Response ======>
{
    "startIndex": 0,
    "pageSize": 1,
    "totalCount": 9,
    "resultSize": 1,
    "sortType": "asc",
    "sortBy": "datasetId",
    "queryTimeMS": 1702979335915,
    "list": [
        {
            "id": 1,
            "guid": "bbfe0bb4-94c8-49e1-8a2a-2c2997839b2f",
            "isEnabled": true,
            "createdBy": "Admin",
            "updatedBy": "Admin",
            "createTime": 1699429710000,
            "updateTime": 1700740815000,
            "version": 2,
            "name": "Test_GDS_Dataset112",
            "description": "This is GDS description",
            "permissionForCaller": "ADMIN",
            "principalsCount": {
                "ROLE": 0,
                "GROUP": 0,
                "USER": 0
            },
            "aclPrincipalsCount": {
                "ROLE": 0,
                "GROUP": 0,
                "USER": 2
            },
            "projectsCount": 1,
            "totalResourceCount": 1,
            "dataShares": [
                {
                    "id": 1,
                    "guid": "604513a0-2c69-40c4-8ea8-ccecadf47888",
                    "isEnabled": true,
                    "createdBy": "Admin",
                    "updatedBy": "Admin",
                    "createTime": 1699352449000,
                    "updateTime": 1702453784000,
                    "version": 7,
                    "dataShareId": 1,
                    "dataShareName": "RangerDataShare22",
                    "serviceId": 1,
                    "serviceName": "Ranger_hive",
                    "zoneId": 2,
                    "zoneName": "Test-Zone-1",
                    "resourceCount": 1,
                    "shareStatus": "ACTIVE",
                    "approver": "admin"
                }
            ]
        }
    ],
    "listSize": 1
}


Thanks,

Prashant Satam

Reply via email to