Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Decision Requests are REST requests sent from ONAP components. Below is the format of Decision API request.

  • API endpoint :- policy/pdpx/v1/decision. Below is the snippet of Decision Request that will be received in Phase-1 .

    Code Block
    Decision Request 
     {
    	"OnapName":      "CDS",
    	"OnapComponent": "CDS",
    	"OnapInstance":  "CDS-component-instance",
    	"RequestId":     "8e6f784e-c9cb-42f6-bcc9-edb5d0af1ce1",
    	"Policy":        "role/allow",
    	"input":         
    	  {
    	      "user":"alice",
    	      "action":"read",
    	      "object":"id123",
    	      "type":"dog"
    	  }
    }
    
    curl -u 'policyadmin:zb!XztG34' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"onapName":"CDS","onapComponent":"CDS-component-instance","onapInstance":"CDS","requestId":"8e6f784e-c9cb-42f6-bcc9-edb5d0af1ce1","policy":"role/allow","input":{"user":"alice","action":"read","object":"id123","type":"cat"}}' -X POST 
    http://0.0.0.0:8282/policy/pdpx/v1/decision

...

Code Block
{
   "statusCode":"200",
   "statusMessage":"Successful",
   "decision":"PERMIT",
   "policyname":"role/allow",
   "errorMessage":"",
   "errorDetails":[""],
   "requestId":"8e6f784e-c9cb-42f6-bcc9-edb5d0af1ce1"
}

Currently OPA-PDP will respond with either PERMIT, DENY or INDETERMINATE values .

...