Fix of the mutual TNC measurement use case
If the IKEv2 initiator acting as a TNC server receives invalid TNC measurements from the IKEv2 responder acting as a TNC clienti, the exchange of PB-TNC batches is continued until the IKEv2 responder acting as a TNC server has also finished its TNC measurements. In the past if these measurements in the other direction were correct the IKEv2 responder acting as EAP server declared the IKEv2 EAP authentication successful and the IPsec connection was established even though the TNC measurement verification on the EAP peer side failed. The fix adds an "allow" group membership on each endpoint if the corresponding TNC measurements of the peer are successful. By requiring a "allow" group membership in the IKEv2 connection definition the IPsec connection succeeds only if the TNC measurements on both sides are valid.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# /etc/strongswan.conf - strongSwan configuration file
|
||||
|
||||
charon {
|
||||
load = random nonce x509 openssl pem pkcs1 revocation curl vici kernel-netlink socket-default eap-identity eap-ttls eap-tnc tnc-tnccs tnc-imc tnc-imv tnccs-20 updown
|
||||
|
||||
multiple_authentication = no
|
||||
|
||||
start-scripts {
|
||||
creds = /usr/local/sbin/swanctl --load-creds
|
||||
conns = /usr/local/sbin/swanctl --load-conns
|
||||
}
|
||||
syslog {
|
||||
auth {
|
||||
default = 0
|
||||
}
|
||||
daemon {
|
||||
tnc = 2
|
||||
imc = 2
|
||||
imv = 2
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
eap-ttls {
|
||||
phase2_tnc = yes
|
||||
}
|
||||
tnccs-20 {
|
||||
mutual = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libtls {
|
||||
suites = TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
|
||||
}
|
||||
|
||||
libimcv {
|
||||
plugins {
|
||||
imc-test {
|
||||
command = allow
|
||||
}
|
||||
imv-test {
|
||||
rounds = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
connections {
|
||||
|
||||
mutual {
|
||||
local_addrs = 192.168.0.1
|
||||
remote_addrs = 192.168.0.2
|
||||
|
||||
local {
|
||||
auth = eap-ttls
|
||||
certs = moonCert.pem
|
||||
id = moon.strongswan.org
|
||||
}
|
||||
remote {
|
||||
auth = eap-ttls
|
||||
id = sun.strongswan.org
|
||||
groups = allow
|
||||
}
|
||||
children {
|
||||
mutual {
|
||||
updown = /usr/local/libexec/ipsec/_updown iptables
|
||||
esp_proposals = aes128gcm16-ecp256
|
||||
}
|
||||
}
|
||||
version = 2
|
||||
mobike = no
|
||||
send_certreq = no
|
||||
proposals = aes128-sha256-ecp256
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
#IMC/IMV configuration file for strongSwan endpoint
|
||||
|
||||
IMC "Test" /usr/local/lib/ipsec/imcvs/imc-test.so
|
||||
IMV "Test" /usr/local/lib/ipsec/imcvs/imv-test.so
|
||||
@@ -0,0 +1,47 @@
|
||||
# /etc/strongswan.conf - strongSwan configuration file
|
||||
|
||||
charon {
|
||||
load = random nonce x509 openssl pem pkcs1 revocation curl vici kernel-netlink socket-default eap-identity eap-ttls eap-tnc tnc-tnccs tnc-imc tnc-imv tnccs-20 updown
|
||||
|
||||
multiple_authentication = no
|
||||
|
||||
start-scripts {
|
||||
creds = /usr/local/sbin/swanctl --load-creds
|
||||
conns = /usr/local/sbin/swanctl --load-conns
|
||||
}
|
||||
syslog {
|
||||
auth {
|
||||
default = 0
|
||||
}
|
||||
daemon {
|
||||
tnc = 2
|
||||
imc = 2
|
||||
imv = 2
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
eap-ttls {
|
||||
request_peer_auth = yes
|
||||
phase2_piggyback = yes
|
||||
phase2_tnc =yes
|
||||
}
|
||||
tnccs-20 {
|
||||
mutual = yes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libtls {
|
||||
suites = TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
|
||||
}
|
||||
|
||||
libimcv {
|
||||
plugins {
|
||||
imc-test {
|
||||
command = none
|
||||
}
|
||||
imv-test {
|
||||
rounds = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
connections {
|
||||
|
||||
mutual {
|
||||
local_addrs = 192.168.0.2
|
||||
remote_addrs = 192.168.0.1
|
||||
|
||||
local {
|
||||
auth = eap-ttls
|
||||
certs = sunCert.pem
|
||||
id = sun.strongswan.org
|
||||
}
|
||||
remote {
|
||||
auth = eap-ttls
|
||||
id = moon.strongswan.org
|
||||
groups = allow
|
||||
}
|
||||
children {
|
||||
mutual {
|
||||
updown = /usr/local/libexec/ipsec/_updown iptables
|
||||
esp_proposals = aes128gcm16-ecp256
|
||||
}
|
||||
}
|
||||
version = 2
|
||||
mobike = no
|
||||
send_certreq = no
|
||||
proposals = aes128-sha256-ecp256
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
#IMC/IMV configuration file for strongSwan endpoint
|
||||
|
||||
IMC "Test" /usr/local/lib/ipsec/imcvs/imc-test.so
|
||||
IMV "Test" /usr/local/lib/ipsec/imcvs/imv-test.so
|
||||
Reference in New Issue
Block a user