Support for kafka within xacml tutorial
[policy/xacml-pdp.git] / tutorials / tutorial-xacml-application / postman / 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": "policyadmin",
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                 {
57                         "name": "Create Authorization Policy Type",
58                         "request": {
59                                 "auth": {
60                                         "type": "basic",
61                                         "basic": [
62                                                 {
63                                                         "key": "password",
64                                                         "value": "zb!XztG34",
65                                                         "type": "string"
66                                                 },
67                                                 {
68                                                         "key": "username",
69                                                         "value": "policyadmin",
70                                                         "type": "string"
71                                                 }
72                                         ]
73                                 },
74                                 "method": "POST",
75                                 "header": [
76                                         {
77                                                 "key": "Accept",
78                                                 "type": "text",
79                                                 "value": "application/yaml"
80                                         },
81                                         {
82                                                 "key": "Content-Type",
83                                                 "type": "text",
84                                                 "value": "application/yaml"
85                                         }
86                                 ],
87                                 "body": {
88                                         "mode": "raw",
89                                         "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",
90                                         "options": {
91                                                 "raw": {
92                                                         "language": "text"
93                                                 }
94                                         }
95                                 },
96                                 "url": {
97                                         "raw": "{{POLICY-API-URL}}/policy/api/v1/policytypes",
98                                         "host": [
99                                                 "{{POLICY-API-URL}}"
100                                         ],
101                                         "path": [
102                                                 "policy",
103                                                 "api",
104                                                 "v1",
105                                                 "policytypes"
106                                         ]
107                                 }
108                         },
109                         "response": [
110                         ]
111                 },
112                 {
113                         "name": "Create policies",
114                         "request": {
115                                 "auth": {
116                                         "type": "basic",
117                                         "basic": [
118                                                 {
119                                                         "key": "password",
120                                                         "value": "zb!XztG34",
121                                                         "type": "string"
122                                                 },
123                                                 {
124                                                         "key": "username",
125                                                         "value": "policyadmin",
126                                                         "type": "string"
127                                                 }
128                                         ]
129                                 },
130                                 "method": "POST",
131                                 "header": [
132                                         {
133                                                 "key": "Accept",
134                                                 "type": "text",
135                                                 "value": "application/yaml"
136                                         },
137                                         {
138                                                 "key": "Content-Type",
139                                                 "type": "text",
140                                                 "value": "application/yaml"
141                                         }
142                                 ],
143                                 "body": {
144                                         "mode": "raw",
145                                         "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",
146                                         "options": {
147                                                 "raw": {
148                                                         "language": "text"
149                                                 }
150                                         }
151                                 },
152                                 "url": {
153                                         "raw": "{{POLICY-API-URL}}/policy/api/v1/policytypes/onap.policies.Authorization/versions/1.0.0/policies",
154                                         "host": [
155                                                 "{{POLICY-API-URL}}"
156                                         ],
157                                         "path": [
158                                                 "policy",
159                                                 "api",
160                                                 "v1",
161                                                 "policytypes",
162                                                 "onap.policies.Authorization",
163                                                 "versions",
164                                                 "1.0.0",
165                                                 "policies"
166                                         ]
167                                 }
168                         },
169                         "response": [
170                         ]
171                 },
172                 {
173                         "name": "PAP Healthcheck",
174                         "request": {
175                                 "auth": {
176                                         "type": "basic",
177                                         "basic": [
178                                                 {
179                                                         "key": "password",
180                                                         "value": "zb!XztG34",
181                                                         "type": "string"
182                                                 },
183                                                 {
184                                                         "key": "username",
185                                                         "value": "policyadmin",
186                                                         "type": "string"
187                                                 }
188                                         ]
189                                 },
190                                 "method": "GET",
191                                 "header": [
192                                         {
193                                                 "key": "Content-Type",
194                                                 "type": "text",
195                                                 "value": "application/json"
196                                         },
197                                         {
198                                                 "key": "Accept",
199                                                 "type": "text",
200                                                 "value": "application/json"
201                                         }
202                                 ],
203                                 "url": {
204                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/healthcheck",
205                                         "host": [
206                                                 "{{POLICY-PAP-URL}}"
207                                         ],
208                                         "path": [
209                                                 "policy",
210                                                 "pap",
211                                                 "v1",
212                                                 "healthcheck"
213                                         ]
214                                 }
215                         },
216                         "response": [
217                         ]
218                 },
219                 {
220                         "name": "PAP Get PDPs",
221                         "request": {
222                                 "auth": {
223                                         "type": "basic",
224                                         "basic": [
225                                                 {
226                                                         "key": "password",
227                                                         "value": "zb!XztG34",
228                                                         "type": "string"
229                                                 },
230                                                 {
231                                                         "key": "username",
232                                                         "value": "policyadmin",
233                                                         "type": "string"
234                                                 }
235                                         ]
236                                 },
237                                 "method": "GET",
238                                 "header": [
239                                         {
240                                                 "key": "Accept",
241                                                 "type": "text",
242                                                 "value": "application/json"
243                                         },
244                                         {
245                                                 "key": "Content-Type",
246                                                 "type": "text",
247                                                 "value": "application/json"
248                                         }
249                                 ],
250                                 "url": {
251                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps",
252                                         "host": [
253                                                 "{{POLICY-PAP-URL}}"
254                                         ],
255                                         "path": [
256                                                 "policy",
257                                                 "pap",
258                                                 "v1",
259                                                 "pdps"
260                                         ]
261                                 }
262                         },
263                         "response": [
264                         ]
265                 },
266                 {
267                         "name": "PdpGroup State Change PASSIVE",
268                         "request": {
269                                 "auth": {
270                                         "type": "basic",
271                                         "basic": [
272                                                 {
273                                                         "key": "password",
274                                                         "value": "zb!XztG34",
275                                                         "type": "string"
276                                                 },
277                                                 {
278                                                         "key": "username",
279                                                         "value": "policyadmin",
280                                                         "type": "string"
281                                                 }
282                                         ]
283                                 },
284                                 "method": "PUT",
285                                 "header": [
286                                         {
287                                                 "key": "Content-Type",
288                                                 "value": "application/json",
289                                                 "type": "text"
290                                         },
291                                         {
292                                                 "key": "Accept",
293                                                 "value": "application/json",
294                                                 "type": "text"
295                                         }
296                                 ],
297                                 "url": {
298                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/groups/defaultGroup?state=PASSIVE",
299                                         "host": [
300                                                 "{{POLICY-PAP-URL}}"
301                                         ],
302                                         "path": [
303                                                 "policy",
304                                                 "pap",
305                                                 "v1",
306                                                 "pdps",
307                                                 "groups",
308                                                 "defaultGroup"
309                                         ],
310                                         "query": [
311                                                 {
312                                                         "key": "state",
313                                                         "value": "PASSIVE"
314                                                 }
315                                         ]
316                                 },
317                                 "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."
318                         },
319                         "response": [
320                         ]
321                 },
322                 {
323                         "name": "Delete PdpGroup",
324                         "request": {
325                                 "auth": {
326                                         "type": "basic",
327                                         "basic": [
328                                                 {
329                                                         "key": "password",
330                                                         "value": "zb!XztG34",
331                                                         "type": "string"
332                                                 },
333                                                 {
334                                                         "key": "username",
335                                                         "value": "policyadmin",
336                                                         "type": "string"
337                                                 }
338                                         ]
339                                 },
340                                 "method": "DELETE",
341                                 "header": [
342                                         {
343                                                 "key": "Accept",
344                                                 "type": "text",
345                                                 "value": "application/json"
346                                         },
347                                         {
348                                                 "key": "Content-Type",
349                                                 "type": "text",
350                                                 "value": "application/json"
351                                         }
352                                 ],
353                                 "url": {
354                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/groups/defaultGroup",
355                                         "host": [
356                                                 "{{POLICY-PAP-URL}}"
357                                         ],
358                                         "path": [
359                                                 "policy",
360                                                 "pap",
361                                                 "v1",
362                                                 "pdps",
363                                                 "groups",
364                                                 "defaultGroup"
365                                         ]
366                                 },
367                                 "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."
368                         },
369                         "response": [
370                         ]
371                 },
372                 {
373                         "name": "Create/Update PdpGroup",
374                         "request": {
375                                 "auth": {
376                                         "type": "basic",
377                                         "basic": [
378                                                 {
379                                                         "key": "password",
380                                                         "value": "zb!XztG34",
381                                                         "type": "string"
382                                                 },
383                                                 {
384                                                         "key": "username",
385                                                         "value": "policyadmin",
386                                                         "type": "string"
387                                                 }
388                                         ]
389                                 },
390                                 "method": "POST",
391                                 "header": [
392                                         {
393                                                 "key": "Content-Type",
394                                                 "type": "text",
395                                                 "value": "application/json"
396                                         },
397                                         {
398                                                 "key": "Accept",
399                                                 "type": "text",
400                                                 "value": "application/json"
401                                         }
402                                 ],
403                                 "body": {
404                                         "mode": "raw",
405                                         "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}"
406                                 },
407                                 "url": {
408                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/groups/batch",
409                                         "host": [
410                                                 "{{POLICY-PAP-URL}}"
411                                         ],
412                                         "path": [
413                                                 "policy",
414                                                 "pap",
415                                                 "v1",
416                                                 "pdps",
417                                                 "groups",
418                                                 "batch"
419                                         ]
420                                 },
421                                 "description": "This is a generic API to create/update PdpGroups in Policy DB. However, the supportedPolicyTypes field of PdpSubGroup cannot be changed once created."
422                         },
423                         "response": [
424                         ]
425                 },
426                 {
427                         "name": "Simple Deploy Policy - onap.policy.tutorial.demo",
428                         "request": {
429                                 "auth": {
430                                         "type": "basic",
431                                         "basic": [
432                                                 {
433                                                         "key": "password",
434                                                         "value": "zb!XztG34",
435                                                         "type": "string"
436                                                 },
437                                                 {
438                                                         "key": "username",
439                                                         "value": "policyadmin",
440                                                         "type": "string"
441                                                 }
442                                         ]
443                                 },
444                                 "method": "POST",
445                                 "header": [
446                                         {
447                                                 "key": "Content-Type",
448                                                 "type": "text",
449                                                 "value": "application/json"
450                                         },
451                                         {
452                                                 "key": "Accept",
453                                                 "type": "text",
454                                                 "value": "application/json"
455                                         }
456                                 ],
457                                 "body": {
458                                         "mode": "raw",
459                                         "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}"
460                                 },
461                                 "url": {
462                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/policies",
463                                         "host": [
464                                                 "{{POLICY-PAP-URL}}"
465                                         ],
466                                         "path": [
467                                                 "policy",
468                                                 "pap",
469                                                 "v1",
470                                                 "pdps",
471                                                 "policies"
472                                         ]
473                                 }
474                         },
475                         "response": [
476                         ]
477                 },
478                 {
479                         "name": "Xacml Healthcheck",
480                         "request": {
481                                 "auth": {
482                                         "type": "basic",
483                                         "basic": [
484                                                 {
485                                                         "key": "password",
486                                                         "value": "zb!XztG34",
487                                                         "type": "string"
488                                                 },
489                                                 {
490                                                         "key": "username",
491                                                         "value": "policyadmin",
492                                                         "type": "string"
493                                                 }
494                                         ]
495                                 },
496                                 "method": "GET",
497                                 "header": [
498                                         {
499                                                 "key": "Content-Type",
500                                                 "type": "text",
501                                                 "value": "application/json"
502                                         },
503                                         {
504                                                 "key": "Accept",
505                                                 "type": "text",
506                                                 "value": "application/json"
507                                         }
508                                 ],
509                                 "url": {
510                                         "raw": "{{POLICY-XACML-URL}}/policy/pdpx/v1/healthcheck",
511                                         "host": [
512                                                 "{{POLICY-XACML-URL}}"
513                                         ],
514                                         "path": [
515                                                 "policy",
516                                                 "pdpx",
517                                                 "v1",
518                                                 "healthcheck"
519                                         ]
520                                 }
521                         },
522                         "response": [
523                         ]
524                 },
525                 {
526                         "name": "Xacml Statistics",
527                         "request": {
528                                 "auth": {
529                                         "type": "basic",
530                                         "basic": [
531                                                 {
532                                                         "key": "password",
533                                                         "value": "zb!XztG34",
534                                                         "type": "string"
535                                                 },
536                                                 {
537                                                         "key": "username",
538                                                         "value": "policyadmin",
539                                                         "type": "string"
540                                                 }
541                                         ]
542                                 },
543                                 "method": "GET",
544                                 "header": [
545                                         {
546                                                 "key": "Content-Type",
547                                                 "type": "text",
548                                                 "value": "application/json"
549                                         },
550                                         {
551                                                 "key": "Accept",
552                                                 "type": "text",
553                                                 "value": "application/json"
554                                         }
555                                 ],
556                                 "url": {
557                                         "raw": "{{POLICY-XACML-URL}}/policy/pdpx/v1/statistics",
558                                         "host": [
559                                                 "{{POLICY-XACML-URL}}"
560                                         ],
561                                         "path": [
562                                                 "policy",
563                                                 "pdpx",
564                                                 "v1",
565                                                 "statistics"
566                                         ]
567                                 }
568                         },
569                         "response": [
570                         ]
571                 },
572                 {
573                         "name": "Xacml Decision - Authorization policy-type",
574                         "request": {
575                                 "auth": {
576                                         "type": "basic",
577                                         "basic": [
578                                                 {
579                                                         "key": "password",
580                                                         "value": "zb!XztG34",
581                                                         "type": "string"
582                                                 },
583                                                 {
584                                                         "key": "username",
585                                                         "value": "policyadmin",
586                                                         "type": "string"
587                                                 }
588                                         ]
589                                 },
590                                 "method": "POST",
591                                 "header": [
592                                         {
593                                                 "key": "Content-Type",
594                                                 "type": "text",
595                                                 "value": "application/json"
596                                         },
597                                         {
598                                                 "key": "Accept",
599                                                 "type": "text",
600                                                 "value": "application/json"
601                                         }
602                                 ],
603                                 "body": {
604                                         "mode": "raw",
605                                         "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}"
606                                 },
607                                 "url": {
608                                         "raw": "{{POLICY-XACML-URL}}/policy/pdpx/v1/decision",
609                                         "host": [
610                                                 "{{POLICY-XACML-URL}}"
611                                         ],
612                                         "path": [
613                                                 "policy",
614                                                 "pdpx",
615                                                 "v1",
616                                                 "decision"
617                                         ]
618                                 }
619                         },
620                         "response": [
621                         ]
622                 },
623                 {
624                         "name": "Simple Undeploy Policy",
625                         "request": {
626                                 "auth": {
627                                         "type": "basic",
628                                         "basic": [
629                                                 {
630                                                         "key": "password",
631                                                         "value": "zb!XztG34",
632                                                         "type": "string"
633                                                 },
634                                                 {
635                                                         "key": "username",
636                                                         "value": "policyadmin",
637                                                         "type": "string"
638                                                 }
639                                         ]
640                                 },
641                                 "method": "DELETE",
642                                 "header": [
643                                         {
644                                                 "key": "Accept",
645                                                 "value": "application/json",
646                                                 "type": "text"
647                                         },
648                                         {
649                                                 "key": "Content-Type",
650                                                 "value": "application/json",
651                                                 "type": "text"
652                                         }
653                                 ],
654                                 "url": {
655                                         "raw": "{{POLICY-PAP-URL}}/policy/pap/v1/pdps/policies/onap.policy.tutorial.demo",
656                                         "host": [
657                                                 "{{POLICY-PAP-URL}}"
658                                         ],
659                                         "path": [
660                                                 "policy",
661                                                 "pap",
662                                                 "v1",
663                                                 "pdps",
664                                                 "policies",
665                                                 "onap.policy.tutorial.demo"
666                                         ]
667                                 }
668                         },
669                         "response": [
670                         ]
671                 }
672         ],
673         "auth": {
674                 "type": "basic",
675                 "basic": [
676                         {
677                                 "key": "password",
678                                 "value": "",
679                                 "type": "string"
680                         },
681                         {
682                                 "key": "username",
683                                 "value": "",
684                                 "type": "string"
685                         }
686                 ]
687         },
688         "protocolProfileBehavior": {
689         }
690 }