opensecuritycontroller / security-mgr-sample-plugin

Apache License 2.0
5 stars 11 forks source link

First version of Rest Implementation in Secure Sample Plugin #21

Closed sudhirappaji closed 7 years ago

sudhirappaji commented 7 years ago

First Version of Rest Implementation in sample secure plugin. It contains the following:

  1. Rest Framework
  2. Empty ManagerPolicyElement for GET/PUSH/PUT/DELETE

This can be tested using Fiddler for sending REST requests:

a. GET with https://localhost:8090/testsmplugin/sm/server/v1/policies b. GET with https://localhost:8090/testsmplugin/sm/server/v1/policies/{id} c. POST with https://localhost:8090/testsmplugin/sm/server/v1/policies Request body to contain: { "id":1, "name":"anyname” } d. PUT OR DELETE with https://localhost:8090/testsmplugin/sm/server/v1/policies/{id} { "id":1, "name":"anyname”}

For all the above Fiddler menu to have below configuration: User-Agent: Fiddler Accept: application/json Content-Type: application/json Authorization: Basic YWRtaW46YWRtaW4xMjM= Host: localhost:8090 Content-Length: 41