[ https://issues.apache.org/jira/browse/RANGER-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramesh Mani updated RANGER-4998: -------------------------------- Affects Version/s: 3.0.0 > Add validations to Ensure Non-Empty Resource Values in GDS Resource Creation > and Edit APIs > ------------------------------------------------------------------------------------------ > > Key: RANGER-4998 > URL: https://issues.apache.org/jira/browse/RANGER-4998 > Project: Ranger > Issue Type: Bug > Components: Ranger > Affects Versions: 3.0.0 > Reporter: Radhika Kundam > Assignee: Radhika Kundam > Priority: Major > > *Problem statement* > When trying to create a GDS resource via API, the GDS resource creation is > working even though the values are empty for the resource section. > Ideally, validations have to be added to ensure that the field is not empty > during GDS resource creation / update via APIs. > The validation is already present on the UI. > *Steps to reproduce* > 1. As the Ranger admin user, make a call to the API endpoint > \{BASE_URL}/service/gds/resource using the following payload > {code:java} > { > "version":1, > "name":"test_shared_resource_{random_str}", > "dataShareId":{DATASHARE_ID}, > "resource":{ > "database":{ > "values":[ > > ], > "isExcludes":false, > "isRecursive":false > } > } > }{code} > The GDS resource creation succeeds even though the values field is empty. > The GDS resource creation succeeds even with the below payload > {code:java} > { > "version":1, > "name":"test_shared_resource_abcdef", > "dataShareId":34, > "resource":{ > "database":{ > "isExcludes":false, > "isRecursive":false > } > } > } {code} > The issue is present in the PUT /gds/resource/\{resource_id} API endpoint as > well. > *Expectation* > Validations have to be added to ensure the resources are properly defined > during GDS resource creation / edit. -- This message was sent by Atlassian Jira (v8.20.10#820010)