testing: Make TNC scenarios agnostic to the actual Debian version
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).
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.*[email protected] - allow::YES
|
||||
moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*[email protected] - allow::YES
|
||||
moon:: cat /var/log/daemon.log::added group membership 'allow'::YES
|
||||
moon:: cat /var/log/daemon.log::authentication of '[email protected]' with EAP successful::YES
|
||||
moon:: ipsec attest --session 2> /dev/null::Debian 7.5 x86_64.*[email protected] - isolate::YES
|
||||
moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*[email protected] - isolate::YES
|
||||
moon:: cat /var/log/daemon.log::added group membership 'isolate'::YES
|
||||
moon:: cat /var/log/daemon.log::authentication of '[email protected]' with EAP successful::YES
|
||||
moon:: ipsec statusall 2> /dev/null::rw-allow.*10.1.0.0/28 === 192.168.0.100/32::YES
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.*[email protected] - allow::YES
|
||||
moon:: ipsec attest --sessions 2> /dev/null::Debian.*x86_64.*[email protected] - allow::YES
|
||||
moon:: cat /var/log/daemon.log::added group membership 'allow'::YES
|
||||
moon:: cat /var/log/daemon.log::authentication of '[email protected]' with EAP successful::YES
|
||||
moon:: ipsec attest --sessions 2> /dev/null::Debian 7.5 x86_64.*[email protected] - isolate::YES
|
||||
moon:: ipsec attest --sessions 2> /dev/null::Debian.*x86_64.*[email protected] - isolate::YES
|
||||
moon:: cat /var/log/daemon.log::added group membership 'isolate'::YES
|
||||
moon:: cat /var/log/daemon.log::authentication of '[email protected]' with EAP successful::YES
|
||||
moon:: ipsec statusall 2> /dev/null::rw-allow.*10.1.0.0/28 === 192.168.0.100/32::YES
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.*[email protected] - allow::YES
|
||||
moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*[email protected] - allow::YES
|
||||
moon:: cat /var/log/daemon.log::added group membership 'allow'::YES
|
||||
moon:: cat /var/log/daemon.log::authentication of '[email protected]' with EAP successful::YES
|
||||
moon:: ipsec attest --session 2> /dev/null::Debian 7.5 x86_64.*[email protected] - isolate::YES
|
||||
moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*[email protected] - isolate::YES
|
||||
moon:: cat /var/log/daemon.log::added group membership 'isolate'::YES
|
||||
moon:: cat /var/log/daemon.log::authentication of '[email protected]' with EAP successful::YES
|
||||
moon:: ipsec statusall 2> /dev/null::rw-allow.*10.1.0.0/28 === 192.168.0.100/32::YES
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.*[email protected] - allow::YES
|
||||
moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*[email protected] - allow::YES
|
||||
moon:: cat /var/log/daemon.log::added group membership 'allow'::YES
|
||||
moon:: cat /var/log/daemon.log::authentication of '[email protected]' with EAP successful::YES
|
||||
moon:: ipsec attest --session 2> /dev/null::Debian 7.5 x86_64.*[email protected] - allow::YES
|
||||
moon:: ipsec attest --session 2> /dev/null::Debian.*x86_64.*[email protected] - allow::YES
|
||||
moon:: cat /var/log/daemon.log::added group membership 'allow'::YES
|
||||
moon:: cat /var/log/daemon.log::authentication of '[email protected]' with EAP successful::YES
|
||||
moon:: ipsec statusall 2> /dev/null::rw-allow.*10.1.0.0/28 === 192.168.0.100/32::YES
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user