Update XACML Tutorial
[policy/parent.git] / docs / xacml / tutorial / PolicyApplicationTutorial.postman_collection.json
1 {
2         "info": {
3                 "_postman_id": "20eb42db-f0a7-4b65-8ccd-c3a5f56cb526",
4                 "name": "Policy Application Tutorial",
5                 "description": "Collection of Postman API calls to support the Policy Enforcement Tutorial",
6                 "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
7         },
8         "item": [
9                 {
10                         "name": "Api Healthcheck",
11                         "request": {
12                                 "auth": {
13                                         "type": "basic",
14                                         "basic": [
15                                                 {
16                                                         "key": "password",
17                                                         "value": "zb!XztG34",
18                                                         "type": "string"
19                                                 },
20                                                 {
21                                                         "key": "username",
22                                                         "value": "healthcheck",
23                                                         "type": "string"
24                                                 }
25                                         ]
26                                 },
27                                 "method": "GET",
28                                 "header": [
29                                         {
30                                                 "key": "Content-Type",
31                                                 "type": "text",
32                                                 "value": "application/json"
33                                         },
34                                         {
35                                                 "key": "Accept",
36                                                 "type": "text",
37                                                 "value": "application/json"
38                                         }
39                                 ],
40                                 "url": {
41                                         "raw": "{{POLICY-API-URL}}/policy/api/v1/healthcheck",
42                                         "host": [
43                                                 "{{POLICY-API-URL}}"
44                                         ],
45                                         "path": [
46                                                 "policy",
47                                                 "api",
48                                                 "v1",
49                                                 "healthcheck"
50                                         ]
51                                 }
52                         },
53                         "response": []
54                 },
55                 {
56                         "name": "Create Authorization Policy Type",
57                         "request": {
58                                 "auth": {
59                                         "type": "basic",
60                                         "basic": [
61                                                 {
62                                                         "key": "password",
63                                                         "value": "zb!XztG34",
64                                                         "type": "string"
65                                                 },
66                                                 {
67                                                         "key": "username",
68                                                         "value": "healthcheck",
69                                                         "type": "string"
70                                                 }
71                                         ]
72                                 },
73                                 "method": "POST",
74                                 "header": [
75                                         {
76                                                 "key": "Accept",
77                                                 "type": "text",
78                                                 "value": "application/yaml"
79                                         },
80                                         {
81                                                 "key": "Content-Type",
82                                                 "type": "text",
83                                                 "value": "application/yaml"
84                                         }
85                                 ],
86                                 "body": {
87                                         "mode": "raw",
88                                         "raw": "tosca_definitions_version: tosca_simple_yaml_1_1_0\npolicy_types:\n    onap.policies.Authorization:\n        derived_from: tosca.policies.Root\n        version: 1.0.0\n        description: Example tutorial policy type for doing user authorization\n        properties:\n            user:\n                type: string\n                required: true\n                description: The unique user name\n            permissions:\n                type: list\n                required: true\n                description: A list of resource permissions\n                entry_schema:\n                    type: onap.datatypes.Tutorial\ndata_types:\n    onap.datatypes.Tutorial:\n        derived_from: tosca.datatypes.Root\n        version: 1.0.0\n        properties:\n            entity:\n                type: string\n                required: true\n                description: The resource\n            permission:\n                type: string\n                required: true\n                description: The permission level\n                constraints:\n                    - valid_values: [read, write, delete]\n",
89                                         "options": {
90                                                 "raw": {
91                                                         "language": "text"
92                                                 }
93                                         }
94                                 },
95                                 "url": {
96                                         "raw": "{{POLICY-API-URL}}/policy/api/v1/policytypes",
97                                         "host": [
98                                                 "{{POLICY-API-URL}}"
99                                         ],
100                                         "path": [
101                                                 "policy",
102                                                 "api",
103                                                 "v1",
104                                                 "policytypes"
105                                         ]
106                                 }
107                         },
108                         "response": []
109                 },
110                 {
111                         "name": "Create policies",
112                         "request": {
113                                 "auth": {
114                                         "type": "basic",
115                                         "basic": [
116                                                 {
117                                                         "key": "password",
118                                                         "value": "zb!XztG34",
119                                                         "type": "string"
120                                                 },
121                                                 {
122                                                         "key": "username",
123                                                         "value": "healthcheck",
124                                                         "type": "string"
125                                                 }
126                                         ]
127                                 },
128                                 "method": "POST",
129                                 "header": [
130                                         {
131                                                 "key": "Accept",
132                                                 "type": "text",
133                                                 "value": "application/yaml"
134                                         },
135                                         {
136                                                 "key": "Content-Type",
137                                                 "type": "text",
138                                                 "value": "application/yaml"
139                                         }
140                                 ],
141                                 "body": {
142                                         "mode": "raw",
143                                         "raw": "tosca_definitions_version: tosca_simple_yaml_1_1_0\ntopology_template:\n    policies:\n        -\n            onap.policy.tutorial.demo:\n                type: onap.policies.Authorization\n                type_version: 1.0.0\n                version: 1.0.0\n                metadata:\n                    policy-id: onap.policy.tutorial.demo\n                    policy-version: 1\n                properties:\n                    user: demo\n                    permissions:\n                        -\n                            entity: foo\n                            permission: read\n                        -\n                            entity: foo\n                            permission: write\n        -\n            onap.policy.tutorial.audit:\n                type: onap.policies.Authorization\n                version: 1.0.0\n                type_version: 1.0.0\n                metadata:\n                    policy-id: onap.policy.tutorial.bar\n                    policy-version: 1\n                properties:\n                    user: audit\n                    permissions:\n                        -\n                            entity: foo\n                            permission: read\n",
144                                         "options": {
145                                                 "raw": {
146                                                         "language": "text"
147                                                 }
148                                         }
149                                 },
150                                 "url": {
151                                         "raw": "{{POLICY-API-URL}}/policy/api/v1/policytypes/onap.policies.Authorization/versions/1.0.0/policies",
152                                         "host": [
153                                                 "{{POLICY-API-URL}}"
154                                         ],
155                                         "path": [
156                                                 "policy",
157                                                 "api",
158                                                 "v1",
159                                                 "policytypes",
160                                                 "onap.policies.Authorization",
161                                                 "versions",
162                                                 "1.0.0",
163                                                 "policies"
164                                         ]
165                                 }
166                         },
167                         "response": []
168                 },
169                 {
170                         "name": "PAP Healthcheck",
171                         "request": {
172                                 "auth": {
173                                         "type": "basic",
174                                         "basic": [
175                                                 {
176                                                         "key": "password",
177                                                         "value": "zb!XztG34",
178                                                         "type": "string"
179                                                 },
180                                                 {
181                                                         "key": "username",
182                                                         "value": "healthcheck",
183                                                         "type": "string"
184                                                 }
185                                         ]
186                                 },
187                                 "method": "GET",
188                                 "header": [
189                                         {
190                                                 "key": "Content-Type",
191                                                 "type": "text",
192                                                 "value": "application/json"
193                                         },
194                                         {
195                                                 "key": "Accept",
196                                                 "type": "text",
197                                                 "value": "application/json"
198                                         }
199                                 ],
200                                 "url": {
201                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/healthcheck",
202                                         "host": [
203                                                 "{{POLICY-PAP-URL}}"
204                                         ],
205                                         "path": [
206                                                 "policy",
207                                                 "pap",
208                                                 "v1",
209                                                 "healthcheck"
210                                         ]
211                                 }
212                         },
213                         "response": []
214                 },
215                 {
216                         "name": "PAP Get PDPs",
217                         "request": {
218                                 "auth": {
219                                         "type": "basic",
220                                         "basic": [
221                                                 {
222                                                         "key": "password",
223                                                         "value": "zb!XztG34",
224                                                         "type": "string"
225                                                 },
226                                                 {
227                                                         "key": "username",
228                                                         "value": "healthcheck",
229                                                         "type": "string"
230                                                 }
231                                         ]
232                                 },
233                                 "method": "GET",
234                                 "header": [
235                                         {
236                                                 "key": "Accept",
237                                                 "type": "text",
238                                                 "value": "application/json"
239                                         },
240                                         {
241                                                 "key": "Content-Type",
242                                                 "type": "text",
243                                                 "value": "application/json"
244                                         }
245                                 ],
246                                 "url": {
247                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps",
248                                         "host": [
249                                                 "{{POLICY-PAP-URL}}"
250                                         ],
251                                         "path": [
252                                                 "policy",
253                                                 "pap",
254                                                 "v1",
255                                                 "pdps"
256                                         ]
257                                 }
258                         },
259                         "response": []
260                 },
261                 {
262                         "name": "PdpGroup State Change PASSIVE",
263                         "request": {
264                                 "auth": {
265                                         "type": "basic",
266                                         "basic": [
267                                                 {
268                                                         "key": "password",
269                                                         "value": "zb!XztG34",
270                                                         "type": "string"
271                                                 },
272                                                 {
273                                                         "key": "username",
274                                                         "value": "healthcheck",
275                                                         "type": "string"
276                                                 }
277                                         ]
278                                 },
279                                 "method": "PUT",
280                                 "header": [
281                                         {
282                                                 "key": "Content-Type",
283                                                 "value": "application/json",
284                                                 "type": "text"
285                                         },
286                                         {
287                                                 "key": "Accept",
288                                                 "value": "application/json",
289                                                 "type": "text"
290                                         }
291                                 ],
292                                 "url": {
293                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/groups/defaultGroup?state=PASSIVE",
294                                         "host": [
295                                                 "{{POLICY-PAP-URL}}"
296                                         ],
297                                         "path": [
298                                                 "policy",
299                                                 "pap",
300                                                 "v1",
301                                                 "pdps",
302                                                 "groups",
303                                                 "defaultGroup"
304                                         ],
305                                         "query": [
306                                                 {
307                                                         "key": "state",
308                                                         "value": "PASSIVE"
309                                                 }
310                                         ]
311                                 },
312                                 "description": "This is an API to change the current state of a PdpGroup (example - \"defaultGroup\") resulting in changing state of all the PDP instances registered with the PdpGroup. As of now, the allowed states are ACTIVE and PASSIVE."
313                         },
314                         "response": []
315                 },
316                 {
317                         "name": "Delete PdpGroup",
318                         "request": {
319                                 "auth": {
320                                         "type": "basic",
321                                         "basic": [
322                                                 {
323                                                         "key": "password",
324                                                         "value": "zb!XztG34",
325                                                         "type": "string"
326                                                 },
327                                                 {
328                                                         "key": "username",
329                                                         "value": "healthcheck",
330                                                         "type": "string"
331                                                 }
332                                         ]
333                                 },
334                                 "method": "DELETE",
335                                 "header": [
336                                         {
337                                                 "key": "Accept",
338                                                 "type": "text",
339                                                 "value": "application/json"
340                                         },
341                                         {
342                                                 "key": "Content-Type",
343                                                 "type": "text",
344                                                 "value": "application/json"
345                                         }
346                                 ],
347                                 "url": {
348                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/groups/defaultGroup",
349                                         "host": [
350                                                 "{{POLICY-PAP-URL}}"
351                                         ],
352                                         "path": [
353                                                 "policy",
354                                                 "pap",
355                                                 "v1",
356                                                 "pdps",
357                                                 "groups",
358                                                 "defaultGroup"
359                                         ]
360                                 },
361                                 "description": "This is an API to delete a specific PdpGroup (example - \"SampleGroup\") currently available in Policy DB, resulting in removing all the PDP instances registered with the group."
362                         },
363                         "response": []
364                 },
365                 {
366                         "name": "Create/Update PdpGroup",
367                         "request": {
368                                 "auth": {
369                                         "type": "basic",
370                                         "basic": [
371                                                 {
372                                                         "key": "password",
373                                                         "value": "zb!XztG34",
374                                                         "type": "string"
375                                                 },
376                                                 {
377                                                         "key": "username",
378                                                         "value": "healthcheck",
379                                                         "type": "string"
380                                                 }
381                                         ]
382                                 },
383                                 "method": "POST",
384                                 "header": [
385                                         {
386                                                 "key": "Content-Type",
387                                                 "type": "text",
388                                                 "value": "application/json"
389                                         },
390                                         {
391                                                 "key": "Accept",
392                                                 "type": "text",
393                                                 "value": "application/json"
394                                         }
395                                 ],
396                                 "body": {
397                                         "mode": "raw",
398                                         "raw": "{\n    \"groups\": [\n        {\n            \"name\": \"defaultGroup\",\n            \"pdpGroupState\": \"ACTIVE\",\n            \"properties\": {},\n            \"pdpSubgroups\": [\n                {\n                    \"pdpType\": \"xacml\",\n                    \"desiredInstanceCount\": 1,\n                    \"properties\": {},\n                    \"supportedPolicyTypes\": [\n                        {\n                            \"name\": \"onap.policies.Authorization\",\n                            \"version\": \"1.0.0\"\n                        }\n                    ],\n                    \"policies\": []\n                }\n            ]\n        }\n    ]\n}"
399                                 },
400                                 "url": {
401                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/groups/batch",
402                                         "host": [
403                                                 "{{POLICY-PAP-URL}}"
404                                         ],
405                                         "path": [
406                                                 "policy",
407                                                 "pap",
408                                                 "v1",
409                                                 "pdps",
410                                                 "groups",
411                                                 "batch"
412                                         ]
413                                 },
414                                 "description": "This is a generic API to create/update PdpGroups in Policy DB. However, the supportedPolicyTypes field of PdpSubGroup cannot be changed once created."
415                         },
416                         "response": []
417                 },
418                 {
419                         "name": "Simple Deploy Policy - onap.policy.tutorial.demo",
420                         "request": {
421                                 "auth": {
422                                         "type": "basic",
423                                         "basic": [
424                                                 {
425                                                         "key": "password",
426                                                         "value": "zb!XztG34",
427                                                         "type": "string"
428                                                 },
429                                                 {
430                                                         "key": "username",
431                                                         "value": "healthcheck",
432                                                         "type": "string"
433                                                 }
434                                         ]
435                                 },
436                                 "method": "POST",
437                                 "header": [
438                                         {
439                                                 "key": "Content-Type",
440                                                 "type": "text",
441                                                 "value": "application/json"
442                                         },
443                                         {
444                                                 "key": "Accept",
445                                                 "type": "text",
446                                                 "value": "application/json"
447                                         }
448                                 ],
449                                 "body": {
450                                         "mode": "raw",
451                                         "raw": "{\r\n  \"policies\" : [\r\n    {\r\n      \"policy-id\": \"onap.policy.tutorial.demo\",\r\n      \"policy-version\": \"1.0.0\"\r\n    },\r\n    {\r\n      \"policy-id\": \"onap.policy.tutorial.audit\",\r\n      \"policy-version\": \"1.0.0\"\r\n    }\r\n    ]\r\n}"
452                                 },
453                                 "url": {
454                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/policies",
455                                         "host": [
456                                                 "{{POLICY-PAP-URL}}"
457                                         ],
458                                         "path": [
459                                                 "policy",
460                                                 "pap",
461                                                 "v1",
462                                                 "pdps",
463                                                 "policies"
464                                         ]
465                                 }
466                         },
467                         "response": []
468                 },
469                 {
470                         "name": "Dmaap Simulator - Policy Update Notification",
471                         "protocolProfileBehavior": {
472                                 "disableBodyPruning": true
473                         },
474                         "request": {
475                                 "auth": {
476                                         "type": "noauth"
477                                 },
478                                 "method": "GET",
479                                 "header": [
480                                         {
481                                                 "key": "Content-Type",
482                                                 "type": "text",
483                                                 "value": "application/json"
484                                         },
485                                         {
486                                                 "key": "Accept",
487                                                 "type": "text",
488                                                 "value": "application/json"
489                                         }
490                                 ],
491                                 "body": {
492                                         "mode": "raw",
493                                         "raw": ""
494                                 },
495                                 "url": {
496                                         "raw": "{{DMAAP-URL}}/events/POLICY-NOTIFICATION/group/id?timeout=5000",
497                                         "host": [
498                                                 "{{DMAAP-URL}}"
499                                         ],
500                                         "path": [
501                                                 "events",
502                                                 "POLICY-NOTIFICATION",
503                                                 "group",
504                                                 "id"
505                                         ],
506                                         "query": [
507                                                 {
508                                                         "key": "timeout",
509                                                         "value": "5000"
510                                                 }
511                                         ]
512                                 }
513                         },
514                         "response": []
515                 },
516                 {
517                         "name": "Xacml Healthcheck",
518                         "request": {
519                                 "auth": {
520                                         "type": "basic",
521                                         "basic": [
522                                                 {
523                                                         "key": "password",
524                                                         "value": "zb!XztG34",
525                                                         "type": "string"
526                                                 },
527                                                 {
528                                                         "key": "username",
529                                                         "value": "healthcheck",
530                                                         "type": "string"
531                                                 }
532                                         ]
533                                 },
534                                 "method": "GET",
535                                 "header": [
536                                         {
537                                                 "key": "Content-Type",
538                                                 "type": "text",
539                                                 "value": "application/json"
540                                         },
541                                         {
542                                                 "key": "Accept",
543                                                 "type": "text",
544                                                 "value": "application/json"
545                                         }
546                                 ],
547                                 "url": {
548                                         "raw": "{{POLICY-XACML-URL}}/policy/pdpx/v1/healthcheck",
549                                         "host": [
550                                                 "{{POLICY-XACML-URL}}"
551                                         ],
552                                         "path": [
553                                                 "policy",
554                                                 "pdpx",
555                                                 "v1",
556                                                 "healthcheck"
557                                         ]
558                                 }
559                         },
560                         "response": []
561                 },
562                 {
563                         "name": "Xacml Statistics",
564                         "request": {
565                                 "auth": {
566                                         "type": "basic",
567                                         "basic": [
568                                                 {
569                                                         "key": "password",
570                                                         "value": "zb!XztG34",
571                                                         "type": "string"
572                                                 },
573                                                 {
574                                                         "key": "username",
575                                                         "value": "healthcheck",
576                                                         "type": "string"
577                                                 }
578                                         ]
579                                 },
580                                 "method": "GET",
581                                 "header": [
582                                         {
583                                                 "key": "Content-Type",
584                                                 "type": "text",
585                                                 "value": "application/json"
586                                         },
587                                         {
588                                                 "key": "Accept",
589                                                 "type": "text",
590                                                 "value": "application/json"
591                                         }
592                                 ],
593                                 "url": {
594                                         "raw": "{{POLICY-XACML-URL}}/policy/pdpx/v1/statistics",
595                                         "host": [
596                                                 "{{POLICY-XACML-URL}}"
597                                         ],
598                                         "path": [
599                                                 "policy",
600                                                 "pdpx",
601                                                 "v1",
602                                                 "statistics"
603                                         ]
604                                 }
605                         },
606                         "response": []
607                 },
608                 {
609                         "name": "Xacml Decision - Authorization policy-type",
610                         "request": {
611                                 "auth": {
612                                         "type": "basic",
613                                         "basic": [
614                                                 {
615                                                         "key": "password",
616                                                         "value": "zb!XztG34",
617                                                         "type": "string"
618                                                 },
619                                                 {
620                                                         "key": "username",
621                                                         "value": "healthcheck",
622                                                         "type": "string"
623                                                 }
624                                         ]
625                                 },
626                                 "method": "POST",
627                                 "header": [
628                                         {
629                                                 "key": "Content-Type",
630                                                 "type": "text",
631                                                 "value": "application/json"
632                                         },
633                                         {
634                                                 "key": "Accept",
635                                                 "type": "text",
636                                                 "value": "application/json"
637                                         }
638                                 ],
639                                 "body": {
640                                         "mode": "raw",
641                                         "raw": "{\n  \"ONAPName\": \"TutorialPEP\",\n  \"ONAPComponent\": \"TutorialPEPComponent\",\n  \"ONAPInstance\": \"TutorialPEPInstance\",\n  \"requestId\": \"unique-request-id-tutorial\",\n  \"action\": \"authorize\",\n  \"resource\": {\n    \"user\": \"audit\",\n    \"entity\": \"foo\",\n    \"permission\" : \"read\"\n  }\n}"
642                                 },
643                                 "url": {
644                                         "raw": "{{POLICY-XACML-URL}}/policy/pdpx/v1/decision",
645                                         "host": [
646                                                 "{{POLICY-XACML-URL}}"
647                                         ],
648                                         "path": [
649                                                 "policy",
650                                                 "pdpx",
651                                                 "v1",
652                                                 "decision"
653                                         ]
654                                 }
655                         },
656                         "response": []
657                 },
658                 {
659                         "name": "Simple Undeploy Policy",
660                         "request": {
661                                 "auth": {
662                                         "type": "basic",
663                                         "basic": [
664                                                 {
665                                                         "key": "password",
666                                                         "value": "zb!XztG34",
667                                                         "type": "string"
668                                                 },
669                                                 {
670                                                         "key": "username",
671                                                         "value": "healthcheck",
672                                                         "type": "string"
673                                                 }
674                                         ]
675                                 },
676                                 "method": "DELETE",
677                                 "header": [
678                                         {
679                                                 "key": "Accept",
680                                                 "value": "application/json",
681                                                 "type": "text"
682                                         },
683                                         {
684                                                 "key": "Content-Type",
685                                                 "value": "application/json",
686                                                 "type": "text"
687                                         }
688                                 ],
689                                 "url": {
690                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/policies/onap.policy.tutorial.demo",
691                                         "host": [
692                                                 "{{POLICY-PAP-URL}}"
693                                         ],
694                                         "path": [
695                                                 "policy",
696                                                 "pap",
697                                                 "v1",
698                                                 "pdps",
699                                                 "policies",
700                                                 "onap.policy.tutorial.demo"
701                                         ]
702                                 }
703                         },
704                         "response": []
705                 }
706         ],
707         "auth": {
708                 "type": "basic",
709                 "basic": [
710                         {
711                                 "key": "password",
712                                 "value": "",
713                                 "type": "string"
714                         },
715                         {
716                                 "key": "username",
717                                 "value": "",
718                                 "type": "string"
719                         }
720                 ]
721         },
722         "protocolProfileBehavior": {}
723 }