[ 
https://issues.apache.org/jira/browse/RANGER-4112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17694646#comment-17694646
 ] 

Pradeep Agrawal edited comment on RANGER-4112 at 2/28/23 4:56 PM:
------------------------------------------------------------------

[~ramackri] : 
in the updateServiceDefByName() : def id is passed null here : 
[https://github.com/apache/ranger/blob/master/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java#L281]
 
While updatePolicyByName() is passing the policy id from here 
[https://github.com/apache/ranger/blob/master/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java#L570]

 

Is this intentional or any specific case which i can not see from here. 


was (Author: pradeep.agrawal):
[~ramackri] : 
in the updateServiceDefByName() : def id is passed null here : 
[https://github.com/apache/ranger/blob/master/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java#L281]
 
While updatePolicyByName() is passing the policy id from here 
[https://github.com/apache/ranger/blob/master/security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java#L570]

> Update servicedef by name results in 400 status code while the same request 
> works with update servicedef using id
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-4112
>                 URL: https://issues.apache.org/jira/browse/RANGER-4112
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>    Affects Versions: 3.0.0, 2.4.0
>            Reporter: Abhishek
>            Assignee: Pradeep Agrawal
>            Priority: Major
>             Fix For: 3.0.0, 2.4.0
>
>         Attachments: 
> 0001-RANGER-4112-Update-servicedef-by-name-results-in-400.patch, Screenshot 
> 2023-02-28 at 3.21.18 PM.png
>
>
> {color:#172b4d}If a PUT request is made to update the servicedef by id 
> (BASE_URL/service/public/v2/api/servicedef/id), the request passes,{color}
> {color:#172b4d}but if the same PUT request is made to update the servicedef 
> by name (BASE_URL/service/public/v2/api/servicedef/name/\{servicedef_name}), 
> then it results in 400 Bad request.{color}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to