Update AAA documentation 63/105063/2
authorPeter Suna <peter.suna@pantheon.tech>
Fri, 17 Feb 2023 13:02:28 +0000 (14:02 +0100)
committerPeter Suna <peter.suna@pantheon.tech>
Wed, 12 Apr 2023 17:41:40 +0000 (19:41 +0200)
Use only RFC8040 in RESTCONF requests.
Add missing mandatory "index" field to the policies request.
Fix wrong path for h2 database jar.

JIRA: AAA-249
Change-Id: Ief534eaa633a45321a1792cffc609f35413f0279
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
(cherry picked from commit 7c46e5941cc395448bf69b6e96c3c4c07aec425e)

docs/dev-guide.rst
docs/user-guide.rst

index df555d1c9d80e17e40d2d9643321b2657738bfb8..525d73b7f1e84424e36b19d30b2c032c2f453c81 100644 (file)
@@ -266,7 +266,7 @@ command to enable the user interface:
 
 .. code-block:: bash
 
-    java -cp ./data/cache/org.eclipse.osgi/bundles/217/1/.cp/h2-1.4.185.jar
+    java -cp ./system/com/h2database/h2/2.1.214/h2-2.1.214.jar
         org.h2.tools.Server -trace -pg -web -webAllowOthers -baseDir `pwd`
 
 
@@ -401,26 +401,32 @@ This an example on how to limit access to the modules endpoint:
 ::
 
     HTTP Operation:
-    put URL: /restconf/config/aaa:http-authorization/policies
+    put URL: /rests/data/aaa:http-authorization/policies
 
     headers: Content-Type: application/json Accept: application/json
 
     body:
-      { "aaa:policies":
-        { "aaa:policies":
-          [ { "aaa:resource": "/restconf/modules/**",
-            "aaa:permissions": [ { "aaa:role": "admin",
-                                   "aaa:actions": [ "get",
-                                                    "post",
-                                                    "put",
-                                                    "patch",
-                                                    "delete"
-                                                  ]
-                                 }
-                               ]
-            }
-          ]
-        }
+      {
+          "aaa:policies": {
+              "aaa:policies": [
+                  {
+                      "aaa:resource": "/restconf/modules/**",
+                      "aaa:index": 1,
+                      "aaa:permissions": [
+                          {
+                              "aaa:role": "admin",
+                              "aaa:actions": [
+                                  "get",
+                                  "post",
+                                  "put",
+                                  "patch",
+                                  "delete"
+                              ]
+                          }
+                      ]
+                  }
+              ]
+          }
       }
 
 The above example locks down access to the modules endpoint (and any URLS
@@ -490,7 +496,7 @@ feature or module:
 
 1. It is assumed that there exists an already created OpenDaylight distribution
    project following `this guide
-   <https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Startup_Project_Archetype#Part_1_-_Build_with_a_simple_.27Example.27_module>`_.
+   <https://docs.opendaylight.org/en/stable-chlorine/developer-guides/developing-apps-on-the-opendaylight-controller.html#building-an-example-module>`_.
 
 2. In the implementation bundle the following artifact must be added to its
    *pom.xml* file as dependency.
@@ -612,7 +618,7 @@ AAA Encryption Service with an OpenDaylight distribution project to encrypt data
 
 1. It is assumed that there exists an already created OpenDaylight distribution
    project following `this guide
-   <https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Startup_Project_Archetype#Part_1_-_Build_with_a_simple_.27Example.27_module>`_.
+   <https://docs.opendaylight.org/en/stable-chlorine/developer-guides/developing-apps-on-the-opendaylight-controller.html#building-an-example-module>`_.
 
 2. In the implementation bundle the following artifact must be added to its
    *pom.xml* file as dependency.
index c0031cd9f38a885b631b450b145fb8d7781f60f4..97c57287fb5c8620c9d451efc6b1022464f640b1 100644 (file)
@@ -816,30 +816,32 @@ This an example on how to limit access to the modules endpoint:
 ::
 
     HTTP Operation:
-    put URL: /restconf/config/aaa:http-authorization/policies
-
-    or
-
-    put RFC8040 URL: /rests/data/aaa:http-authorization/policies
+    put URL: /rests/data/aaa:http-authorization/policies
 
     headers: Content-Type: application/json Accept: application/json
 
     body:
-      { "aaa:policies":
-        { "aaa:policies":
-          [ { "aaa:resource": "/restconf/modules/**",
-            "aaa:permissions": [ { "aaa:role": "admin",
-                                   "aaa:actions": [ "get",
-                                                    "post",
-                                                    "put",
-                                                    "patch",
-                                                    "delete"
-                                                  ]
-                                 }
-                               ]
-            }
-          ]
-        }
+      {
+          "aaa:policies": {
+              "aaa:policies": [
+                  {
+                      "aaa:resource": "/restconf/modules/**",
+                      "aaa:index": 1,
+                      "aaa:permissions": [
+                          {
+                              "aaa:role": "admin",
+                              "aaa:actions": [
+                                  "get",
+                                  "post",
+                                  "put",
+                                  "patch",
+                                  "delete"
+                              ]
+                          }
+                      ]
+                  }
+              ]
+          }
       }
 
 The above example locks down access to the modules endpoint (and any URLS