[test suite] complete cycle test from %include derived access stanza
This commit is contained in:
+2
-1
@@ -157,8 +157,9 @@ EXTRA_DIST = \
|
||||
test/conf/include1_hmac_access.conf \
|
||||
test/conf/include2_hmac_access.conf \
|
||||
test/conf/include3_hmac_access.conf \
|
||||
test/conf/include_r1_hmac_access.conf \
|
||||
test/conf/include_def_hmac_access.conf \
|
||||
test/conf/include_m1_hmac_access.conf \
|
||||
test/conf/include_r1_hmac_access.conf \
|
||||
test/conf/include_r2_hmac_access.conf \
|
||||
test/conf/gpg_access.conf \
|
||||
test/conf/gpg_hmac_access.conf \
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
%include conf/hmac_access.conf
|
||||
|
||||
SOURCE ANY
|
||||
KEY_BASE64 wzNP62oPPgec+kXDPQLHPOayQBuNbYUTPP+QrErNDmg=
|
||||
HMAC_KEY_BASE64 Yh+xizBnl6eotC5ec7FanVGClRMlsOAPh2u6eovnerfBVKwaVKzjGoblFMHMc593TNyi0dWn4opLoTIV9q/ttg==
|
||||
FW_ACCESS_TIMEOUT 3
|
||||
|
||||
|
||||
SOURCE 99.9.9.9
|
||||
KEY_BASE64 wzNP62oPPgec+kXDPQLHPOayQBuNbYUTPP+QrErNDmg=
|
||||
HMAC_KEY_BASE64 Yh+xizBnl6eotC5ec7FanVGClRMlsOAPh2u6eovnerfBVKwaVKzjGoblFMHMc593TNyi0dWn4opLoTIV9q/ttg==
|
||||
FW_ACCESS_TIMEOUT 3
|
||||
@@ -415,6 +415,7 @@ our %cf = (
|
||||
'include_r1_hmac_access' => "$conf_dir/include_r1_hmac_access.conf",
|
||||
'include_r2_hmac_access' => "$conf_dir/include_r2_hmac_access.conf",
|
||||
'include_m1_hmac_access' => "$conf_dir/include_m1_hmac_access.conf",
|
||||
'include_def_hmac_access' => "$conf_dir/include_def_hmac_access.conf",
|
||||
'hmac_cmd_access' => "$conf_dir/hmac_cmd_access.conf",
|
||||
'hmac_cmd_setuid_access' => "$conf_dir/hmac_cmd_setuid_access.conf",
|
||||
'hmac_cmd_giduid_access' => "$conf_dir/hmac_cmd_giduid_access.conf",
|
||||
|
||||
@@ -553,11 +553,42 @@
|
||||
],
|
||||
'positive_output_matches' => [qr/No keys found/],
|
||||
},
|
||||
|
||||
{
|
||||
'category' => 'basic operations',
|
||||
'subcategory' => 'server',
|
||||
'detail' => 'access.conf include mixed stanza',
|
||||
'detail' => 'access.conf include mixed stanza (1)',
|
||||
'function' => \&server_conf_files,
|
||||
'fwknopd_cmdline' => "$server_rewrite_conf_files -D --exit-parse-config",
|
||||
'exec_err' => $YES,
|
||||
'server_access_file' => [
|
||||
|
||||
'SOURCE 1.1.1.1',
|
||||
'KEY stanza1test',
|
||||
'REQUIRE_USERNAME user1',
|
||||
|
||||
'SOURCE 2.2.2.2',
|
||||
'KEY stanza2test',
|
||||
'REQUIRE_USERNAME user2',
|
||||
|
||||
'SOURCE 3.3.3.3',
|
||||
'KEY stanza3test',
|
||||
'REQUIRE_USERNAME user3',
|
||||
|
||||
'SOURCE 4.4.4.4',
|
||||
'KEY stanza4test',
|
||||
'REQUIRE_USERNAME user4',
|
||||
|
||||
"%include $cf{'def_access'}", ### default access stanza becomes stanza #5
|
||||
],
|
||||
'server_conf_file' => [
|
||||
'### comment'
|
||||
],
|
||||
'positive_output_matches' => [qr/SOURCE.*5.*\sANY/],
|
||||
},
|
||||
{
|
||||
'category' => 'basic operations',
|
||||
'subcategory' => 'server',
|
||||
'detail' => 'access.conf include mixed stanza (2)',
|
||||
'function' => \&server_conf_files,
|
||||
'fwknopd_cmdline' => "$server_rewrite_conf_files -D --exit-parse-config",
|
||||
'exec_err' => $YES,
|
||||
|
||||
@@ -154,6 +154,18 @@
|
||||
qr/SOURCE\s.*123\.3\.3\.3/
|
||||
],
|
||||
},
|
||||
{
|
||||
'category' => 'Rijndael+HMAC',
|
||||
'subcategory' => 'client+server',
|
||||
'detail' => 'complete cycle, include (2)',
|
||||
'function' => \&spa_cycle,
|
||||
'cmdline' => $default_client_hmac_args,
|
||||
'fwknopd_cmdline' => "$fwknopdCmd -c $cf{'def'} -a $cf{'include_def_hmac_access'} " .
|
||||
"-d $default_digest_file -p $default_pid_file $intf_str",
|
||||
'fw_rule_created' => $NEW_RULE_REQUIRED,
|
||||
'fw_rule_removed' => $NEW_RULE_REMOVED,
|
||||
'key_file' => $cf{'rc_hmac_b64_key'},
|
||||
},
|
||||
|
||||
{
|
||||
'category' => 'Rijndael+HMAC',
|
||||
|
||||
Reference in New Issue
Block a user