added two scenarios testing repeated authentication (RFC 4478)
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 25 Nov 2007 15:47:58 +0000 (15:47 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 25 Nov 2007 15:47:58 +0000 (15:47 -0000)
14 files changed:
testing/tests/ikev2/reauth-early/description.txt [new file with mode: 0644]
testing/tests/ikev2/reauth-early/evaltest.dat [new file with mode: 0644]
testing/tests/ikev2/reauth-early/hosts/carol/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ikev2/reauth-early/hosts/moon/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ikev2/reauth-early/posttest.dat [new file with mode: 0644]
testing/tests/ikev2/reauth-early/pretest.dat [new file with mode: 0644]
testing/tests/ikev2/reauth-early/test.conf [new file with mode: 0644]
testing/tests/ikev2/reauth-late/description.txt [new file with mode: 0644]
testing/tests/ikev2/reauth-late/evaltest.dat [new file with mode: 0644]
testing/tests/ikev2/reauth-late/hosts/carol/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ikev2/reauth-late/hosts/moon/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ikev2/reauth-late/posttest.dat [new file with mode: 0644]
testing/tests/ikev2/reauth-late/pretest.dat [new file with mode: 0644]
testing/tests/ikev2/reauth-late/test.conf [new file with mode: 0644]

diff --git a/testing/tests/ikev2/reauth-early/description.txt b/testing/tests/ikev2/reauth-early/description.txt
new file mode 100644 (file)
index 0000000..130d08d
--- /dev/null
@@ -0,0 +1,7 @@
+This scenario tests <b>repeated authentication</b> according to RFC 4478.
+The iniator <b>carol</b> sets a large <b>ikelifetime=20m</b> but the responder
+<b>moon</b> defining a much shorter <b>ikelifetime=30s</b> proposes this
+value via an AUTH_LIFETIME notification to the initiator. Thus the 
+IKE reauthentication takes places after less than 30s. A ping from
+<b>carol</b> to client <b>alice</b> hiding in the subnet behind <b>moon</b>
+tests if the CHILD_SA has been inherited by the new IKE_SA.
diff --git a/testing/tests/ikev2/reauth-early/evaltest.dat b/testing/tests/ikev2/reauth-early/evaltest.dat
new file mode 100644 (file)
index 0000000..6d8e6f6
--- /dev/null
@@ -0,0 +1,7 @@
+moon::ipsec statusall::rw\[2\].*ESTABLISHED::YES
+carol::ipsec statusall::home\[2\].*ESTABLISHED::YES
+carol::cat /var/log/daemon.log::received AUTH_LIFETIME of 30s, scheduling reauthentication in 25s::YES
+carol::cat /var/log/daemon.log::maximum IKE_SA lifetime 30s::YES
+carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
+moon::tcpdump::IP carol.strongswan.org > moon.strongswan.org: ESP::YES
+moon::tcpdump::IP moon.strongswan.org > carol.strongswan.org: ESP::YES
diff --git a/testing/tests/ikev2/reauth-early/hosts/carol/etc/ipsec.conf b/testing/tests/ikev2/reauth-early/hosts/carol/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..311dc3d
--- /dev/null
@@ -0,0 +1,23 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+        crlcheckinterval=180
+       strictcrlpolicy=no
+       plutostart=no
+
+conn %default
+       ikelifetime=60m
+       keylife=20m
+       rekeymargin=5s
+       keyingtries=1
+
+conn home
+       left=PH_IP_CAROL
+       leftcert=carolCert.pem
+       leftid=carol@strongswan.org
+       leftfirewall=yes
+       right=PH_IP_MOON
+       rightid=@moon.strongswan.org
+       rightsubnet=10.1.0.0/16
+       keyexchange=ikev2
+       auto=add
diff --git a/testing/tests/ikev2/reauth-early/hosts/moon/etc/ipsec.conf b/testing/tests/ikev2/reauth-early/hosts/moon/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..64a7aef
--- /dev/null
@@ -0,0 +1,22 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+        crlcheckinterval=180
+       strictcrlpolicy=no
+       plutostart=no
+
+conn %default
+       ikelifetime=30s
+       keylife=20m
+       rekeymargin=0s
+       keyingtries=1
+
+conn rw
+       left=PH_IP_MOON
+       leftcert=moonCert.pem
+       leftid=@moon.strongswan.org
+       leftsubnet=10.1.0.0/16
+       leftfirewall=yes
+       right=%any
+       keyexchange=ikev2
+       auto=add
diff --git a/testing/tests/ikev2/reauth-early/posttest.dat b/testing/tests/ikev2/reauth-early/posttest.dat
new file mode 100644 (file)
index 0000000..94a4006
--- /dev/null
@@ -0,0 +1,4 @@
+moon::ipsec stop
+carol::ipsec stop
+moon::/etc/init.d/iptables stop 2> /dev/null
+carol::/etc/init.d/iptables stop 2> /dev/null
diff --git a/testing/tests/ikev2/reauth-early/pretest.dat b/testing/tests/ikev2/reauth-early/pretest.dat
new file mode 100644 (file)
index 0000000..7ed2423
--- /dev/null
@@ -0,0 +1,7 @@
+moon::/etc/init.d/iptables start 2> /dev/null
+carol::/etc/init.d/iptables start 2> /dev/null
+moon::ipsec start
+carol::ipsec start
+carol::sleep 1
+carol::ipsec up home
+carol::sleep 30
diff --git a/testing/tests/ikev2/reauth-early/test.conf b/testing/tests/ikev2/reauth-early/test.conf
new file mode 100644 (file)
index 0000000..9cd583b
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# This configuration file provides information on the
+# UML instances used for this test
+
+# All UML instances that are required for this test
+#
+UMLHOSTS="alice moon carol winnetou"
+
+# Corresponding block diagram
+#
+DIAGRAM="a-m-c-w.png"
+
+# UML instances on which tcpdump is to be started
+#
+TCPDUMPHOSTS="moon"
+
+# UML instances on which IPsec is started
+# Used for IPsec logging purposes
+#
+IPSECHOSTS="moon carol"
diff --git a/testing/tests/ikev2/reauth-late/description.txt b/testing/tests/ikev2/reauth-late/description.txt
new file mode 100644 (file)
index 0000000..e4f05e1
--- /dev/null
@@ -0,0 +1,8 @@
+This scenario tests <b>repeated authentication</b> according to RFC 4478.
+The iniator <b>carol</b> sets a short <b>ikelifetime=20m</b> but the responder
+<b>moon</b> defining a much larger <b>ikelifetime=30s</b> proposes this
+value via an AUTH_LIFETIME notification to the initiator. The initatior
+ignores this notification and schedules the IKE reauthentication within
+the shorter interval of 30s. A ping from <b>carol</b> to client <b>alice</b>
+hiding in the subnet behind <b>moon</b> tests if the CHILD_SA has been
+inherited by the new IKE_SA.
diff --git a/testing/tests/ikev2/reauth-late/evaltest.dat b/testing/tests/ikev2/reauth-late/evaltest.dat
new file mode 100644 (file)
index 0000000..507a85f
--- /dev/null
@@ -0,0 +1,8 @@
+moon::ipsec statusall::rw\[2\].*ESTABLISHED::YES
+carol::ipsec statusall::home\[2\].*ESTABLISHED::YES
+carol::cat /var/log/daemon.log::received AUTH_LIFETIME of 3600s, scheduling reauthentication in 3595s::YES
+carol::cat /var/log/daemon.log::scheduling reauthentication in 2[0-5]s::YES
+carol::cat /var/log/daemon.log::maximum IKE_SA lifetime [23][0-9]s::YES
+carol::ping -c 1 PH_IP_ALICE::64 bytes from PH_IP_ALICE: icmp_seq=1::YES
+moon::tcpdump::IP carol.strongswan.org > moon.strongswan.org: ESP::YES
+moon::tcpdump::IP moon.strongswan.org > carol.strongswan.org: ESP::YES
diff --git a/testing/tests/ikev2/reauth-late/hosts/carol/etc/ipsec.conf b/testing/tests/ikev2/reauth-late/hosts/carol/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..32a43ef
--- /dev/null
@@ -0,0 +1,23 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+        crlcheckinterval=180
+       strictcrlpolicy=no
+       plutostart=no
+
+conn %default
+       ikelifetime=30s
+       keylife=20m
+       rekeymargin=5s
+       keyingtries=1
+
+conn home
+       left=PH_IP_CAROL
+       leftcert=carolCert.pem
+       leftid=carol@strongswan.org
+       leftfirewall=yes
+       right=PH_IP_MOON
+       rightid=@moon.strongswan.org
+       rightsubnet=10.1.0.0/16
+       keyexchange=ikev2
+       auto=add
diff --git a/testing/tests/ikev2/reauth-late/hosts/moon/etc/ipsec.conf b/testing/tests/ikev2/reauth-late/hosts/moon/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..bdd186a
--- /dev/null
@@ -0,0 +1,22 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+        crlcheckinterval=180
+       strictcrlpolicy=no
+       plutostart=no
+
+conn %default
+       ikelifetime=60m
+       keylife=20m
+       rekeymargin=0s
+       keyingtries=1
+
+conn rw
+       left=PH_IP_MOON
+       leftcert=moonCert.pem
+       leftid=@moon.strongswan.org
+       leftsubnet=10.1.0.0/16
+       leftfirewall=yes
+       right=%any
+       keyexchange=ikev2
+       auto=add
diff --git a/testing/tests/ikev2/reauth-late/posttest.dat b/testing/tests/ikev2/reauth-late/posttest.dat
new file mode 100644 (file)
index 0000000..94a4006
--- /dev/null
@@ -0,0 +1,4 @@
+moon::ipsec stop
+carol::ipsec stop
+moon::/etc/init.d/iptables stop 2> /dev/null
+carol::/etc/init.d/iptables stop 2> /dev/null
diff --git a/testing/tests/ikev2/reauth-late/pretest.dat b/testing/tests/ikev2/reauth-late/pretest.dat
new file mode 100644 (file)
index 0000000..7ed2423
--- /dev/null
@@ -0,0 +1,7 @@
+moon::/etc/init.d/iptables start 2> /dev/null
+carol::/etc/init.d/iptables start 2> /dev/null
+moon::ipsec start
+carol::ipsec start
+carol::sleep 1
+carol::ipsec up home
+carol::sleep 30
diff --git a/testing/tests/ikev2/reauth-late/test.conf b/testing/tests/ikev2/reauth-late/test.conf
new file mode 100644 (file)
index 0000000..9cd583b
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# This configuration file provides information on the
+# UML instances used for this test
+
+# All UML instances that are required for this test
+#
+UMLHOSTS="alice moon carol winnetou"
+
+# Corresponding block diagram
+#
+DIAGRAM="a-m-c-w.png"
+
+# UML instances on which tcpdump is to be started
+#
+TCPDUMPHOSTS="moon"
+
+# UML instances on which IPsec is started
+# Used for IPsec logging purposes
+#
+IPSECHOSTS="moon carol"