]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Make TNC scenarios agnostic to the actual Debian version
authorTobias Brunner <tobias@strongswan.org>
Tue, 7 Oct 2014 10:01:05 +0000 (12:01 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 7 Oct 2014 10:18:25 +0000 (12:18 +0200)
The scenarios will work with new or old base images as long as the version
in use is included as product in the master data (src/libimcv/imv/data.sql).

18 files changed:
testing/tests/tnc/tnccs-11-radius-pts/hosts/alice/etc/pts/data1.sql
testing/tests/tnc/tnccs-11-radius-pts/pretest.dat
testing/tests/tnc/tnccs-20-os-pts/evaltest.dat
testing/tests/tnc/tnccs-20-os-pts/hosts/moon/etc/pts/data1.sql
testing/tests/tnc/tnccs-20-os-pts/pretest.dat
testing/tests/tnc/tnccs-20-os/evaltest.dat
testing/tests/tnc/tnccs-20-os/hosts/moon/etc/pts/data1.sql
testing/tests/tnc/tnccs-20-os/pretest.dat
testing/tests/tnc/tnccs-20-pdp-eap/hosts/alice/etc/pts/data1.sql
testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat
testing/tests/tnc/tnccs-20-pdp-pt-tls/hosts/alice/etc/pts/data1.sql
testing/tests/tnc/tnccs-20-pdp-pt-tls/pretest.dat
testing/tests/tnc/tnccs-20-pts-no-ecc/evaltest.dat
testing/tests/tnc/tnccs-20-pts-no-ecc/hosts/moon/etc/pts/data1.sql
testing/tests/tnc/tnccs-20-pts-no-ecc/pretest.dat
testing/tests/tnc/tnccs-20-pts/evaltest.dat
testing/tests/tnc/tnccs-20-pts/hosts/moon/etc/pts/data1.sql
testing/tests/tnc/tnccs-20-pts/pretest.dat

index 8b36df5e39dcf54e905ec8c01fa9634c37cfec05..d87b5e7f9ca0626515badf1a6c22ac9d7f85f189 100644 (file)
@@ -1,10 +1,10 @@
 /* Devices */
 
 INSERT INTO devices (                  /*  1 */
-  value, product, created  
-) VALUES (
-  'aabbccddeeff11223344556677889900', 42, 1372330615
-);
+  value, product, created
+)
+SELECT 'aabbccddeeff11223344556677889900', id, 1372330615
+FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
 
 /* Groups Members */
 
index 7541a2adb94ca0351be7745dfb57ebb607b48fff..03b24747ef7390017a15816d978950abb5c0eafb 100644 (file)
@@ -5,6 +5,7 @@ carol::echo 0 > /proc/sys/net/ipv4/ip_forward
 dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
 alice::ln -s /etc/freeradius/sites-available/inner-tunnel-second /etc/freeradius/sites-enabled/inner-tunnel-second
 alice::cat /etc/freeradius/sites-enabled/inner-tunnel-second
+alice::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
 alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
 alice::LEAK_DETECTIVE_DISABLE=1 LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties radiusd
 alice::cat /etc/tnc_config
index f9bb0335706b9ab5bd3204c444aca1f01c699b62..14c2aaf6c39b2857abf5d00ee08f71133acf5436 100644 (file)
@@ -6,10 +6,10 @@ dave:: cat /var/log/daemon.log::PB-TNC access recommendation is 'Quarantined'::Y
 dave:: cat /var/log/daemon.log::EAP method EAP_TTLS succeeded, MSK established::YES
 dave:: cat /var/log/daemon.log::authentication of 'moon.strongswan.org' with EAP successful::YES
 dave:: cat /var/log/daemon.log::CHILD_SA home{1} established.*TS 192.168.0.200/32 === 10.1.0.16/28::YES
-moon:: ipsec attest --session 2> /dev/null::Debian 7.5 x86_64.*carol@strongswan.org - allow::YES
+moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*carol@strongswan.org - allow::YES
 moon:: cat /var/log/daemon.log::added group membership 'allow'::YES
 moon:: cat /var/log/daemon.log::authentication of 'carol@strongswan.org' with EAP successful::YES
-moon:: ipsec attest --session 2> /dev/null::Debian 7.5 x86_64.*dave@strongswan.org - isolate::YES
+moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*dave@strongswan.org - isolate::YES
 moon:: cat /var/log/daemon.log::added group membership 'isolate'::YES
 moon:: cat /var/log/daemon.log::authentication of 'dave@strongswan.org' with EAP successful::YES
 moon:: ipsec statusall 2> /dev/null::rw-allow.*10.1.0.0/28 === 192.168.0.100/32::YES
index 8b36df5e39dcf54e905ec8c01fa9634c37cfec05..d87b5e7f9ca0626515badf1a6c22ac9d7f85f189 100644 (file)
@@ -1,10 +1,10 @@
 /* Devices */
 
 INSERT INTO devices (                  /*  1 */
-  value, product, created  
-) VALUES (
-  'aabbccddeeff11223344556677889900', 42, 1372330615
-);
+  value, product, created
+)
+SELECT 'aabbccddeeff11223344556677889900', id, 1372330615
+FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
 
 /* Groups Members */
 
index 49ea0416e09673a76afdd805636c409747bfc955..7a562eec5df4803ea0c576324e17cb48b5ce2582 100644 (file)
@@ -3,6 +3,7 @@ carol::iptables-restore < /etc/iptables.rules
 dave::iptables-restore < /etc/iptables.rules
 carol::echo 0 > /proc/sys/net/ipv4/ip_forward
 dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
+moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
 moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
 moon::cat /etc/tnc_config
 carol::cat /etc/tnc_config
index b9f094ffdac7ec52520c0abc58ed490977642081..1cf7ed69a2d23c053c6c912ec81f72b55a7cc71b 100644 (file)
@@ -6,10 +6,10 @@ dave:: cat /var/log/daemon.log::PB-TNC access recommendation is 'Quarantined'::Y
 dave:: cat /var/log/daemon.log::EAP method EAP_TTLS succeeded, MSK established::YES
 dave:: cat /var/log/daemon.log::authentication of 'moon.strongswan.org' with EAP successful::YES
 dave:: cat /var/log/daemon.log::CHILD_SA home{1} established.*TS 192.168.0.200/32 === 10.1.0.16/28::YES
-moon:: ipsec attest --sessions 2> /dev/null::Debian 7.5 x86_64.*carol@strongswan.org - allow::YES
+moon:: ipsec attest --sessions 2> /dev/null::Debian.*x86_64.*carol@strongswan.org - allow::YES
 moon:: cat /var/log/daemon.log::added group membership 'allow'::YES
 moon:: cat /var/log/daemon.log::authentication of 'carol@strongswan.org' with EAP successful::YES
-moon:: ipsec attest --sessions 2> /dev/null::Debian 7.5 x86_64.*dave@strongswan.org - isolate::YES
+moon:: ipsec attest --sessions 2> /dev/null::Debian.*x86_64.*dave@strongswan.org - isolate::YES
 moon:: cat /var/log/daemon.log::added group membership 'isolate'::YES
 moon:: cat /var/log/daemon.log::authentication of 'dave@strongswan.org' with EAP successful::YES
 moon:: ipsec statusall 2> /dev/null::rw-allow.*10.1.0.0/28 === 192.168.0.100/32::YES
index 6e7e10feb8fc60fc3408c7a1644a7c82fe6bb9d8..3cfa2517d1b74eea5544a6e5788d20d19de8549b 100644 (file)
@@ -1,10 +1,10 @@
 /* Devices */
 
 INSERT INTO devices (                  /*  1 */
-  value, product, created  
-) VALUES (
-  'aabbccddeeff11223344556677889900', 42, 1372330615
-);
+  value, product, created
+)
+SELECT 'aabbccddeeff11223344556677889900', id, 1372330615
+FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
 
 /* Groups Members */
 
@@ -26,9 +26,9 @@ INSERT INTO identities (
 
 INSERT INTO sessions (
   time, connection, identity, device, product, rec
-) VALUES (
-  NOW, 1, 1, 1, 42, 0
-);
+)
+SELECT NOW, 1, 1, 1, id, 0
+FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
 
 /* Results */
 
index d991ee325153ae427dc5f24c5ae45d5030dd68a0..fc102ec12c226901d6267d80656f392944700258 100644 (file)
@@ -4,6 +4,7 @@ dave::iptables-restore < /etc/iptables.rules
 carol::echo 0 > /proc/sys/net/ipv4/ip_forward
 dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
 moon::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql
+moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
 moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
 moon::cat /etc/tnc_config
 carol::cat /etc/tnc_config
index 8adc459151cad470264d268255ff3bd4ecf20c9a..d6a547bd1fdfdf786f6dd7d1a35488b80c365dfe 100644 (file)
@@ -1,10 +1,10 @@
 /* Devices */
 
 INSERT INTO devices (                  /*  1 */
-  value, product, created  
-) VALUES (
-  'aabbccddeeff11223344556677889900', 42, 1372330615
-);
+  value, product, created
+)
+SELECT 'aabbccddeeff11223344556677889900', id, 1372330615
+FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
 
 /* Groups Members */
 
@@ -26,9 +26,9 @@ INSERT INTO identities (
 
 INSERT INTO sessions (
   time, connection, identity, device, product, rec
-) VALUES (
-  NOW, 1, 1, 1, 42, 0
-);
+)
+SELECT NOW, 1, 1, 1, id, 0
+FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
 
 /* Results */
 
index 4ba63d1c5f8cd283779cc67e6b3679fcfd5555e9..ca3c559d1266f7b73d7e8ef1773d6b52ad6b5780 100644 (file)
@@ -7,6 +7,7 @@ dave::cat /etc/tnc_config
 carol::echo 0 > /proc/sys/net/ipv4/ip_forward
 dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
 alice::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql
+alice::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
 alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
 alice::chgrp www-data /etc/pts/config.db; chmod g+w /etc/pts/config.db
 alice::/var/www/tnc/manage.py setpassword strongSwan strongSwan
index 14f9d7de6bed9bf3f41907558cab02e31999d7a4..16ab96d5820a442ac983034744c97dd2aeab9649 100644 (file)
@@ -1,10 +1,10 @@
 /* Devices */
 
 INSERT INTO devices (                  /*  1 */
-  value, product, created  
-) VALUES (
-  'aabbccddeeff11223344556677889900', 42, 1372330615
-);
+  value, product, created
+)
+SELECT 'aabbccddeeff11223344556677889900', id, 1372330615
+FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
 
 /* Groups Members */
 
@@ -26,9 +26,9 @@ INSERT INTO identities (
 
 INSERT INTO sessions (
   time, connection, identity, device, product, rec
-) VALUES (
-  NOW, 1, 1, 1, 42, 0
-);
+)
+SELECT NOW, 1, 1, 1, id, 0
+FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
 
 /* Results */
 
index ca8f47db014365539a4f81734a9ad8eaa73a3bcb..eed7967ee2d46a61a03ff0d716be006d1947d821 100644 (file)
@@ -7,6 +7,7 @@ carol::echo 0 > /proc/sys/net/ipv4/ip_forward
 dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
 dave::cat /etc/tnc_config
 alice::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql
+alice::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
 alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
 alice::chgrp www-data /etc/pts/config.db; chmod g+w /etc/pts/config.db
 alice::/var/www/tnc/manage.py setpassword strongSwan strongSwan
index f9bb0335706b9ab5bd3204c444aca1f01c699b62..14c2aaf6c39b2857abf5d00ee08f71133acf5436 100644 (file)
@@ -6,10 +6,10 @@ dave:: cat /var/log/daemon.log::PB-TNC access recommendation is 'Quarantined'::Y
 dave:: cat /var/log/daemon.log::EAP method EAP_TTLS succeeded, MSK established::YES
 dave:: cat /var/log/daemon.log::authentication of 'moon.strongswan.org' with EAP successful::YES
 dave:: cat /var/log/daemon.log::CHILD_SA home{1} established.*TS 192.168.0.200/32 === 10.1.0.16/28::YES
-moon:: ipsec attest --session 2> /dev/null::Debian 7.5 x86_64.*carol@strongswan.org - allow::YES
+moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*carol@strongswan.org - allow::YES
 moon:: cat /var/log/daemon.log::added group membership 'allow'::YES
 moon:: cat /var/log/daemon.log::authentication of 'carol@strongswan.org' with EAP successful::YES
-moon:: ipsec attest --session 2> /dev/null::Debian 7.5 x86_64.*dave@strongswan.org - isolate::YES
+moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*dave@strongswan.org - isolate::YES
 moon:: cat /var/log/daemon.log::added group membership 'isolate'::YES
 moon:: cat /var/log/daemon.log::authentication of 'dave@strongswan.org' with EAP successful::YES
 moon:: ipsec statusall 2> /dev/null::rw-allow.*10.1.0.0/28 === 192.168.0.100/32::YES
index 8b36df5e39dcf54e905ec8c01fa9634c37cfec05..d87b5e7f9ca0626515badf1a6c22ac9d7f85f189 100644 (file)
@@ -1,10 +1,10 @@
 /* Devices */
 
 INSERT INTO devices (                  /*  1 */
-  value, product, created  
-) VALUES (
-  'aabbccddeeff11223344556677889900', 42, 1372330615
-);
+  value, product, created
+)
+SELECT 'aabbccddeeff11223344556677889900', id, 1372330615
+FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
 
 /* Groups Members */
 
index 49ea0416e09673a76afdd805636c409747bfc955..7a562eec5df4803ea0c576324e17cb48b5ce2582 100644 (file)
@@ -3,6 +3,7 @@ carol::iptables-restore < /etc/iptables.rules
 dave::iptables-restore < /etc/iptables.rules
 carol::echo 0 > /proc/sys/net/ipv4/ip_forward
 dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
+moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
 moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
 moon::cat /etc/tnc_config
 carol::cat /etc/tnc_config
index 2d18138e410c1458d4950ffcc8d9bc5a426c1551..0bf4f2b9bc4ad5a5a0fcb182bf13976196994d05 100644 (file)
@@ -6,10 +6,10 @@ dave:: cat /var/log/daemon.log::PB-TNC access recommendation is 'Access Allowed'
 dave:: cat /var/log/daemon.log::EAP method EAP_TTLS succeeded, MSK established::YES
 dave:: cat /var/log/daemon.log::authentication of 'moon.strongswan.org' with EAP successful::YES
 dave:: cat /var/log/daemon.log::CHILD_SA home{1} established.*TS 192.168.0.200/32 === 10.1.0.0/28::YES
-moon:: ipsec attest --session 2> /dev/null::Debian 7.5 x86_64.*carol@strongswan.org - allow::YES
+moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*carol@strongswan.org - allow::YES
 moon:: cat /var/log/daemon.log::added group membership 'allow'::YES
 moon:: cat /var/log/daemon.log::authentication of 'carol@strongswan.org' with EAP successful::YES
-moon:: ipsec attest --session 2> /dev/null::Debian 7.5 x86_64.*dave@strongswan.org - allow::YES
+moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*dave@strongswan.org - allow::YES
 moon:: cat /var/log/daemon.log::added group membership 'allow'::YES
 moon:: cat /var/log/daemon.log::authentication of 'dave@strongswan.org' with EAP successful::YES
 moon:: ipsec statusall 2> /dev/null::rw-allow.*10.1.0.0/28 === 192.168.0.100/32::YES
index 8b36df5e39dcf54e905ec8c01fa9634c37cfec05..d87b5e7f9ca0626515badf1a6c22ac9d7f85f189 100644 (file)
@@ -1,10 +1,10 @@
 /* Devices */
 
 INSERT INTO devices (                  /*  1 */
-  value, product, created  
-) VALUES (
-  'aabbccddeeff11223344556677889900', 42, 1372330615
-);
+  value, product, created
+)
+SELECT 'aabbccddeeff11223344556677889900', id, 1372330615
+FROM products WHERE name = 'Debian DEBIAN_VERSION x86_64';
 
 /* Groups Members */
 
index 49ea0416e09673a76afdd805636c409747bfc955..7a562eec5df4803ea0c576324e17cb48b5ce2582 100644 (file)
@@ -3,6 +3,7 @@ carol::iptables-restore < /etc/iptables.rules
 dave::iptables-restore < /etc/iptables.rules
 carol::echo 0 > /proc/sys/net/ipv4/ip_forward
 dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
+moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
 moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
 moon::cat /etc/tnc_config
 carol::cat /etc/tnc_config