Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-123

Update policy REST API call not updating permissions properly for Storm policy

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Steps to reproduce
      1] Get a specific storm policy using GET POLICY REST API

      curl -i --header Accept:application/json -H Content-Type: application/json --user admin:***** -X GET http://ec2-54-172-58-154.compute-1.amazonaws.com:6080/service/public/api/policy/137
      

      2] Use the JSON output as input to UPDATE POLICY REST API

      curl -i --header Accept:application/json -H Content-Type: application/json --user admin:***** -X PUT http://ec2-54-172-58-154.compute-1.amazonaws.com:6080/service/public/api/policy/137 -d {"id":137,"createDate":"2014-10-20T21:59:02Z","updateDate":"2014-10-21T02:35:21Z","owner":"Admin","updatedBy":"Admin","policyName":"Storm_Policy_02","resourceName":"/wctest,/*","description":"","repositoryName":"stormdev","repositoryType":"Storm","permMapList":[{"groupList":["stormtestuser","public"],"permList":["Admin","submitTopology","fileUpload","getNimbusConf","getClusterInfo","fileDownload","killTopology","rebalance","activate","deactivate","getTopologyConf","getTopology","getUserTopology","getTopologyInfo","uploadNewCredentials"]}],"topologies":"wctest,*","isEnabled":true,"isAuditEnabled":true,"version":"0.4.0","replacePerm":false}
      

      Expected behavior
      Update REST API call should update the permissions properly.

      Actual behavior
      After the update call, permissions in policy get lost and only three are remaining.

        Attachments

          Activity

            People

            • Assignee:
              vperiasamy Velmurugan Periasamy
              Reporter:
              vperiasamy Velmurugan Periasamy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: