Add auth key for 0.0.0.0/0 in LISP perf tests 65/36265/3
authorLorand Jakab <lojakab@cisco.com>
Tue, 15 Mar 2016 18:35:59 +0000 (20:35 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 16 Mar 2016 15:26:42 +0000 (15:26 +0000)
We recently discovered a security issue in lispflowmapping and an
explicitly configured authentication key is needed since the fix was
committed to allow southbound Map-Register messages to write into the
mapping database.  This patch adds such a key for the Map-Register tests
to produce usable results (notifies/s graph has value 0).

Change-Id: I14bac6c92f040abce71f40a24c531b9ca8e312b3
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
csit/suites/lispflowmapping/performance/010_Southbound_MapRequest.robot
csit/variables/lispflowmapping/Be/rpc_add-key_default.json [new file with mode: 0644]

index 0dbff1d42c6d6f29d92061966a7b1589959e3e03..96ba70d9fa2b3801f739a0593f620d3ee196cc7e 100644 (file)
@@ -8,6 +8,7 @@ Library           OperatingSystem
 Library           RequestsLibrary
 Library           String
 Resource          ../../../libraries/Utils.robot
+Resource          ../../../libraries/LISPFlowMapping.robot
 Variables         ../../../variables/Variables.py
 
 *** Variables ***
@@ -44,6 +45,7 @@ Generate Map-Request Test Traffic
     Set Suite Variable    ${get_seconds_mreq}
 
 Generate Map-Register Test Traffic
+    Allow Unauthenticated Map-Registers
     ${result}=    Run Process With Logging And Status Check    /usr/local/bin/udpreplay    --pps    ${REPLAY_PPS}    --repeat    ${REPLAY_CNT}
     ...    --host    ${ODL_SYSTEM_IP}    --port    4342    ${REPLAY_FILE_MREG}
     ${partial}=    Fetch From Left    ${result.stdout}    s =
@@ -73,6 +75,10 @@ Reset Stats
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
 
+Allow Unauthenticated Map-Registers
+    ${add_key}=    OperatingSystem.Get File    ${JSON_DIR}/rpc_add-key_default.json
+    Post Log Check    ${LFM_RPC_API}:add-key    ${add_key}
+
 Get Transmitted Map-Requests Stats
     ${resp}=    RequestsLibrary.Post Request    session    ${LFM_SB_RPC_API}:get-stats
     Log    ${resp.content}
diff --git a/csit/variables/lispflowmapping/Be/rpc_add-key_default.json b/csit/variables/lispflowmapping/Be/rpc_add-key_default.json
new file mode 100644 (file)
index 0000000..47ac82b
--- /dev/null
@@ -0,0 +1,11 @@
+{
+    "input": {
+        "eid": {
+            "address-type": "ietf-lisp-address-types:ipv4-prefix-afi",
+            "ipv4-prefix": "0.0.0.0/0"
+        },
+        "mapping-authkey": {
+            "key-type": 0
+        }
+    }
+}