Skip to content

Commit c9ada1e

Browse files
author
Luke
committed
reneg-sec needs to be set to 0 when using otp because otherwise the connection will be ask for a otp every hour. Tests added to make sure it's there when otp is enabled
1 parent a20c638 commit c9ada1e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/tests/otp/run.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ SERV_IP=$(ip -4 -o addr show scope global | awk '{print $4}' | sed -e 's:/.*::'
1717
# Configure server with two factor authentication
1818
docker run -v $OVPN_DATA:/etc/openvpn --rm $IMG ovpn_genconfig -u udp://$SERV_IP -2
1919

20+
# Ensure reneg-sec 0 in server config when two factor is enabled
21+
docker run -v $OVPN_DATA:/etc/openvpn --rm $IMG cat /etc/openvpn/openvpn.conf | grep 'reneg-sec 0' || abort 'reneg-sec not set to 0 in server config'
22+
2023
# nopass is insecure
2124
docker run -v $OVPN_DATA:/etc/openvpn --rm -it -e "EASYRSA_BATCH=1" -e "EASYRSA_REQ_CN=Travis-CI Test CA" $IMG ovpn_initpki nopass
2225

@@ -40,6 +43,9 @@ echo -e "$OTP_USER\n$OTP_TOKEN" > $CLIENT_DIR/credentials.txt
4043
# Override the auth-user-pass directive to use a credentials file
4144
docker run -v $OVPN_DATA:/etc/openvpn --rm $IMG ovpn_getclient $CLIENT | sed 's/auth-user-pass/auth-user-pass \/client\/credentials.txt/' | tee $CLIENT_DIR/config.ovpn
4245

46+
# Ensure reneg-sec 0 in client config when two factor is enabled
47+
grep 'reneg-sec 0' $CLIENT_DIR/config.ovpn || abort 'reneg-sec not set to 0 in client config'
48+
4349
#
4450
# Fire up the server
4551
#

0 commit comments

Comments
 (0)