Compare commits
225 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2cbffc976 | ||
|
|
8fad91d01b | ||
|
|
3d14162622 | ||
|
|
1060974d23 | ||
|
|
88bd5b8d27 | ||
|
|
0ab1736a27 | ||
|
|
af934cf8e7 | ||
|
|
fc3b969ce9 | ||
|
|
7352b6c059 | ||
|
|
4252b9cbc7 | ||
|
|
d958900f8b | ||
|
|
8e6e71074f | ||
|
|
41aec9ced2 | ||
|
|
74753b01d2 | ||
|
|
fbfeca5b60 | ||
|
|
d1cea4a619 | ||
|
|
a2daa3a288 | ||
|
|
27a9718c0c | ||
|
|
bc52210587 | ||
|
|
bacfd34392 | ||
|
|
fdbb24130e | ||
|
|
7b7f8e85f2 | ||
|
|
f1b3db9c57 | ||
|
|
d400d20a95 | ||
|
|
fa0ad0f9f2 | ||
|
|
2d83bc6b24 | ||
|
|
912a6c54ae | ||
|
|
3890069132 | ||
|
|
8966353886 | ||
|
|
40701aea01 | ||
|
|
6f96d8c654 | ||
|
|
2e50b80d1d | ||
|
|
7284a6cb23 | ||
|
|
ad5a7728fa | ||
|
|
11df2b381c | ||
|
|
74ee1af695 | ||
|
|
96546bc1af | ||
|
|
672d8842e3 | ||
|
|
edad34e62d | ||
|
|
7102ae70b7 | ||
|
|
3f54d493ff | ||
|
|
ff1f2ae4ac | ||
|
|
1926823772 | ||
|
|
fa7de05b62 | ||
|
|
b1fff687bf | ||
|
|
a4254072d2 | ||
|
|
9d6f0858b1 | ||
|
|
99b9778d21 | ||
|
|
85de3db2b4 | ||
|
|
9681c4a71d | ||
|
|
b9f53b7bde | ||
|
|
0cd8077f16 | ||
|
|
556a990c6f | ||
|
|
fee63fcd9d | ||
|
|
b42ab15a45 | ||
|
|
b99eb5a9b3 | ||
|
|
5831787d1b | ||
|
|
b9c41bcfd2 | ||
|
|
6d23a8a2f7 | ||
|
|
18103464e4 | ||
|
|
408d45001f | ||
|
|
0bbc3b2d44 | ||
|
|
6a42b7f4f5 | ||
|
|
df4abb091d | ||
|
|
62413cfaa9 | ||
|
|
9edfbad87b | ||
|
|
c9c3a554df | ||
|
|
8e07490a81 | ||
|
|
8072ec113e | ||
|
|
6b19fc2c75 | ||
|
|
40361dd5c9 | ||
|
|
b550eb52ec | ||
|
|
5c246e436a | ||
|
|
24311d4231 | ||
|
|
c3158a37ef | ||
|
|
b84fd34e11 | ||
|
|
854a9add36 | ||
|
|
58f65fa26e | ||
|
|
527d32c491 | ||
|
|
1eafa6ba5d | ||
|
|
77103b2736 | ||
|
|
6d2ecc6ca3 | ||
|
|
6741755396 | ||
|
|
2793a0b6ed | ||
|
|
dff0aa2090 | ||
|
|
55859818b6 | ||
|
|
542d053655 | ||
|
|
4e62dd8dd1 | ||
|
|
cd8f68b15b | ||
|
|
de950718b6 | ||
|
|
c6c1599442 | ||
|
|
2769ef1ac9 | ||
|
|
db44d04763 | ||
|
|
12bb7f5b44 | ||
|
|
5c1d0de996 | ||
|
|
1bff03c59e | ||
|
|
25fecd2c4b | ||
|
|
b9ff0094ac | ||
|
|
07564d602c | ||
|
|
b5c6420d04 | ||
|
|
4fa6dc027d | ||
|
|
e8a75a94cb | ||
|
|
70719998e4 | ||
|
|
d4a099e521 | ||
|
|
864556c687 | ||
|
|
1717e61286 | ||
|
|
df1816a30e | ||
|
|
ce15c1fa81 | ||
|
|
3aec148091 | ||
|
|
9958de351c | ||
|
|
422ead6a27 | ||
|
|
b2eaf3aba8 | ||
|
|
25c5647270 | ||
|
|
d509e6340b | ||
|
|
bbf391895f | ||
|
|
0e0a701ada | ||
|
|
5746e51f26 | ||
|
|
58695a1eb6 | ||
|
|
27e2587ab6 | ||
|
|
071cceb815 | ||
|
|
c92c29c256 | ||
|
|
8957977994 | ||
|
|
824e91837d | ||
|
|
b629e91b05 | ||
|
|
96a1db6049 | ||
|
|
4268d2a803 | ||
|
|
1bc90e7157 | ||
|
|
11eeefb700 | ||
|
|
c211fe89c2 | ||
|
|
3788e08e82 | ||
|
|
d2b395ce20 | ||
|
|
5c1e221c3b | ||
|
|
7a56cfc09f | ||
|
|
ebd43f58cd | ||
|
|
cf26959d27 | ||
|
|
c4b66ae7d9 | ||
|
|
81570782b1 | ||
|
|
cdadf50ddd | ||
|
|
c772b0139c | ||
|
|
ef12808d54 | ||
|
|
da2527526a | ||
|
|
0f25501a4d | ||
|
|
32013269b2 | ||
|
|
2b2da4f330 | ||
|
|
e132e6fe4a | ||
|
|
bd5ea2f005 | ||
|
|
eee0a5656e | ||
|
|
bd7fc29e97 | ||
|
|
25e63c2999 | ||
|
|
780958834d | ||
|
|
36e6eac6fb | ||
|
|
e28834faea | ||
|
|
725af89b5e | ||
|
|
b133a2a0c5 | ||
|
|
98e0f26590 | ||
|
|
877e83508e | ||
|
|
d9affb656d | ||
|
|
928f9ab468 | ||
|
|
6209f78123 | ||
|
|
a1abfa0ea0 | ||
|
|
215f2325e2 | ||
|
|
7d0a7d905f | ||
|
|
a6a3150559 | ||
|
|
011bd85d7c | ||
|
|
4940d40bd7 | ||
|
|
341fef6b25 | ||
|
|
3b7fcbd312 | ||
|
|
76416aa61f | ||
|
|
4b9559e2a5 | ||
|
|
9e6d5781ed | ||
|
|
297527a7d8 | ||
|
|
cf084d960f | ||
|
|
6631a62cc8 | ||
|
|
03af892ecc | ||
|
|
8174fd0096 | ||
|
|
e685710564 | ||
|
|
7c8bbc0449 | ||
|
|
18f96331f1 | ||
|
|
e0cf3918ac | ||
|
|
3484569cd3 | ||
|
|
4e2723eeef | ||
|
|
bf78d75754 | ||
|
|
2861fd42b1 | ||
|
|
0f0c8e0931 | ||
|
|
d17463e8f3 | ||
|
|
0997ba286d | ||
|
|
87c3446034 | ||
|
|
da6206d3dd | ||
|
|
e73a96649a | ||
|
|
e6e554b9fb | ||
|
|
446bf773db | ||
|
|
cf756fbdaa | ||
|
|
fdc66e4cd1 | ||
|
|
345ce5e294 | ||
|
|
7c6b010947 | ||
|
|
c67a374f0d | ||
|
|
affdad6405 | ||
|
|
ae838a4695 | ||
|
|
62b729e5bb | ||
|
|
037d4929d8 | ||
|
|
dcde0159e5 | ||
|
|
8fd0cd03bd | ||
|
|
3895b2097d | ||
|
|
106d2a8bbf | ||
|
|
a630ae5e6e | ||
|
|
b45705e492 | ||
|
|
13c9c05fb6 | ||
|
|
9f78d943a9 | ||
|
|
219a44eb60 | ||
|
|
5460b8e84e | ||
|
|
7cd6e0cbc2 | ||
|
|
30e4d5ddb0 | ||
|
|
8a1715bde8 | ||
|
|
dbef3700cd | ||
|
|
6a875a986c | ||
|
|
f7b419cf86 | ||
|
|
a9ccd2cbe1 | ||
|
|
99f325ac85 | ||
|
|
06ceb6c256 | ||
|
|
01efec7927 | ||
|
|
4077eb1620 | ||
|
|
4dad8eb12e | ||
|
|
f57de338f7 | ||
|
|
560c6dd61e | ||
|
|
29ffbbe225 |
@@ -1,81 +0,0 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui objects ip
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-ipv4-range-001
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv4-range-001 ipads=ipv4 ipclient=range ipclienttext1=192.168.1.1 ipclienttext2=192.168.1.1
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv4-range-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv4-cidr-002
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv4-cidr-001 ipads=ipv4 ipclient=cidr ipclienttext1=192.168.1.1 ipclienttext2=24
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv4-cidr-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv4-masks-003
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv4-masks-001 ipads=ipv4 ipclient=masks ipclienttext1=192.168.1.1 ipclienttext2=255.255.255.0
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv4-masks-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv6-range-004
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv6-range-004 ipads=ipv6 ipclient=range ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-range-004
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv6-cidr-005
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv6-cidr-005 ipads=ipv6 ipclient=cidr ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=64
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-cidr-005
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv6-masks-006
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv6-masks-006 ipads=ipv6 ipclient=masks ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=0:0:0:0:0:0:0:0
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-masks-006
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
edit-ip-007
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv6-masks-006 ipads=ipv6 ipclient=masks ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=0:0:0:0:0:0:0:0
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-masks-006
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
#修改对象
|
||||
object-edit-ip edit-ip-007 ipv4 range 192.168.100.1 192.168.100.1
|
||||
#查询修改对象
|
||||
ui-object-search-name edit-ip-007
|
||||
#删除对象
|
||||
objects-delete
|
||||
@@ -0,0 +1,761 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/decryption
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Intercept_SSL_Decryption-00001
|
||||
[Tags] intercpt-服务器证书校验开关关闭
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":0,"cert_pinning":0,"cert_transparency":0,"protocol_errors":0,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*badssl.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL005.bat
|
||||
... ELSE set variable curl -kv https://wrong.host.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni wrong.host.badssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006.bat
|
||||
... ELSE set variable curl -kv https://untrusted-root.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni untrusted-root.badssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL004.bat
|
||||
... ELSE set variable curl -kv https://self-signed.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni self-signed.badssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL003.bat
|
||||
... ELSE set variable curl -kv https://expired.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni expired.badssl.com
|
||||
|
||||
Intercept_SSL_Decryption-00002
|
||||
[Tags] 拦截intercpt-服务器证书校验打开-failclose
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":0,"cert_pinning":0,"cert_transparency":0,"protocol_errors":0,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*badssl.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00002 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL005.bat
|
||||
... ELSE set variable curl -kv https://wrong.host.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni wrong.host.badssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006.bat
|
||||
... ELSE set variable curl -kv https://untrusted-root.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni untrusted-root.badssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL004.bat
|
||||
... ELSE set variable curl -kv https://self-signed.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni self-signed.badssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL003.bat
|
||||
... ELSE set variable curl -kv https://expired.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni expired.badssl.com
|
||||
|
||||
Intercept_SSL_Decryption-00003
|
||||
[Tags] 拦截intercpt-服务器证书校验打开-pass-through
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":0,"cert_pinning":0,"cert_transparency":0,"protocol_errors":0,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"pass-through"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*badssl.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL005.bat
|
||||
... ELSE set variable curl -kv https://wrong.host.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni wrong.host.badssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006.bat
|
||||
... ELSE set variable curl -kv https://untrusted-root.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni untrusted-root.badssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL004.bat
|
||||
... ELSE set variable curl -kv https://self-signed.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni self-signed.badssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL003.bat
|
||||
... ELSE set variable curl -kv https://expired.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni expired.badssl.com
|
||||
|
||||
Intercept_SSL_Decryption-00004
|
||||
[Tags] intercpt-EV关闭
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":0,"cert_pinning":0,"cert_transparency":0,"protocol_errors":0,"ev_cert":1,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*myssl.com,*myssl.cn
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00004 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL003_004.bat
|
||||
... ELSE set variable curl -kv https://myssl.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni myssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL005_007.bat
|
||||
... ELSE set variable curl -kv https://www.myssl.cn
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni myssl.cn
|
||||
|
||||
Intercept_SSL_Decryption-00005
|
||||
[Tags] intercpt-EV开启
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":0,"cert_pinning":0,"cert_transparency":0,"protocol_errors":0,"ev_cert":1,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*myssl.com,*myssl.cn
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00005 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL003_004.bat
|
||||
... ELSE set variable curl -kv https://myssl.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni myssl.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL005_007.bat
|
||||
... ELSE set variable curl -kv https://www.myssl.cn
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni myssl.cn
|
||||
|
||||
Intercept_SSL_Decryption-00006
|
||||
[Tags] 拦截intercpt-CT关闭
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":0,"cert_pinning":0,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*vip.com,*jd.com,*mail.ru
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00006 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006_008.bat
|
||||
... ELSE set variable curl -kv https://coll.jd.com/?e=illegalTopic/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni coll.jd.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006_010.bat
|
||||
... ELSE set variable curl -kv https://www.vip.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni www.vip.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006_007.bat
|
||||
... ELSE set variable curl -kv https://mail.ru/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni mail.ru
|
||||
|
||||
Intercept_SSL_Decryption-00007
|
||||
[Tags] 拦截intercpt-CT开启
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":0,"cert_pinning":0,"cert_transparency":1,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*vip.com,*jd.com,*mail.ru
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00007 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006_008.bat
|
||||
... ELSE set variable curl -kv https://coll.jd.com/?e=illegalTopic/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable GlobalSign RSA OV SSL CA 2018
|
||||
... ELSE set variable GlobalSign RSA OV SSL CA 2018
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni coll.jd.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006_010.bat
|
||||
... ELSE set variable curl -kv https://www.vip.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Secure Site Pro CA G2
|
||||
... ELSE set variable Secure Site Pro CA G2
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni www.vip.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006_007.bat
|
||||
... ELSE set variable curl -kv https://mail.ru/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni mail.ru
|
||||
|
||||
Intercept_SSL_Decryption-00008
|
||||
[Tags] 拦截intercpt-MA关闭
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":0,"cert_pinning":0,"cert_transparency":0,"protocol_errors":0,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*badssl.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00008 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL008_9.bat
|
||||
... ELSE set variable curl -kv https://client.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni client.badssl.com
|
||||
|
||||
Intercept_SSL_Decryption-00009
|
||||
[Tags] 拦截intercpt-MA开启
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":1,"cert_pinning":0,"cert_transparency":0,"protocol_errors":0,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*badssl.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00009 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL008_9.bat
|
||||
... ELSE set variable curl -kv https://client.badssl.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable DigiCert SHA2 Secure Server CA
|
||||
... ELSE set variable DigiCert SHA2 Secure Server CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni client.badssl.com
|
||||
|
||||
Intercept_SSL_Decryption-00010
|
||||
[Tags] 拦截intercpt-协议版本-SSL3
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"ssl3","mirror_client":0,"allow_http2":0}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*newdaynews.ru,*ya.ru,*yandex.ru
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00010 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL010_10.bat
|
||||
... ELSE set variable curl -kv https://newdaynews.ru/moskow/665390.html/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni newdaynews.ru
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL010_11.bat
|
||||
... ELSE set variable curl -kv https://ya.ru
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni ya.ru
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL010_12.bat
|
||||
... ELSE set variable curl -kv https://yandex.ru
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni yandex.ru
|
||||
|
||||
Intercept_SSL_Decryption-00011
|
||||
[Tags] 拦截intercpt-协议版本-TLS1.0
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"tls10","max":"tls10","mirror_client":0,"allow_http2":0}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*newdaynews.ru,*github.com,*jd.com,*mi.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00011 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL010_10.bat
|
||||
... ELSE set variable curl -kv https://newdaynews.ru/moskow/665390.html/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni newdaynews.ru
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL011_12.bat
|
||||
... ELSE set variable curl -kv https://github.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni github.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL009.bat
|
||||
... ELSE set variable curl -kv https:///www.mi.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni mi.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006_008.bat
|
||||
... ELSE set variable curl -kv https://coll.jd.com/?e=illegalTopic/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni coll.jd.com
|
||||
|
||||
Intercept_SSL_Decryption-00012
|
||||
[Tags] 拦截intercpt-协议版本-TLS1.1
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"tls11","max":"tls11","mirror_client":0,"allow_http2":0}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*newdaynews.ru,*github.com,*jd.com,*mi.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00012 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL010_10.bat
|
||||
... ELSE set variable curl -kv https://newdaynews.ru/moskow/665390.html/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni newdaynews.ru
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL011_12.bat
|
||||
... ELSE set variable curl -kv https://github.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni github.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL009.bat
|
||||
... ELSE set variable curl -kv https:///www.mi.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni mi.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006_008.bat
|
||||
... ELSE set variable curl -kv https://coll.jd.com/?e=illegalTopic/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni coll.jd.com
|
||||
|
||||
Intercept_SSL_Decryption-00013
|
||||
[Tags] 拦截intercpt-协议版本-TLS1.2
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"tls12","max":"tls12","mirror_client":0,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*jd.com,*taobao.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00013 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006_008.bat
|
||||
... ELSE set variable curl -kv https://coll.jd.com/?e=illegalTopic/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni coll.jd.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL011.bat
|
||||
... ELSE set variable curl -kv https://www.taobao.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni taobao.com
|
||||
|
||||
Intercept_SSL_Decryption-00014
|
||||
[Tags] 拦截intercpt-协议版本-TLS1.3
|
||||
Comment 创建Decryption Profile
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"tls13","max":"tls13","mirror_client":0,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${data} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileId":"","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*vip.com,*github.com,*halfrost.com,*mi.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00014 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":${profiledId},"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL006_010.bat
|
||||
... ELSE set variable curl -kv https://www.vip.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni vip.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL012.bat
|
||||
... ELSE set variable curl -kv https://halfrost.com/tls1-3_start/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni halfrost.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL009.bat
|
||||
... ELSE set variable curl -kv https:///www.mi.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Connection was reset
|
||||
... ELSE set variable Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni mi.com
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/SecurityPolicy_Intercept_SSL011_12.bat
|
||||
... ELSE set variable curl -kv https://github.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' set variable Tango Secure Gateway CA
|
||||
... ELSE set variable Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni github.com
|
||||
196
01-TestCase/tsg_adc/multi_step/MultiStepDenyAllTests.robot
Normal file
196
01-TestCase/tsg_adc/multi_step/MultiStepDenyAllTests.robot
Normal file
@@ -0,0 +1,196 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeleteAfterCase ${policyIds} ${objectids}
|
||||
Force Tags tsg_adc tsg_security selfserver
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../03-Variable/PolicyObjectDefault.txt
|
||||
Resource ../../../02-Keyword/tsg_common/StmpHandle.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../02-Keyword/tsg_adc/FileOperation.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library Custometest
|
||||
Library json
|
||||
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/responsepages
|
||||
${profiledId} ${EMPTY}
|
||||
${dict} ${None}
|
||||
${caseName} SecurityPolicy-Deny-AllProtol-00001
|
||||
*** Keywords ***
|
||||
create-object-policy
|
||||
[Arguments] @{flag}
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=IP
|
||||
... isValid=1
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${caseName}_IPobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=CIDR|192.168.100.5|32|0/0&${Default_AddItem_ServerIpFormat}|${Default_AddItem_ServerIp1}|${Default_AddItem_ServerIp2}|${Default_AddItem_ServerPort}|${Default_AddItem_IsInitialize}|${Default_AddItem_ItemName}|${Default_AddItem_ItemDesc}
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Run Keyword If '${testPart}'=='all' set Variable ${objectId}
|
||||
|
||||
Comment 创建安全策略,针对所有协议,相当于BlackIP
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
... policyType=tsg_security
|
||||
... policyDesc=${Default_PolicyDesc}
|
||||
... action=deny
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion=${Default_UserRegion}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR
|
||||
... isValid=${Default_IsValid}
|
||||
... appObjectIdArray=2,3,4,5,6
|
||||
... userTags=${Default_UserTags}
|
||||
... doLog=2
|
||||
... scheduleId=${Default_ScheduleId}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
${policyIds} Run Keyword If '${testPart}'=='all' Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
# 区分执行方式
|
||||
${value} Run Keyword If ${flag}==[] insert_policyId_to_file ${caseName} ${policyId} ${objectids}
|
||||
... ELSE Create Dictionary policyId=${policyId} objectId=${objectids}
|
||||
Set Test Variable ${dict} ${value}
|
||||
|
||||
function-test
|
||||
Run Keyword If '${testPart}'=='all' Sleep ${policyVerificationSleepSeconds}s
|
||||
${starttime} Get Time
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/${caseName}_HTTP.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
|
||||
${starttime_http} Get Time
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Run Keyword If '${testPart}'=='all' Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime_http} Get Time
|
||||
#日志验证
|
||||
#GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
Comment 功能端验证SSL验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/${caseName}_SSL.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
#OpenSSL SSL_connect: Connection was reset in connection to
|
||||
#Send failure: Connection was reset
|
||||
... ELSE Create List OpenSSL SSL_connect: Connection reset by peer in connection to
|
||||
|
||||
${starttime_ssl} Get Time
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Run Keyword If '${testPart}'=='all' Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime_ssl} Get Time
|
||||
#日志验证
|
||||
#GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
|
||||
Comment 功能端验证DNS验证
|
||||
|
||||
|
||||
Comment 功能端验证MAIL验证
|
||||
#${mail} EmailLogin mail.tsgmail.com 25 dongxiaoyan@mail.tsgmail.com dxy123
|
||||
${starttime_mail} Get Time
|
||||
${Smtp服务器} Set Variable 192.168.100.5
|
||||
${Smtp服务器端口} Set Variable 25
|
||||
${邮箱账号} Set Variable dongxiaoyan@mail.tsgmail.com
|
||||
${邮箱密码} Set Variable dxy123
|
||||
${邮件主题} Set Variable что- иностранныеsuject
|
||||
${发送者} Set Variable dongxiaoyan@mail.tsgmail.com
|
||||
${附件} Set Variable ["${mailpath}/朱明明测试文件.txt"]
|
||||
${接收者} Set Variable ["jwctest@mail.tsgmail.com"]
|
||||
${抄送者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${密送者} Set Variable ["lyftest@mail.tsgmail.com"]
|
||||
${邮件正文} Set Variable 朱明明contentчто-иностранныеsuject
|
||||
${mail} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
|
||||
should contain ${mail} mail_fail
|
||||
Run Keyword If '${testPart}'=='all' Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime_mail} Get Time
|
||||
#日志验证
|
||||
#GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_protocol_type SMTP
|
||||
|
||||
Comment 功能端验证FTP验证
|
||||
${starttime_ftp} Get Time
|
||||
${ftpLogin} FTP_login ftp://192.168.100.5:21 -u"ftp_user:qazXSW@edc" test.txt
|
||||
should contain ${ftpLogin} ftp_fail
|
||||
#日志验证
|
||||
#GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ''
|
||||
Run Keyword If '${testPart}'=='all' Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime_ftp} Get Time
|
||||
|
||||
${endtime} Get Time
|
||||
# 区分执行方式
|
||||
Run Keyword If ${dict}==${None} insert_time_to_file ${caseName} ${starttime} ${endtime}
|
||||
... ELSE Run Keyword Set To Dictionary ${dict} ${starttime} ${endtime}
|
||||
log-test
|
||||
# 日志验证
|
||||
${obj} Run Keyword If ${dict}==${None} json.Loads ${caseName}
|
||||
... ELSE Set Variable ${dict}
|
||||
${policyId} Set Variable ${obj}[policyId]
|
||||
${s} Convert to String ${policyId}
|
||||
${objectids} Run Keyword If '${testPart}'!='all' set Variable ${obj}[objectids]
|
||||
${policyIds} Run Keyword If '${testPart}'!='all' Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime_http} ${endtime_http} ${testClentIP} ${s} http_host open.node.com
|
||||
${obj}[starttime] ${obj}[endtime]
|
||||
Comment 功能端验证SSL验证
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime_ssl} ${endtime_ssl} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
|
||||
Comment 功能端验证DNS验证
|
||||
|
||||
Comment 功能端验证MAIL验证
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime_mail} ${endtime_mail} ${testClentIP} ${s} mail_protocol_type SMTP
|
||||
|
||||
Comment 功能端验证FTP验证
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime_ftp} ${endtime_ftp} ${testClentIP} ${s} ftp_account ''
|
||||
log-test_bak
|
||||
# 日志验证
|
||||
${obj} Run Keyword If ${dict}==${None} json.Loads ${caseName}
|
||||
... ELSE Set Variable ${dict}
|
||||
${policyId} Set Variable ${obj}[policyId]
|
||||
${s} Convert to String ${policyId}
|
||||
${objectids} Run Keyword If '${testPart}'!='all' set Variable ${obj}[objectids]
|
||||
${policyIds} Run Keyword If '${testPart}'!='all' Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
#日志验证
|
||||
#GetLogList security_event_log ${starttime_http} ${endtime_http} ${testClentIP} ${s} http_host open.node.com
|
||||
GetLogList security_event_log ${obj}[starttime_http] ${obj}[endtime_http] ${testClentIP} ${s} http_host open.node.com
|
||||
${obj}[starttime] ${obj}[endtime]
|
||||
Comment 功能端验证SSL验证
|
||||
#日志验证
|
||||
#GetLogList security_event_log ${starttime_ssl} ${endtime_ssl} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
GetLogList security_event_log ${obj}[starttime_ssl} ${obj}[endtime_ssl} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
|
||||
Comment 功能端验证DNS验证
|
||||
|
||||
Comment 功能端验证MAIL验证
|
||||
#日志验证
|
||||
#GetLogList security_event_log ${starttime_mail} ${endtime_mail} ${testClentIP} ${s} mail_protocol_type SMTP
|
||||
GetLogList security_event_log ${obj}[starttime_mail} ${obj}[endtime_mail} ${testClentIP} ${s} mail_protocol_type SMTP
|
||||
|
||||
Comment 功能端验证FTP验证
|
||||
#日志验证
|
||||
#GetLogList security_event_log ${starttime_ftp} ${endtime_ftp} ${testClentIP} ${s} ftp_account ''
|
||||
GetLogList security_event_log ${obj}[starttime_ftp} ${obj}[endtime_ftp} ${testClentIP} ${s} ftp_account ''
|
||||
*** Test Cases ***
|
||||
MultiSecurityPolicy-Deny-AllProtol-00001
|
||||
[Tags] securitypolciy deny allprotol multistep
|
||||
#${caseName} set variable SecurityPolicy-Deny-AllProtol-00001
|
||||
|
||||
Run Keyword If '${testPart}'=='all' Run Keywords create-object-policy True
|
||||
... AND function-test
|
||||
... AND log-test
|
||||
... ELSE IF ${testPart}==1 Run Keyword create-object-policy
|
||||
... ELSE IF ${testPart}==2 Run Keyword function-test
|
||||
... ELSE IF ${testPart}==3 Run Keyword log-test
|
||||
#{"opAction":"add","policyList":{"policyId":"","policyName":"dxytest","policyType":"tsg_security","action":"deny","userTags":"","doBlacklist":0,"doLog":1,"policyDesc":"","effectiveRange":{"tag_sets":[[]]},"userRegion":{"method":"rst"},"referenceObject":[{"objectId":6926,"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]},{"objectId":6943,"protocolFields":["TSG_SECURITY_DESTINATION_ADDR"]}],"isValid":0,"scheduleId":[],"appObjectIdArray":[2,3,4,5,6]}}
|
||||
@@ -14,7 +14,7 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Allow-Http-00001
|
||||
[Tags] selfserver ip http allow
|
||||
[Tags] selfserver ip
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -46,7 +46,7 @@ ProxyPolicy-Allow-Http-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00002
|
||||
[Tags] selfserver ip+fqdn完整匹配 http allow
|
||||
[Tags] selfserver ip+fqdn完整匹配
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -82,7 +82,7 @@ ProxyPolicy-Allow-Http-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00003
|
||||
[Tags] selfserver ip+cat右匹配 http allow
|
||||
[Tags] selfserver ip+cat右匹配
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -118,7 +118,7 @@ ProxyPolicy-Allow-Http-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00004
|
||||
[Tags] selfserver http allow ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -150,7 +150,7 @@ ProxyPolicy-Allow-Http-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00005
|
||||
[Tags] selfserver http allow ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -182,7 +182,7 @@ ProxyPolicy-Allow-Http-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00006
|
||||
[Tags] selfserver http allow ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/tengrinews/tengrinews.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -214,7 +214,7 @@ ProxyPolicy-Allow-Http-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00007
|
||||
[Tags] selfserver http allow ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -246,7 +246,7 @@ ProxyPolicy-Allow-Http-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00008
|
||||
[Tags] selfserver http allow ip+请求头右匹配
|
||||
[Tags] selfserver ip+请求头右匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -282,7 +282,7 @@ ProxyPolicy-Allow-Http-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00009
|
||||
[Tags] selfserver http allow ip+请求头字串匹配
|
||||
[Tags] selfserver ip+请求头字串匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -318,7 +318,7 @@ ProxyPolicy-Allow-Http-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00010
|
||||
[Tags] selfserver http allow ip+请求头完整匹配
|
||||
[Tags] selfserver ip+请求头完整匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -354,7 +354,7 @@ ProxyPolicy-Allow-Http-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00011
|
||||
[Tags] selfserver http allow ip+请求头左匹配
|
||||
[Tags] selfserver ip+请求头左匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -390,7 +390,7 @@ ProxyPolicy-Allow-Http-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00012
|
||||
[Tags] selfserver http allow ip+cookie字串匹配
|
||||
[Tags] selfserver ip+cookie字串匹配
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -426,7 +426,7 @@ ProxyPolicy-Allow-Http-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00013
|
||||
[Tags] selfserver http allow ip+应答头右匹配
|
||||
[Tags] selfserver ip+应答头右匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -462,7 +462,7 @@ ProxyPolicy-Allow-Http-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00014
|
||||
[Tags] selfserver http allow ip+应答头字串匹配
|
||||
[Tags] selfserver ip+应答头字串匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -498,7 +498,7 @@ ProxyPolicy-Allow-Http-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00015
|
||||
[Tags] selfserver http allow ip+应答头完整匹配
|
||||
[Tags] selfserver ip+应答头完整匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=utf-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -534,7 +534,7 @@ ProxyPolicy-Allow-Http-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00016
|
||||
[Tags] selfserver http allow ip+应答头左匹配
|
||||
[Tags] selfserver ip+应答头左匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -570,7 +570,7 @@ ProxyPolicy-Allow-Http-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00017
|
||||
[Tags] selfserver http allow ip+set-cookie右匹配
|
||||
[Tags] selfserver ip+set-cookie右匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -606,7 +606,7 @@ ProxyPolicy-Allow-Http-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00018
|
||||
[Tags] selfserver http allow ip+set-cookie字串匹配
|
||||
[Tags] selfserver ip+set-cookie字串匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -642,7 +642,7 @@ ProxyPolicy-Allow-Http-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00019
|
||||
[Tags] selfserver http allow ip+set-cookie完整匹配
|
||||
[Tags] selfserver ip+set-cookie完整匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -678,7 +678,7 @@ ProxyPolicy-Allow-Http-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00020
|
||||
[Tags] selfserver http allow ip+set-cookie左匹配
|
||||
[Tags] selfserver ip+set-cookie左匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -714,7 +714,7 @@ ProxyPolicy-Allow-Http-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Http-00021
|
||||
[Tags] selfserver 最大组合 http allow
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -760,3 +760,56 @@ ProxyPolicy-Allow-Http-00021
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Allow-Http-00022
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${object_rq_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_rq_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Allow-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 酒店式公寓
|
||||
... ELSE Create List 酒店式公寓
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Allow-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_rq_Id}|TSG_FIELD_HTTP_REQ_HDR policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0008.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 发送POST请求
|
||||
... ELSE Create List 发送POST请求
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -14,13 +14,13 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Allow-Ssl-00001
|
||||
[Tags] selfserver ip ssl allow
|
||||
[Tags] selfserver ip
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -46,7 +46,7 @@ ProxyPolicy-Allow-Ssl-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00002
|
||||
[Tags] selfserver ip+fqdn完整匹配 ssl allow
|
||||
[Tags] selfserver ip+fqdn完整匹配
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -56,7 +56,7 @@ ProxyPolicy-Allow-Ssl-00002
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -82,7 +82,7 @@ ProxyPolicy-Allow-Ssl-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00003
|
||||
[Tags] selfserver ip+cat右匹配 ssl allow
|
||||
[Tags] selfserver ip+cat右匹配
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -92,7 +92,7 @@ ProxyPolicy-Allow-Ssl-00003
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -118,13 +118,13 @@ ProxyPolicy-Allow-Ssl-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00004
|
||||
[Tags] selfserver ssl allow ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -150,13 +150,13 @@ ProxyPolicy-Allow-Ssl-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00005
|
||||
[Tags] selfserver ssl allow ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -182,13 +182,13 @@ ProxyPolicy-Allow-Ssl-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00006
|
||||
[Tags] selfserver ssl allow ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/bytedance/bytedance.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -214,13 +214,13 @@ ProxyPolicy-Allow-Ssl-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00007
|
||||
[Tags] selfserver ssl allow ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -246,7 +246,7 @@ ProxyPolicy-Allow-Ssl-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00008
|
||||
[Tags] selfserver ssl allow ip+请求头右匹配
|
||||
[Tags] selfserver ip+请求头右匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -256,7 +256,7 @@ ProxyPolicy-Allow-Ssl-00008
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -282,7 +282,7 @@ ProxyPolicy-Allow-Ssl-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00009
|
||||
[Tags] selfserver ssl allow ip+请求头字串匹配
|
||||
[Tags] selfserver ip+请求头字串匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -292,7 +292,7 @@ ProxyPolicy-Allow-Ssl-00009
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -318,7 +318,7 @@ ProxyPolicy-Allow-Ssl-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00010
|
||||
[Tags] selfserver ssl allow ip+请求头完整匹配
|
||||
[Tags] selfserver ip+请求头完整匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -328,7 +328,7 @@ ProxyPolicy-Allow-Ssl-00010
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -354,7 +354,7 @@ ProxyPolicy-Allow-Ssl-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00011
|
||||
[Tags] selfserver ssl allow ip+请求头左匹配
|
||||
[Tags] selfserver ip+请求头左匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -364,7 +364,7 @@ ProxyPolicy-Allow-Ssl-00011
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -390,7 +390,7 @@ ProxyPolicy-Allow-Ssl-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00012
|
||||
[Tags] selfserver ssl allow ip+cookie字串匹配
|
||||
[Tags] selfserver ip+cookie字串匹配
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -400,7 +400,7 @@ ProxyPolicy-Allow-Ssl-00012
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -426,7 +426,7 @@ ProxyPolicy-Allow-Ssl-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00013
|
||||
[Tags] selfserver ssl allow ip+应答头右匹配
|
||||
[Tags] selfserver ip+应答头右匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -436,7 +436,7 @@ ProxyPolicy-Allow-Ssl-00013
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -462,7 +462,7 @@ ProxyPolicy-Allow-Ssl-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00014
|
||||
[Tags] selfserver ssl allow ip+应答头字串匹配
|
||||
[Tags] selfserver ip+应答头字串匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -472,7 +472,7 @@ ProxyPolicy-Allow-Ssl-00014
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -498,7 +498,7 @@ ProxyPolicy-Allow-Ssl-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00015
|
||||
[Tags] selfserver ssl allow ip+应答头完整匹配
|
||||
[Tags] selfserver ip+应答头完整匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -508,7 +508,7 @@ ProxyPolicy-Allow-Ssl-00015
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -534,7 +534,7 @@ ProxyPolicy-Allow-Ssl-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00016
|
||||
[Tags] selfserver ssl allow ip+应答头左匹配
|
||||
[Tags] selfserver ip+应答头左匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -544,7 +544,7 @@ ProxyPolicy-Allow-Ssl-00016
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -570,7 +570,7 @@ ProxyPolicy-Allow-Ssl-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00017
|
||||
[Tags] selfserver ssl allow ip+set-cookie右匹配
|
||||
[Tags] selfserver ip+set-cookie右匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -580,7 +580,7 @@ ProxyPolicy-Allow-Ssl-00017
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -606,7 +606,7 @@ ProxyPolicy-Allow-Ssl-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00018
|
||||
[Tags] selfserver ssl allow ip+set-cookie字串匹配
|
||||
[Tags] selfserver ip+set-cookie字串匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -616,7 +616,7 @@ ProxyPolicy-Allow-Ssl-00018
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -642,7 +642,7 @@ ProxyPolicy-Allow-Ssl-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00019
|
||||
[Tags] selfserver ssl allow ip+set-cookie完整匹配
|
||||
[Tags] selfserver ip+set-cookie完整匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -652,7 +652,7 @@ ProxyPolicy-Allow-Ssl-00019
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -678,7 +678,7 @@ ProxyPolicy-Allow-Ssl-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00020
|
||||
[Tags] selfserver ssl allow ip+set-cookie左匹配
|
||||
[Tags] selfserver ip+set-cookie左匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -688,7 +688,7 @@ ProxyPolicy-Allow-Ssl-00020
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -714,7 +714,7 @@ ProxyPolicy-Allow-Ssl-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Allow-Ssl-00021
|
||||
[Tags] selfserver 最大组合 ssl allow
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -735,7 +735,7 @@ ProxyPolicy-Allow-Ssl-00021
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type
|
||||
${rescode} ${object_re_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_re_Id}
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -759,3 +759,56 @@ ProxyPolicy-Allow-Ssl-00021
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Allow-Ssl-00022
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${object_re_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_re_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Allow-SSL-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_url_Id}|TSG_FIELD_HTTP_URL,${objectId}|TSG_SECURITY_DESTINATION_ADDR
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List twitter Tango Secure Gateway CA
|
||||
... ELSE Create List twitter Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Allow-SSL-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_re_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List трейлеры Tango Secure Gateway CA
|
||||
... ELSE Create List трейлеры Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
@@ -16,7 +16,7 @@ ${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Deny-Http-00001
|
||||
[Tags] selfserver ip http deny
|
||||
[Tags] selfserver ip
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -48,7 +48,7 @@ ProxyPolicy-Deny-Http-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00002
|
||||
[Tags] selfserver ip+fqdn完整匹配 http deny
|
||||
[Tags] selfserver ip+fqdn完整匹配
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -80,7 +80,7 @@ ProxyPolicy-Deny-Http-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00003
|
||||
[Tags] selfserver ip+cat右匹配 http deny
|
||||
[Tags] selfserver ip+cat右匹配
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -112,7 +112,7 @@ ProxyPolicy-Deny-Http-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00004
|
||||
[Tags] selfserver http deny ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -146,7 +146,7 @@ ProxyPolicy-Deny-Http-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00005
|
||||
[Tags] selfserver http deny ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -180,7 +180,7 @@ ProxyPolicy-Deny-Http-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00006
|
||||
[Tags] selfserver http deny ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/nationalbank/nationalbank.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -212,7 +212,7 @@ ProxyPolicy-Deny-Http-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00007
|
||||
[Tags] selfserver http deny ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -247,7 +247,7 @@ ProxyPolicy-Deny-Http-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00008
|
||||
[Tags] selfserver http deny ip+请求头右匹配
|
||||
[Tags] selfserver ip+请求头右匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -281,7 +281,7 @@ ProxyPolicy-Deny-Http-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00009
|
||||
[Tags] selfserver http deny ip+请求头字串匹配
|
||||
[Tags] selfserver ip+请求头字串匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -315,7 +315,7 @@ ProxyPolicy-Deny-Http-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00010
|
||||
[Tags] selfserver http deny ip+请求头完整匹配
|
||||
[Tags] selfserver ip+请求头完整匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -347,7 +347,7 @@ ProxyPolicy-Deny-Http-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00011
|
||||
[Tags] selfserver http deny ip+请求头左匹配
|
||||
[Tags] selfserver ip+请求头左匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -382,7 +382,7 @@ ProxyPolicy-Deny-Http-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00012
|
||||
[Tags] selfserver http deny ip+cookie字串匹配
|
||||
[Tags] selfserver ip+cookie字串匹配
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -414,7 +414,7 @@ ProxyPolicy-Deny-Http-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00013
|
||||
[Tags] selfserver http deny ip+应答头右匹配
|
||||
[Tags] selfserver ip+应答头右匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -446,7 +446,7 @@ ProxyPolicy-Deny-Http-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00014
|
||||
[Tags] selfserver http deny ip+应答头字串匹配
|
||||
[Tags] selfserver ip+应答头字串匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -480,7 +480,7 @@ ProxyPolicy-Deny-Http-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00015
|
||||
[Tags] selfserver http deny ip+应答头完整匹配
|
||||
[Tags] selfserver ip+应答头完整匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -512,7 +512,7 @@ ProxyPolicy-Deny-Http-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00016
|
||||
[Tags] selfserver http deny ip+应答头左匹配
|
||||
[Tags] selfserver ip+应答头左匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -544,7 +544,7 @@ ProxyPolicy-Deny-Http-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00017
|
||||
[Tags] selfserver http deny ip+set-cookie右匹配
|
||||
[Tags] selfserver ip+set-cookie右匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -576,7 +576,7 @@ ProxyPolicy-Deny-Http-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00018
|
||||
[Tags] selfserver http deny ip+set-cookie字串匹配
|
||||
[Tags] selfserver ip+set-cookie字串匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -610,7 +610,7 @@ ProxyPolicy-Deny-Http-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00019
|
||||
[Tags] selfserver http deny ip+set-cookie完整匹配
|
||||
[Tags] selfserver ip+set-cookie完整匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -642,7 +642,7 @@ ProxyPolicy-Deny-Http-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00020
|
||||
[Tags] selfserver http deny ip+set-cookie左匹配
|
||||
[Tags] selfserver ip+set-cookie左匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -674,7 +674,7 @@ ProxyPolicy-Deny-Http-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00021
|
||||
[Tags] selfserver http deny ip+请求体字串匹配
|
||||
[Tags] selfserver ip+请求体字串匹配
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -686,7 +686,7 @@ ProxyPolicy-Deny-Http-00021
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00021 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
@@ -694,8 +694,8 @@ ProxyPolicy-Deny-Http-00021
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Извините
|
||||
... ELSE Create List Извините
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -706,7 +706,7 @@ ProxyPolicy-Deny-Http-00021
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00022
|
||||
[Tags] selfserver http deny ip+应答体字串匹配
|
||||
[Tags] selfserver ip+应答体字串匹配
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response Body
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -738,7 +738,7 @@ ProxyPolicy-Deny-Http-00022
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00023
|
||||
[Tags] selfserver 最大组合 http deny
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -784,3 +784,181 @@ ProxyPolicy-Deny-Http-00023
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Deny-Http-00024
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_yd_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00024 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","html_profile":${profiledId},"code":404,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0001.bat
|
||||
... ELSE set variable curl http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
|
||||
... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00024 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","html_profile":${profiledId},"code":404,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat
|
||||
... ELSE set variable curl http://open.node.com/test/youtube/youtube.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
|
||||
... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Deny-Http-00025
|
||||
[Tags] selfserver ip+请求体and关系
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ctes&t123
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00025 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00026
|
||||
[Tags] selfserver ip+请求体或更新
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test,qazx
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00026 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00027
|
||||
[Tags] selfserver ip+应答体and关系
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response& Body
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00027 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Http-00028
|
||||
[Tags] selfserver ip+应答体或关系
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response,12345
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00028 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -16,13 +16,13 @@ ${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Deny-Ssl-00001
|
||||
[Tags] selfserver ip deny ssl
|
||||
[Tags] selfserver ip
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -48,13 +48,13 @@ ProxyPolicy-Deny-Ssl-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00002
|
||||
[Tags] selfserver ip+fqdn完整匹配 deny ssl
|
||||
[Tags] selfserver ip+fqdn完整匹配
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -80,13 +80,13 @@ ProxyPolicy-Deny-Ssl-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00003
|
||||
[Tags] selfserver ip+cat右匹配 deny ssl
|
||||
[Tags] selfserver ip+cat右匹配
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -112,13 +112,13 @@ ProxyPolicy-Deny-Ssl-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00004
|
||||
[Tags] selfserver deny ip+url右匹配 ssl
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -146,13 +146,13 @@ ProxyPolicy-Deny-Ssl-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00005
|
||||
[Tags] selfserver deny ip+url字串匹配 ssl
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -180,13 +180,13 @@ ProxyPolicy-Deny-Ssl-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00006
|
||||
[Tags] selfserver deny ip+url完整匹配 ssl
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/bytedance/bytedance.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -212,13 +212,13 @@ ProxyPolicy-Deny-Ssl-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00007
|
||||
[Tags] selfserver deny ip+url左匹配 ssl
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -247,13 +247,13 @@ ProxyPolicy-Deny-Ssl-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00008
|
||||
[Tags] selfserver deny ssl ip+请求头右匹配
|
||||
[Tags] selfserver ip+请求头右匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -281,13 +281,13 @@ ProxyPolicy-Deny-Ssl-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00009
|
||||
[Tags] selfserver deny ip+请求头字串匹配 ssl
|
||||
[Tags] selfserver ip+请求头字串匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -315,13 +315,13 @@ ProxyPolicy-Deny-Ssl-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00010
|
||||
[Tags] selfserver deny ip+请求头完整匹配 ssl
|
||||
[Tags] selfserver ip+请求头完整匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -347,13 +347,13 @@ ProxyPolicy-Deny-Ssl-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00011
|
||||
[Tags] selfserver deny ip+请求头左匹配 ssl
|
||||
[Tags] selfserver ip+请求头左匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -382,13 +382,13 @@ ProxyPolicy-Deny-Ssl-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00012
|
||||
[Tags] selfserver deny ip+cookie字串匹配 ssl
|
||||
[Tags] selfserver ip+cookie字串匹配
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -414,13 +414,13 @@ ProxyPolicy-Deny-Ssl-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00013
|
||||
[Tags] selfserver deny ip+应答头右匹配 ssl
|
||||
[Tags] selfserver ip+应答头右匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -446,13 +446,13 @@ ProxyPolicy-Deny-Ssl-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00014
|
||||
[Tags] selfserver deny ip+应答头字串匹配 ssl
|
||||
[Tags] selfserver ip+应答头字串匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -480,13 +480,13 @@ ProxyPolicy-Deny-Ssl-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00015
|
||||
[Tags] selfserver deny ip+应答头完整匹配 ssl
|
||||
[Tags] selfserver ip+应答头完整匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -512,13 +512,13 @@ ProxyPolicy-Deny-Ssl-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00016
|
||||
[Tags] selfserver deny ip+应答头左匹配 ssl
|
||||
[Tags] selfserver ip+应答头左匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -544,13 +544,13 @@ ProxyPolicy-Deny-Ssl-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00017
|
||||
[Tags] selfserver deny ip+set-cookie右匹配 ssl
|
||||
[Tags] selfserver ip+set-cookie右匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -576,13 +576,13 @@ ProxyPolicy-Deny-Ssl-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00018
|
||||
[Tags] selfserver deny ip+set-cookie字串匹配 ssl
|
||||
[Tags] selfserver ip+set-cookie字串匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -610,13 +610,13 @@ ProxyPolicy-Deny-Ssl-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00019
|
||||
[Tags] selfserver deny ip+set-cookie完整匹配 ssl
|
||||
[Tags] selfserver ip+set-cookie完整匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -629,7 +629,7 @@ ProxyPolicy-Deny-Ssl-00019
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat
|
||||
... ELSE set variable curl -kv \ -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=yyyyy" https://open.node.com/action
|
||||
... ELSE set variable curl -kv \ -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List qwerty Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List qwerty Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
@@ -642,13 +642,13 @@ ProxyPolicy-Deny-Ssl-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00020
|
||||
[Tags] selfserver deny ip+set-cookie左匹配 ssl
|
||||
[Tags] selfserver ip+set-cookie左匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -674,19 +674,19 @@ ProxyPolicy-Deny-Ssl-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00021
|
||||
[Tags] selfserver deny ip+请求体字串匹配 ssl
|
||||
[Tags] selfserver ip+请求体字串匹配
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-SSL-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-SSL-00021 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
@@ -694,8 +694,8 @@ ProxyPolicy-Deny-Ssl-00021
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Извините Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List Извините Tango Secure Gateway CA X-TG-Construct-By
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
@@ -706,13 +706,13 @@ ProxyPolicy-Deny-Ssl-00021
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00022
|
||||
[Tags] selfserver deny ip+应答体字串匹配 ssl
|
||||
[Tags] selfserver ip+应答体字串匹配
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response Body
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -726,8 +726,8 @@ ProxyPolicy-Deny-Ssl-00022
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Empty reply from server Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA X-TG-Construct-By
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
@@ -738,7 +738,7 @@ ProxyPolicy-Deny-Ssl-00022
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00023
|
||||
[Tags] selfserver 最大组合 deny ssl
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -760,7 +760,7 @@ ProxyPolicy-Deny-Ssl-00023
|
||||
${rescode} ${object_by_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_by_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -774,8 +774,8 @@ ProxyPolicy-Deny-Ssl-00023
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00023.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' \ https://open.node.com/test/bytedance/bytedance.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Empty reply from server X-TG-Construct-By
|
||||
... ELSE Create List Connection reset by peer X-TG-Construct-By
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -784,3 +784,180 @@ ProxyPolicy-Deny-Ssl-00023
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Deny-Ssl-00024
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*bytedance.html
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-Ssl-00024 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"你好,五一","code":403,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_HOST
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List 你好,五一 Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List 你好,五一 Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-Ssl-00024 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"QAZWSX星期天песни","code":403,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_url_Id}|TSG_FIELD_HTTP_URL policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0003.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/bytedance/bytedance.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List QAZWSX星期天 песни Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List QAZWSX星期天 песни Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Deny-Ssl-00025
|
||||
[Tags] selfserver ip+请求体and关系
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ctes&t123
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-SSL-00025 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-SSL-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00026
|
||||
[Tags] selfserver ip+请求体或关系
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test,你好明天
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-SSL-00026 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-SSL-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00027
|
||||
[Tags] selfserver ip+应答体and关系
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response& Body
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-ssl-00027 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Deny-Ssl-00028
|
||||
[Tags] selfserver ip+应答体或关系
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response,你好明天
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-ssl-00028 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ ${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Hijack-Http-00001
|
||||
[Tags] selfserver http hijack ip+url
|
||||
[Tags] selfserver ip+url
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -55,7 +55,7 @@ ProxyPolicy-Hijack-Http-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00002
|
||||
[Tags] selfserver http hijack ip+fqdn完整匹配+url
|
||||
[Tags] selfserver ip+fqdn完整匹配+url
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -94,7 +94,7 @@ ProxyPolicy-Hijack-Http-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00003
|
||||
[Tags] selfserver http hijack ip+cat右匹配+url
|
||||
[Tags] selfserver ip+cat右匹配+url
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -133,7 +133,7 @@ ProxyPolicy-Hijack-Http-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00004
|
||||
[Tags] selfserver http hijack ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -168,7 +168,7 @@ ProxyPolicy-Hijack-Http-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00005
|
||||
[Tags] selfserver http hijack ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -203,7 +203,7 @@ ProxyPolicy-Hijack-Http-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00006
|
||||
[Tags] selfserver http hijack ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/nationalbank/nationalbank.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -238,7 +238,7 @@ ProxyPolicy-Hijack-Http-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00007
|
||||
[Tags] selfserver http hijack ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -273,7 +273,7 @@ ProxyPolicy-Hijack-Http-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00008
|
||||
[Tags] selfserver http hijack ip+请求头右匹配+url
|
||||
[Tags] selfserver ip+请求头右匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -312,7 +312,7 @@ ProxyPolicy-Hijack-Http-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00009
|
||||
[Tags] selfserver http hijack ip+请求头字串匹配+url
|
||||
[Tags] selfserver ip+请求头字串匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -351,7 +351,7 @@ ProxyPolicy-Hijack-Http-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00010
|
||||
[Tags] selfserver http hijack ip+请求头完整匹配+url
|
||||
[Tags] selfserver ip+请求头完整匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -390,7 +390,7 @@ ProxyPolicy-Hijack-Http-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00011
|
||||
[Tags] selfserver http hijack ip+请求头左匹配+url
|
||||
[Tags] selfserver ip+请求头左匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -429,7 +429,7 @@ ProxyPolicy-Hijack-Http-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00012
|
||||
[Tags] selfserver http hijack ip+cookie字串匹配+url
|
||||
[Tags] selfserver ip+cookie字串匹配+url
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -468,7 +468,7 @@ ProxyPolicy-Hijack-Http-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00013
|
||||
[Tags] selfserver http hijack ip+应答头右匹配+url
|
||||
[Tags] selfserver ip+应答头右匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -507,7 +507,7 @@ ProxyPolicy-Hijack-Http-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00014
|
||||
[Tags] selfserver http hijack ip+应答头字串匹配+url
|
||||
[Tags] selfserver ip+应答头字串匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -546,7 +546,7 @@ ProxyPolicy-Hijack-Http-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00015
|
||||
[Tags] selfserver http hijack ip+应答头完整匹配+url
|
||||
[Tags] selfserver ip+应答头完整匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -585,7 +585,7 @@ ProxyPolicy-Hijack-Http-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00016
|
||||
[Tags] selfserver http hijack ip+应答头左匹配+url
|
||||
[Tags] selfserver ip+应答头左匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -624,7 +624,7 @@ ProxyPolicy-Hijack-Http-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00017
|
||||
[Tags] selfserver http hijack ip+set-cookie右匹配+url
|
||||
[Tags] selfserver ip+set-cookie右匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -663,7 +663,7 @@ ProxyPolicy-Hijack-Http-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00018
|
||||
[Tags] selfserver http hijack ip+set-cookie字串匹配+url
|
||||
[Tags] selfserver ip+set-cookie字串匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -702,7 +702,7 @@ ProxyPolicy-Hijack-Http-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00019
|
||||
[Tags] selfserver http hijack ip+set-cookie完整匹配+url
|
||||
[Tags] selfserver ip+set-cookie完整匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -741,7 +741,7 @@ ProxyPolicy-Hijack-Http-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00020
|
||||
[Tags] selfserver http hijack ip+set-cookie左匹配+url
|
||||
[Tags] selfserver ip+set-cookie左匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -780,7 +780,7 @@ ProxyPolicy-Hijack-Http-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Http-00021
|
||||
[Tags] selfserver 最大组合 http hijack
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -829,3 +829,59 @@ ProxyPolicy-Hijack-Http-00021
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Hijack-Http-00022
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${object_ck_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_ck_Id}
|
||||
Comment 创建hijack文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-1.exe hijack {"isValid":1,"contentType":"application/x-msdos-program","opAction":"add","profileName":"test2","contentName":"Create-Hijack Files-test-1.exe","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Hijack-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"hijack","hijack_profile":${profiledId},"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0008.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac
|
||||
... ELSE Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Hijack-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"hijack","hijack_profile":${profiledId},"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_ck_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0012.bat
|
||||
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac
|
||||
... ELSE Create List b76f:a340:7b1f:f4d0:27f3:8f0e:2db0:2bac
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -16,7 +16,7 @@ ${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Hijack-Ssl-00001
|
||||
[Tags] selfserver ssl hijack ip+url
|
||||
[Tags] selfserver ip+url
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -25,7 +25,7 @@ ProxyPolicy-Hijack-Ssl-00001
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test.apk hijack {"isValid":1,"contentType":"application/vnd.android.package-archive","opAction":"add","profileName":"test1","contentName":"Create-Hijack Files-test.apk","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -51,7 +51,7 @@ ProxyPolicy-Hijack-Ssl-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00002
|
||||
[Tags] selfserver ssl hijack ip+fqdn完整匹配+url
|
||||
[Tags] selfserver ip+fqdn完整匹配+url
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -64,7 +64,7 @@ ProxyPolicy-Hijack-Ssl-00002
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -90,7 +90,7 @@ ProxyPolicy-Hijack-Ssl-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00003
|
||||
[Tags] selfserver ssl hijack ip+cat右匹配+url
|
||||
[Tags] selfserver ip+cat右匹配+url
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -103,7 +103,7 @@ ProxyPolicy-Hijack-Ssl-00003
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-1.exe hijack {"isValid":1,"contentType":"application/x-msdos-program","opAction":"add","profileName":"test2","contentName":"Create-Hijack Files-test-1.exe","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -129,7 +129,7 @@ ProxyPolicy-Hijack-Ssl-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00004
|
||||
[Tags] selfserver ssl hijack ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -138,7 +138,7 @@ ProxyPolicy-Hijack-Ssl-00004
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -164,7 +164,7 @@ ProxyPolicy-Hijack-Ssl-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00005
|
||||
[Tags] selfserver ssl hijack ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -173,7 +173,7 @@ ProxyPolicy-Hijack-Ssl-00005
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-5.png hijack {"isValid":1,"contentType":"image/png","opAction":"add","profileName":"test4","contentName":"Create-Hijack Files-test-5.png","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -199,7 +199,7 @@ ProxyPolicy-Hijack-Ssl-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00006
|
||||
[Tags] selfserver ssl hijack ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/bytedance/bytedance.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -208,7 +208,7 @@ ProxyPolicy-Hijack-Ssl-00006
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-4.jpeg hijack {"isValid":1,"contentType":"image/jpeg","opAction":"add","profileName":"test5","contentName":"Create-Hijack Files-test-4.jpeg","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -234,7 +234,7 @@ ProxyPolicy-Hijack-Ssl-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00007
|
||||
[Tags] selfserver ssl hijack ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -243,7 +243,7 @@ ProxyPolicy-Hijack-Ssl-00007
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-2.gif hijack {"isValid":1,"contentType":"image/gif","opAction":"add","profileName":"test6","contentName":"Create-Hijack Files-test-2.gif","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -269,7 +269,7 @@ ProxyPolicy-Hijack-Ssl-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00008
|
||||
[Tags] selfserver ssl hijack ip+请求头右匹配+url
|
||||
[Tags] selfserver ip+请求头右匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -282,7 +282,7 @@ ProxyPolicy-Hijack-Ssl-00008
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -308,7 +308,7 @@ ProxyPolicy-Hijack-Ssl-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00009
|
||||
[Tags] selfserver ssl hijack ip+请求头字串匹配+url
|
||||
[Tags] selfserver ip+请求头字串匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -321,7 +321,7 @@ ProxyPolicy-Hijack-Ssl-00009
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -347,7 +347,7 @@ ProxyPolicy-Hijack-Ssl-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00010
|
||||
[Tags] selfserver ssl hijack ip+请求头完整匹配+url
|
||||
[Tags] selfserver ip+请求头完整匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -360,7 +360,7 @@ ProxyPolicy-Hijack-Ssl-00010
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -386,7 +386,7 @@ ProxyPolicy-Hijack-Ssl-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00011
|
||||
[Tags] selfserver ssl hijack ip+请求头左匹配+url
|
||||
[Tags] selfserver ip+请求头左匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -399,7 +399,7 @@ ProxyPolicy-Hijack-Ssl-00011
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-1.exe hijack {"isValid":1,"contentType":"application/x-msdos-program","opAction":"add","profileName":"test2","contentName":"Create-Hijack Files-test-1.exe","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -425,7 +425,7 @@ ProxyPolicy-Hijack-Ssl-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00012
|
||||
[Tags] selfserver ssl hijack ip+cookie字串匹配+url
|
||||
[Tags] selfserver ip+cookie字串匹配+url
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -438,7 +438,7 @@ ProxyPolicy-Hijack-Ssl-00012
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-5.png hijack {"isValid":1,"contentType":"image/png","opAction":"add","profileName":"test4","contentName":"Create-Hijack Files-test-5.png","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -464,7 +464,7 @@ ProxyPolicy-Hijack-Ssl-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00013
|
||||
[Tags] selfserver ssl hijack ip+应答头右匹配+url
|
||||
[Tags] selfserver ip+应答头右匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -477,7 +477,7 @@ ProxyPolicy-Hijack-Ssl-00013
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-4.jpeg hijack {"isValid":1,"contentType":"image/jpeg","opAction":"add","profileName":"test5","contentName":"Create-Hijack Files-test-4.jpeg","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -503,7 +503,7 @@ ProxyPolicy-Hijack-Ssl-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00014
|
||||
[Tags] selfserver ssl hijack ip+应答头字串匹配+url
|
||||
[Tags] selfserver ip+应答头字串匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -516,7 +516,7 @@ ProxyPolicy-Hijack-Ssl-00014
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-2.gif hijack {"isValid":1,"contentType":"image/gif","opAction":"add","profileName":"test6","contentName":"Create-Hijack Files-test-2.gif","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -542,7 +542,7 @@ ProxyPolicy-Hijack-Ssl-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00015
|
||||
[Tags] selfserver ssl hijack ip+应答头完整匹配+url
|
||||
[Tags] selfserver ip+应答头完整匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -555,7 +555,7 @@ ProxyPolicy-Hijack-Ssl-00015
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -581,7 +581,7 @@ ProxyPolicy-Hijack-Ssl-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00016
|
||||
[Tags] selfserver ssl hijack ip+应答头左匹配+url
|
||||
[Tags] selfserver ip+应答头左匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -594,7 +594,7 @@ ProxyPolicy-Hijack-Ssl-00016
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -620,7 +620,7 @@ ProxyPolicy-Hijack-Ssl-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00017
|
||||
[Tags] selfserver ssl hijack ip+set-cookie右匹配+url
|
||||
[Tags] selfserver ip+set-cookie右匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -633,7 +633,7 @@ ProxyPolicy-Hijack-Ssl-00017
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -659,7 +659,7 @@ ProxyPolicy-Hijack-Ssl-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00018
|
||||
[Tags] selfserver ssl hijack ip+set-cookie字串匹配+url
|
||||
[Tags] selfserver ip+set-cookie字串匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -672,7 +672,7 @@ ProxyPolicy-Hijack-Ssl-00018
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-5.png hijack {"isValid":1,"contentType":"image/png","opAction":"add","profileName":"test4","contentName":"Create-Hijack Files-test-5.png","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -698,7 +698,7 @@ ProxyPolicy-Hijack-Ssl-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00019
|
||||
[Tags] selfserver ssl hijack ip+set-cookie完整匹配+url
|
||||
[Tags] selfserver ip+set-cookie完整匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -711,7 +711,7 @@ ProxyPolicy-Hijack-Ssl-00019
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-4.jpeg hijack {"isValid":1,"contentType":"image/jpeg","opAction":"add","profileName":"test5","contentName":"Create-Hijack Files-test-4.jpeg","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -737,7 +737,7 @@ ProxyPolicy-Hijack-Ssl-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00020
|
||||
[Tags] selfserver ssl hijack ip+set-cookie左匹配+url
|
||||
[Tags] selfserver ip+set-cookie左匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -750,7 +750,7 @@ ProxyPolicy-Hijack-Ssl-00020
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-2.gif hijack {"isValid":1,"contentType":"image/gif","opAction":"add","profileName":"test6","contentName":"Create-Hijack Files-test-2.gif","profileId":null,"returnData":1}
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -776,7 +776,7 @@ ProxyPolicy-Hijack-Ssl-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Hijack-Ssl-00021
|
||||
[Tags] selfserver 最大组合 ssl hijack
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -800,7 +800,7 @@ ProxyPolicy-Hijack-Ssl-00021
|
||||
Comment 创建hijack文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -824,3 +824,60 @@ ProxyPolicy-Hijack-Ssl-00021
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Hijack-Ssl-00022
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建hijack文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${object_rq_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_rq_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Hijack-SSL-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"hijack","hijack_profile":${profiledId},"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List 控制小蛇在地图范围内移动 Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List 控制小蛇在地图范围内移动 Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Hijack-SSL-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"hijack","hijack_profile":${profiledId},"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_rq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0008.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' \ https://open.node.com
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List 控制小蛇在地图范围内移动 Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List 控制小蛇在地图范围内移动 Tango Secure Gateway CA X-TG-Construct-By
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ ${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Insert-Http-00001
|
||||
[Tags] selfserver http Insert ip+url
|
||||
[Tags] selfserver ip+url
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*node.com/
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建insert文件
|
||||
@@ -37,8 +37,8 @@ ProxyPolicy-Insert-Http-00001
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv \ http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -51,13 +51,13 @@ ProxyPolicy-Insert-Http-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00002
|
||||
[Tags] selfserver http Insert ip+fqdn完整匹配+url
|
||||
[Tags] selfserver ip+fqdn完整匹配+url
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*node.com/
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建insert文件
|
||||
@@ -76,8 +76,8 @@ ProxyPolicy-Insert-Http-00002
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -90,13 +90,13 @@ ProxyPolicy-Insert-Http-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00003
|
||||
[Tags] selfserver http Insert ip+cat右匹配+url
|
||||
[Tags] selfserver ip+cat右匹配+url
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_cat_Id}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*youtube.html
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*node.com/
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建insert文件
|
||||
@@ -115,8 +115,8 @@ ProxyPolicy-Insert-Http-00003
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/youtube/youtube.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -129,9 +129,9 @@ ProxyPolicy-Insert-Http-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00004
|
||||
[Tags] selfserver http Insert ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*node.com/
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建insert文件
|
||||
@@ -150,8 +150,8 @@ ProxyPolicy-Insert-Http-00004
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -164,9 +164,9 @@ ProxyPolicy-Insert-Http-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00005
|
||||
[Tags] selfserver http Insert ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建insert文件
|
||||
@@ -185,8 +185,8 @@ ProxyPolicy-Insert-Http-00005
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -199,9 +199,9 @@ ProxyPolicy-Insert-Http-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00006
|
||||
[Tags] selfserver http Insert ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/nationalbank/nationalbank.html
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建insert文件
|
||||
@@ -220,8 +220,8 @@ ProxyPolicy-Insert-Http-00006
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0003.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -234,7 +234,7 @@ ProxyPolicy-Insert-Http-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00007
|
||||
[Tags] selfserver http Insert ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -255,8 +255,8 @@ ProxyPolicy-Insert-Http-00007
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat
|
||||
... ELSE set variable curl \ \ http://open.node.com/test/youtube/youtube.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -269,7 +269,7 @@ ProxyPolicy-Insert-Http-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00008
|
||||
[Tags] selfserver http Insert ip+请求头右匹配+url
|
||||
[Tags] selfserver ip+请求头右匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -308,7 +308,7 @@ ProxyPolicy-Insert-Http-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00009
|
||||
[Tags] selfserver http Insert ip+请求头字串匹配+url
|
||||
[Tags] selfserver ip+请求头字串匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -347,7 +347,7 @@ ProxyPolicy-Insert-Http-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00010
|
||||
[Tags] selfserver http Insert ip+请求头完整匹配+url
|
||||
[Tags] selfserver ip+请求头完整匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -386,7 +386,7 @@ ProxyPolicy-Insert-Http-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00011
|
||||
[Tags] selfserver http Insert ip+请求头左匹配+url
|
||||
[Tags] selfserver ip+请求头左匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -425,13 +425,13 @@ ProxyPolicy-Insert-Http-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00012
|
||||
[Tags] selfserver http Insert ip+cookie字串匹配+url
|
||||
[Tags] selfserver ip+cookie字串匹配+url
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建insert文件
|
||||
@@ -450,8 +450,8 @@ ProxyPolicy-Insert-Http-00012
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0012.bat
|
||||
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-insert-HTTP-0012.bat
|
||||
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -464,7 +464,7 @@ ProxyPolicy-Insert-Http-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00013
|
||||
[Tags] selfserver http Insert ip+应答头右匹配+url
|
||||
[Tags] selfserver ip+应答头右匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -489,8 +489,8 @@ ProxyPolicy-Insert-Http-00013
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -503,7 +503,7 @@ ProxyPolicy-Insert-Http-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00014
|
||||
[Tags] selfserver http Insert ip+应答头字串匹配+url
|
||||
[Tags] selfserver ip+应答头字串匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -528,8 +528,8 @@ ProxyPolicy-Insert-Http-00014
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -542,9 +542,9 @@ ProxyPolicy-Insert-Http-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00015
|
||||
[Tags] selfserver http Insert ip+应答头完整匹配+url
|
||||
[Tags] selfserver ip+应答头完整匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=utf-8|Content-Type
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html;charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
@@ -567,8 +567,8 @@ ProxyPolicy-Insert-Http-00015
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0003.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -581,7 +581,7 @@ ProxyPolicy-Insert-Http-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00016
|
||||
[Tags] selfserver http Insert ip+应答头左匹配+url
|
||||
[Tags] selfserver ip+应答头左匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -606,8 +606,8 @@ ProxyPolicy-Insert-Http-00016
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0002.bat
|
||||
... ELSE set variable curl -kv \ http://open.node.com/test/youtube/youtube.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
@@ -620,7 +620,7 @@ ProxyPolicy-Insert-Http-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00017
|
||||
[Tags] selfserver http Insert ip+set-cookie右匹配+url
|
||||
[Tags] selfserver ip+set-cookie右匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -659,7 +659,7 @@ ProxyPolicy-Insert-Http-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00018
|
||||
[Tags] selfserver http Insert ip+set-cookie字串匹配+url
|
||||
[Tags] selfserver ip+set-cookie字串匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -698,7 +698,7 @@ ProxyPolicy-Insert-Http-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00019
|
||||
[Tags] selfserver http Insert ip+set-cookie完整匹配+url
|
||||
[Tags] selfserver ip+set-cookie完整匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -737,7 +737,7 @@ ProxyPolicy-Insert-Http-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00020
|
||||
[Tags] selfserver http Insert ip+set-cookie左匹配+url
|
||||
[Tags] selfserver ip+set-cookie左匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -776,7 +776,7 @@ ProxyPolicy-Insert-Http-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Http-00021
|
||||
[Tags] selfserver 最大组合 http Insert
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -825,3 +825,59 @@ ProxyPolicy-Insert-Http-00021
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Insert-Http-00022
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${object_sk_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_sk_Id}
|
||||
Comment 创建insert文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Insert-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"insert","insert_profile":${profiledId},"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-insert-HTTP-0012.bat
|
||||
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Insert-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"insert","insert_profile":${profiledId},"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_sk_Id}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!")
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
@@ -16,16 +16,16 @@ ${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Insert-Ssl-00001
|
||||
[Tags] selfserver ssl Hijack ip+url
|
||||
[Tags] selfserver ip+url
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*node.com/
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建insert文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -37,10 +37,10 @@ ProxyPolicy-Insert-Ssl-00001
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
@@ -51,20 +51,20 @@ ProxyPolicy-Insert-Ssl-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00002
|
||||
[Tags] selfserver ssl Insert ip+fqdn完整匹配+url
|
||||
[Tags] selfserver ip+fqdn完整匹配+url
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*node.com/
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建insert文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -76,8 +76,8 @@ ProxyPolicy-Insert-Ssl-00002
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA \ \ \ Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
@@ -90,20 +90,20 @@ ProxyPolicy-Insert-Ssl-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00003
|
||||
[Tags] selfserver ssl Insert ip+cat右匹配+url
|
||||
[Tags] selfserver ip+cat右匹配+url
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_cat_Id}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*action
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*node.com/
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建insert文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -115,8 +115,8 @@ ProxyPolicy-Insert-Ssl-00003
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat
|
||||
... ELSE set variable curl -kv \ -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
@@ -129,16 +129,16 @@ ProxyPolicy-Insert-Ssl-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00004
|
||||
[Tags] selfserver ssl Insert ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*node.com/
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建insert文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -150,8 +150,8 @@ ProxyPolicy-Insert-Ssl-00004
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
@@ -164,16 +164,16 @@ ProxyPolicy-Insert-Ssl-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00005
|
||||
[Tags] selfserver ssl Insert ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建insert文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -185,8 +185,8 @@ ProxyPolicy-Insert-Ssl-00005
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
@@ -199,16 +199,16 @@ ProxyPolicy-Insert-Ssl-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00006
|
||||
[Tags] selfserver ssl Insert ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/bytedance/bytedance.html
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建insert文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -220,8 +220,8 @@ ProxyPolicy-Insert-Ssl-00006
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0003.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/bytedance/bytedance.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
@@ -234,7 +234,7 @@ ProxyPolicy-Insert-Ssl-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00007
|
||||
[Tags] selfserver ssl Insert ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -243,7 +243,7 @@ ProxyPolicy-Insert-Ssl-00007
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -255,8 +255,8 @@ ProxyPolicy-Insert-Ssl-00007
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat
|
||||
... ELSE set variable curl -kv \ -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
@@ -269,7 +269,7 @@ ProxyPolicy-Insert-Ssl-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00008
|
||||
[Tags] selfserver ssl Insert ip+请求头右匹配+url
|
||||
[Tags] selfserver ip+请求头右匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -282,7 +282,7 @@ ProxyPolicy-Insert-Ssl-00008
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -308,7 +308,7 @@ ProxyPolicy-Insert-Ssl-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00009
|
||||
[Tags] selfserver ssl Insert ip+请求头字串匹配+url
|
||||
[Tags] selfserver ip+请求头字串匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -321,7 +321,7 @@ ProxyPolicy-Insert-Ssl-00009
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -347,7 +347,7 @@ ProxyPolicy-Insert-Ssl-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00010
|
||||
[Tags] selfserver ssl Insert ip+请求头完整匹配+url
|
||||
[Tags] selfserver ip+请求头完整匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -360,7 +360,7 @@ ProxyPolicy-Insert-Ssl-00010
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -386,7 +386,7 @@ ProxyPolicy-Insert-Ssl-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00011
|
||||
[Tags] selfserver ssl Insert ip+请求头左匹配+url
|
||||
[Tags] selfserver ip+请求头左匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -399,7 +399,7 @@ ProxyPolicy-Insert-Ssl-00011
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -425,20 +425,20 @@ ProxyPolicy-Insert-Ssl-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00012
|
||||
[Tags] selfserver ssl Insert ip+cookie字串匹配+url
|
||||
[Tags] selfserver ip+cookie字串匹配+url
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建insert文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -450,8 +450,8 @@ ProxyPolicy-Insert-Ssl-00012
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0012.bat
|
||||
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'https://www.baidu.com/' \ https://open.node.com/test/nationalbank/nationalbank.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-insert-SSL-0012.bat
|
||||
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'https://www.baidu.com/' \ https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
@@ -464,9 +464,9 @@ ProxyPolicy-Insert-Ssl-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00013
|
||||
[Tags] selfserver ssl Insert ip+应答头右匹配+url
|
||||
[Tags] selfserver ip+应答头右匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*html|Content-Type
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
@@ -477,7 +477,7 @@ ProxyPolicy-Insert-Ssl-00013
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -489,8 +489,8 @@ ProxyPolicy-Insert-Ssl-00013
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
@@ -503,7 +503,7 @@ ProxyPolicy-Insert-Ssl-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00014
|
||||
[Tags] selfserver ssl Insert ip+应答头字串匹配+url
|
||||
[Tags] selfserver ip+应答头字串匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -516,7 +516,7 @@ ProxyPolicy-Insert-Ssl-00014
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -528,8 +528,8 @@ ProxyPolicy-Insert-Ssl-00014
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
@@ -542,9 +542,9 @@ ProxyPolicy-Insert-Ssl-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00015
|
||||
[Tags] selfserver ssl Insert ip+应答头完整匹配+url
|
||||
[Tags] selfserver ip+应答头完整匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html;charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
@@ -555,7 +555,7 @@ ProxyPolicy-Insert-Ssl-00015
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -567,8 +567,8 @@ ProxyPolicy-Insert-Ssl-00015
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0003.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/bytedance/bytedance.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
@@ -581,7 +581,7 @@ ProxyPolicy-Insert-Ssl-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00016
|
||||
[Tags] selfserver ssl Insert ip+应答头左匹配+url
|
||||
[Tags] selfserver ip+应答头左匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -594,7 +594,7 @@ ProxyPolicy-Insert-Ssl-00016
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -606,8 +606,8 @@ ProxyPolicy-Insert-Ssl-00016
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
@@ -620,7 +620,7 @@ ProxyPolicy-Insert-Ssl-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00017
|
||||
[Tags] selfserver ssl Insert ip+set-cookie右匹配+url
|
||||
[Tags] selfserver ip+set-cookie右匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -633,7 +633,7 @@ ProxyPolicy-Insert-Ssl-00017
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -659,7 +659,7 @@ ProxyPolicy-Insert-Ssl-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00018
|
||||
[Tags] selfserver ssl Insert ip+set-cookie字串匹配+url
|
||||
[Tags] selfserver ip+set-cookie字串匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -672,7 +672,7 @@ ProxyPolicy-Insert-Ssl-00018
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -698,7 +698,7 @@ ProxyPolicy-Insert-Ssl-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00019
|
||||
[Tags] selfserver ssl Insert ip+set-cookie完整匹配+url
|
||||
[Tags] selfserver ip+set-cookie完整匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -711,7 +711,7 @@ ProxyPolicy-Insert-Ssl-00019
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -724,7 +724,7 @@ ProxyPolicy-Insert-Ssl-00019
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat
|
||||
... ELSE set variable curl -kv \ -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action
|
||||
... ELSE set variable curl -kv \ -H "Content-Type:application/x-www-form-urlencoded" \ POST -d "reqBody=test&setCookie=12345678&resBody=Response Body" https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
@@ -737,7 +737,7 @@ ProxyPolicy-Insert-Ssl-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00020
|
||||
[Tags] selfserver ssl Insert ip+set-cookie左匹配+url
|
||||
[Tags] selfserver ip+set-cookie左匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -750,7 +750,7 @@ ProxyPolicy-Insert-Ssl-00020
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -776,7 +776,7 @@ ProxyPolicy-Insert-Ssl-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Insert-Ssl-00021
|
||||
[Tags] selfserver 最大组合 ssl Insert
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -800,7 +800,7 @@ ProxyPolicy-Insert-Ssl-00021
|
||||
Comment 创建insert文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -813,7 +813,7 @@ ProxyPolicy-Insert-Ssl-00021
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-SSL-00023.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://open.node.com/action
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" \ POST -d "reqBody=test&setCookie=12345678&resBody=Response Body" -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
@@ -824,3 +824,59 @@ ProxyPolicy-Insert-Ssl-00021
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Insert-Ssl-00022
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${object_rq_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_rq_Id}
|
||||
Comment 创建insert文件
|
||||
${response} CreatePolicyFile2 ${url} ${path}/insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Insert-SSL-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"insert","insert_profile":${profiledId},"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Insert-SSL-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"insert","insert_profile":${profiledId},"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_rq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0008.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' \ https://open.node.com
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List type="text/javascript" class="RQ_SCRIPT">alert("执行javascript!") X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -14,7 +14,7 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Monitor-Http-00001
|
||||
[Tags] selfserver ip http monitor
|
||||
[Tags] selfserver ip
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -46,7 +46,7 @@ ProxyPolicy-Monitor-Http-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00002
|
||||
[Tags] selfserver ip+fqdn完整匹配 http monitor
|
||||
[Tags] selfserver ip+fqdn完整匹配
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -78,7 +78,7 @@ ProxyPolicy-Monitor-Http-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00003
|
||||
[Tags] selfserver ip+cat右匹配 http monitor
|
||||
[Tags] selfserver ip+cat右匹配
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -110,7 +110,7 @@ ProxyPolicy-Monitor-Http-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00004
|
||||
[Tags] selfserver http monitor ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -142,7 +142,7 @@ ProxyPolicy-Monitor-Http-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00005
|
||||
[Tags] selfserver http monitor ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -174,9 +174,9 @@ ProxyPolicy-Monitor-Http-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00006
|
||||
[Tags] selfserver http monitor ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/nationalbank/nationalbank.html
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/tengrinews/tengrinews.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
@@ -206,7 +206,7 @@ ProxyPolicy-Monitor-Http-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00007
|
||||
[Tags] selfserver http monitor ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -238,7 +238,7 @@ ProxyPolicy-Monitor-Http-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00008
|
||||
[Tags] selfserver http monitor ip+请求头右匹配
|
||||
[Tags] selfserver ip+请求头右匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -270,7 +270,7 @@ ProxyPolicy-Monitor-Http-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00009
|
||||
[Tags] selfserver http monitor ip+请求头字串匹配
|
||||
[Tags] selfserver ip+请求头字串匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -302,7 +302,7 @@ ProxyPolicy-Monitor-Http-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00010
|
||||
[Tags] selfserver http monitor ip+请求头完整匹配
|
||||
[Tags] selfserver ip+请求头完整匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -334,7 +334,7 @@ ProxyPolicy-Monitor-Http-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00011
|
||||
[Tags] selfserver http monitor ip+请求头左匹配
|
||||
[Tags] selfserver ip+请求头左匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -366,7 +366,7 @@ ProxyPolicy-Monitor-Http-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00012
|
||||
[Tags] selfserver http monitor ip+cookie字串匹配
|
||||
[Tags] selfserver ip+cookie字串匹配
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -398,7 +398,7 @@ ProxyPolicy-Monitor-Http-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00013
|
||||
[Tags] selfserver http monitor ip+应答头右匹配
|
||||
[Tags] selfserver ip+应答头右匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -430,7 +430,7 @@ ProxyPolicy-Monitor-Http-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00014
|
||||
[Tags] selfserver http monitor ip+应答头字串匹配
|
||||
[Tags] selfserver ip+应答头字串匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -462,7 +462,7 @@ ProxyPolicy-Monitor-Http-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00015
|
||||
[Tags] selfserver http monitor ip+应答头完整匹配
|
||||
[Tags] selfserver ip+应答头完整匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -494,7 +494,7 @@ ProxyPolicy-Monitor-Http-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00016
|
||||
[Tags] selfserver http monitor ip+应答头左匹配
|
||||
[Tags] selfserver ip+应答头左匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -526,7 +526,7 @@ ProxyPolicy-Monitor-Http-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00017
|
||||
[Tags] selfserver http monitor ip+set-cookie右匹配
|
||||
[Tags] selfserver ip+set-cookie右匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -558,7 +558,7 @@ ProxyPolicy-Monitor-Http-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00018
|
||||
[Tags] selfserver http monitor ip+set-cookie字串匹配
|
||||
[Tags] selfserver ip+set-cookie字串匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -590,7 +590,7 @@ ProxyPolicy-Monitor-Http-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00019
|
||||
[Tags] selfserver http monitor ip+set-cookie完整匹配
|
||||
[Tags] selfserver ip+set-cookie完整匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -622,7 +622,7 @@ ProxyPolicy-Monitor-Http-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00020
|
||||
[Tags] selfserver http monitor ip+set-cookie左匹配
|
||||
[Tags] selfserver ip+set-cookie左匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -654,7 +654,7 @@ ProxyPolicy-Monitor-Http-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00021
|
||||
[Tags] selfserver http monitor ip+请求体字串匹配
|
||||
[Tags] selfserver ip+请求体字串匹配
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -666,7 +666,7 @@ ProxyPolicy-Monitor-Http-00021
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00021 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
@@ -686,7 +686,7 @@ ProxyPolicy-Monitor-Http-00021
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00022
|
||||
[Tags] selfserver http monitor ip+应答体字串匹配
|
||||
[Tags] selfserver ip+应答体字串匹配
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response Body
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -718,7 +718,7 @@ ProxyPolicy-Monitor-Http-00022
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00023
|
||||
[Tags] selfserver 最大组合 http monitor
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -764,3 +764,179 @@ ProxyPolicy-Monitor-Http-00023
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Monitor-Http-00024
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${object_rq_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_rq_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00024 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"method":"monitor","protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0001.bat
|
||||
... ELSE set variable curl http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 酒店式公寓
|
||||
... ELSE Create List 酒店式公寓
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00024 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"method":"monitor","protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_rq_Id}|TSG_FIELD_HTTP_REQ_HDR policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0008.bat
|
||||
... ELSE set variable curl \ --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 发送POST请求
|
||||
... ELSE Create List 发送POST请求
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Monitor-Http-00025
|
||||
[Tags] selfserver ip+请求体and关系
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ctes&t123
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00025 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List jwctest
|
||||
... ELSE Create List jwctest
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00026
|
||||
[Tags] selfserver ip+请求体或更新
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test,qazx
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00026 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"method":"monitor","protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List jwctest
|
||||
... ELSE Create List jwctest
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00027
|
||||
[Tags] selfserver ip+应答体and关系
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response& Body
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00027 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"method":"monitor","protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Response Body
|
||||
... ELSE Create List Response Body
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Monitor-Http-00028
|
||||
[Tags] selfserver ip+应答体或关系
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response,你好明天
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Monitor-HTTP-00028 policyType=pxy_manipulation policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"method":"monitor","protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Response Body
|
||||
... ELSE Create List Response Body
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Redirect-Http-00001
|
||||
[Tags] selfserver ip http redirect
|
||||
[Tags] selfserver ip+url
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -46,7 +46,7 @@ ProxyPolicy-Redirect-Http-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00002
|
||||
[Tags] selfserver ip+fqdn完整匹配 http redirect
|
||||
[Tags] selfserver ip+fqdn完整匹配+url
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -82,7 +82,7 @@ ProxyPolicy-Redirect-Http-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00003
|
||||
[Tags] selfserver ip+cat右匹配 http redirect
|
||||
[Tags] selfserver ip+cat右匹配+url
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -118,7 +118,7 @@ ProxyPolicy-Redirect-Http-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00004
|
||||
[Tags] selfserver http redirect ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -150,7 +150,7 @@ ProxyPolicy-Redirect-Http-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00005
|
||||
[Tags] selfserver http redirect ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -182,7 +182,7 @@ ProxyPolicy-Redirect-Http-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00006
|
||||
[Tags] selfserver http redirect ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/nationalbank/nationalbank.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -214,7 +214,7 @@ ProxyPolicy-Redirect-Http-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00007
|
||||
[Tags] selfserver http redirect ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -246,7 +246,7 @@ ProxyPolicy-Redirect-Http-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00008
|
||||
[Tags] selfserver http redirect ip+请求头右匹配
|
||||
[Tags] selfserver ip+请求头右匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -282,7 +282,7 @@ ProxyPolicy-Redirect-Http-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00009
|
||||
[Tags] selfserver http redirect ip+请求头字串匹配
|
||||
[Tags] selfserver ip+请求头字串匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -318,7 +318,7 @@ ProxyPolicy-Redirect-Http-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00010
|
||||
[Tags] selfserver http redirect ip+请求头完整匹配
|
||||
[Tags] selfserver ip+请求头完整匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -354,7 +354,7 @@ ProxyPolicy-Redirect-Http-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00011
|
||||
[Tags] selfserver http redirect ip+请求头左匹配
|
||||
[Tags] selfserver ip+请求头左匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -390,7 +390,7 @@ ProxyPolicy-Redirect-Http-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00012
|
||||
[Tags] selfserver http redirect ip+cookie字串匹配
|
||||
[Tags] selfserver ip+cookie字串匹配+url
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -426,7 +426,7 @@ ProxyPolicy-Redirect-Http-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00013
|
||||
[Tags] selfserver http redirect ip+应答头右匹配
|
||||
[Tags] selfserver ip+应答头右匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -462,7 +462,7 @@ ProxyPolicy-Redirect-Http-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00014
|
||||
[Tags] selfserver http redirect ip+应答头字串匹配
|
||||
[Tags] selfserver ip+应答头字串匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -498,7 +498,7 @@ ProxyPolicy-Redirect-Http-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00015
|
||||
[Tags] selfserver http redirect ip+应答头完整匹配
|
||||
[Tags] selfserver ip+应答头完整匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -534,7 +534,7 @@ ProxyPolicy-Redirect-Http-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00016
|
||||
[Tags] selfserver http redirect ip+应答头左匹配
|
||||
[Tags] selfserver ip+应答头左匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -570,7 +570,7 @@ ProxyPolicy-Redirect-Http-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00017
|
||||
[Tags] selfserver http redirect ip+set-cookie右匹配
|
||||
[Tags] selfserver ip+set-cookie右匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -606,7 +606,7 @@ ProxyPolicy-Redirect-Http-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00018
|
||||
[Tags] selfserver http redirect ip+set-cookie字串匹配
|
||||
[Tags] selfserver ip+set-cookie字串匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -642,7 +642,7 @@ ProxyPolicy-Redirect-Http-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00019
|
||||
[Tags] selfserver http redirect ip+set-cookie完整匹配
|
||||
[Tags] selfserver ip+set-cookie完整匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -678,7 +678,7 @@ ProxyPolicy-Redirect-Http-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00020
|
||||
[Tags] selfserver http redirect ip+set-cookie左匹配
|
||||
[Tags] selfserver ip+set-cookie左匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -714,7 +714,7 @@ ProxyPolicy-Redirect-Http-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00021
|
||||
[Tags] selfserver http redirect ip+请求体字串匹配
|
||||
[Tags] selfserver ip+请求体字串匹配+url
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -750,7 +750,7 @@ ProxyPolicy-Redirect-Http-00021
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00022
|
||||
[Tags] selfserver 最大组合 http redirect
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -800,3 +800,123 @@ ProxyPolicy-Redirect-Http-00022
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Redirect-Http-00023
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type
|
||||
${rescode} ${object_yd_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_yd_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00023 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.ziroom.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv \ http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.ziroom.com/ 301 X-TG-Construct-By
|
||||
... ELSE Create List http://www.ziroom.com/ 301 X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00023 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.icbc.com.cn/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL,${object_yd_Id}|TSG_FIELD_HTTP_RES_HDR policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv \ http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.icbc.com.cn/ 301 X-TG-Construct-By
|
||||
... ELSE Create List http://www.icbc.com.cn/ 301 X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Redirect-Http-00024
|
||||
[Tags] selfserver ip+请求体and关系+url
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=jwcte&st12
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00021 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.cmbchina.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.cmbchina.com/ 301 X-TG-Construct-By
|
||||
... ELSE Create List http://www.cmbchina.com/ 301 X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Http-00025
|
||||
[Tags] selfserver ip+请求体或关系+url
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test,yyyyy
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-HTTP-00021 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.cmbchina.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.cmbchina.com/ 301 X-TG-Construct-By
|
||||
... ELSE Create List http://www.cmbchina.com/ 301 X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -14,13 +14,13 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Redirect-Ssl-00001
|
||||
[Tags] selfserver ip ssl redirect
|
||||
[Tags] selfserver ip+url
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -46,7 +46,7 @@ ProxyPolicy-Redirect-Ssl-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00002
|
||||
[Tags] selfserver ip+fqdn完整匹配 ssl redirect
|
||||
[Tags] selfserver ip+fqdn完整匹配+url
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -56,7 +56,7 @@ ProxyPolicy-Redirect-Ssl-00002
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -82,7 +82,7 @@ ProxyPolicy-Redirect-Ssl-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00003
|
||||
[Tags] selfserver ip+cat右匹配 ssl redirect
|
||||
[Tags] selfserver ip+cat右匹配+url
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -92,7 +92,7 @@ ProxyPolicy-Redirect-Ssl-00003
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -118,13 +118,13 @@ ProxyPolicy-Redirect-Ssl-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00004
|
||||
[Tags] selfserver ssl redirect ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -150,13 +150,13 @@ ProxyPolicy-Redirect-Ssl-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00005
|
||||
[Tags] selfserver ssl redirect ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -182,13 +182,13 @@ ProxyPolicy-Redirect-Ssl-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00006
|
||||
[Tags] selfserver ssl redirect ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/bytedance/bytedance.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -214,13 +214,13 @@ ProxyPolicy-Redirect-Ssl-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00007
|
||||
[Tags] selfserver ssl redirect ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -246,7 +246,7 @@ ProxyPolicy-Redirect-Ssl-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00008
|
||||
[Tags] selfserver ssl redirect ip+请求头右匹配
|
||||
[Tags] selfserver ip+请求头右匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -256,7 +256,7 @@ ProxyPolicy-Redirect-Ssl-00008
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -282,7 +282,7 @@ ProxyPolicy-Redirect-Ssl-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00009
|
||||
[Tags] selfserver ssl redirect ip+请求头字串匹配
|
||||
[Tags] selfserver ip+请求头字串匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -292,7 +292,7 @@ ProxyPolicy-Redirect-Ssl-00009
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -318,7 +318,7 @@ ProxyPolicy-Redirect-Ssl-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00010
|
||||
[Tags] selfserver ssl redirect ip+请求头完整匹配
|
||||
[Tags] selfserver ip+请求头完整匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -328,7 +328,7 @@ ProxyPolicy-Redirect-Ssl-00010
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -354,7 +354,7 @@ ProxyPolicy-Redirect-Ssl-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00011
|
||||
[Tags] selfserver ssl redirect ip+请求头左匹配
|
||||
[Tags] selfserver ip+请求头左匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -364,7 +364,7 @@ ProxyPolicy-Redirect-Ssl-00011
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -390,7 +390,7 @@ ProxyPolicy-Redirect-Ssl-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00012
|
||||
[Tags] selfserver ssl redirect ip+cookie字串匹配
|
||||
[Tags] selfserver ip+cookie字串匹配+url
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -400,7 +400,7 @@ ProxyPolicy-Redirect-Ssl-00012
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -426,7 +426,7 @@ ProxyPolicy-Redirect-Ssl-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00013
|
||||
[Tags] selfserver ssl redirect ip+应答头右匹配
|
||||
[Tags] selfserver ip+应答头右匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -436,7 +436,7 @@ ProxyPolicy-Redirect-Ssl-00013
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -462,7 +462,7 @@ ProxyPolicy-Redirect-Ssl-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00014
|
||||
[Tags] selfserver ssl redirect ip+应答头字串匹配
|
||||
[Tags] selfserver ip+应答头字串匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -472,7 +472,7 @@ ProxyPolicy-Redirect-Ssl-00014
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -498,7 +498,7 @@ ProxyPolicy-Redirect-Ssl-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00015
|
||||
[Tags] selfserver ssl redirect ip+应答头完整匹配
|
||||
[Tags] selfserver ip+应答头完整匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -508,7 +508,7 @@ ProxyPolicy-Redirect-Ssl-00015
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -534,7 +534,7 @@ ProxyPolicy-Redirect-Ssl-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00016
|
||||
[Tags] selfserver ssl redirect ip+应答头左匹配
|
||||
[Tags] selfserver ip+应答头左匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -544,7 +544,7 @@ ProxyPolicy-Redirect-Ssl-00016
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -570,7 +570,7 @@ ProxyPolicy-Redirect-Ssl-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00017
|
||||
[Tags] selfserver ssl redirect ip+set-cookie右匹配
|
||||
[Tags] selfserver ip+set-cookie右匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -580,7 +580,7 @@ ProxyPolicy-Redirect-Ssl-00017
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -606,7 +606,7 @@ ProxyPolicy-Redirect-Ssl-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00018
|
||||
[Tags] selfserver ssl redirect ip+set-cookie字串匹配
|
||||
[Tags] selfserver ip+set-cookie字串匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -616,7 +616,7 @@ ProxyPolicy-Redirect-Ssl-00018
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -642,7 +642,7 @@ ProxyPolicy-Redirect-Ssl-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00019
|
||||
[Tags] selfserver ssl redirect ip+set-cookie完整匹配
|
||||
[Tags] selfserver ip+set-cookie完整匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -652,7 +652,7 @@ ProxyPolicy-Redirect-Ssl-00019
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -678,7 +678,7 @@ ProxyPolicy-Redirect-Ssl-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00020
|
||||
[Tags] selfserver ssl redirect ip+set-cookie左匹配
|
||||
[Tags] selfserver ip+set-cookie左匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -688,7 +688,7 @@ ProxyPolicy-Redirect-Ssl-00020
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -714,7 +714,7 @@ ProxyPolicy-Redirect-Ssl-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00021
|
||||
[Tags] selfserver ssl redirect ip+请求体字串匹配
|
||||
[Tags] selfserver ip+请求体字串匹配+url
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -724,7 +724,7 @@ ProxyPolicy-Redirect-Ssl-00021
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -750,7 +750,7 @@ ProxyPolicy-Redirect-Ssl-00021
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00022
|
||||
[Tags] selfserver 最大组合 ssl redirect
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -776,7 +776,7 @@ ProxyPolicy-Redirect-Ssl-00022
|
||||
${rescode} ${object_by_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_by_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -800,3 +800,127 @@ ProxyPolicy-Redirect-Ssl-00022
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Redirect-Ssl-00023
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_cat_Id}
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-SSL-00023 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.douyu.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0012.bat
|
||||
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'https://www.baidu.com/' \ https://open.node.com/test/nationalbank/nationalbank.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.douyu.com/ 301 X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List https://www.douyu.com/ 301 X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-SSL-00023 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.sojson.com","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_cat_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-SSL-00017.bat
|
||||
... ELSE set variable curl -kv https://open.node.com/
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List https://www.sojson.com 301 X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List https://www.sojson.com 301 X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Redirect-Ssl-00024
|
||||
[Tags] selfserver ip+请求体and关系+url
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=jwct&est123
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-SSL-00024 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.cmbchina.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-SSL-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.cmbchina.com/ 301 X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List http://www.cmbchina.com/ 301 X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Redirect-Ssl-00025
|
||||
[Tags] selfserver ip+请求体或关系+url
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=jwct,est123
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Redirect-SSL-00025 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.cmbchina.com/","code":301,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-SSL-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv https://open.node.com/action
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List http://www.cmbchina.com/ 301 X-TG-Construct-By Tango Secure Gateway CA
|
||||
... ELSE Create List http://www.cmbchina.com/ 301 X-TG-Construct-By Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -14,7 +14,7 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Replace-Http-00001
|
||||
[Tags] selfserver ip http replace
|
||||
[Tags] selfserver ip+url
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -46,7 +46,7 @@ ProxyPolicy-Replace-Http-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00002
|
||||
[Tags] selfserver ip+fqdn完整匹配 http replace
|
||||
[Tags] selfserver ip+fqdn完整匹配+url
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -82,7 +82,7 @@ ProxyPolicy-Replace-Http-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00003
|
||||
[Tags] selfserver ip+cat右匹配 http replace
|
||||
[Tags] selfserver ip+cat右匹配+url
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -118,7 +118,7 @@ ProxyPolicy-Replace-Http-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00004
|
||||
[Tags] selfserver http replace ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -150,7 +150,7 @@ ProxyPolicy-Replace-Http-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00005
|
||||
[Tags] selfserver http replace ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -182,7 +182,7 @@ ProxyPolicy-Replace-Http-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00006
|
||||
[Tags] selfserver http replace ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/nationalbank/nationalbank.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -214,7 +214,7 @@ ProxyPolicy-Replace-Http-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00007
|
||||
[Tags] selfserver http replace ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -246,7 +246,7 @@ ProxyPolicy-Replace-Http-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00008
|
||||
[Tags] selfserver http replace ip+请求头右匹配
|
||||
[Tags] selfserver ip+请求头右匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -282,7 +282,7 @@ ProxyPolicy-Replace-Http-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00009
|
||||
[Tags] selfserver http replace ip+请求头字串匹配
|
||||
[Tags] selfserver ip+请求头字串匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -318,7 +318,7 @@ ProxyPolicy-Replace-Http-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00010
|
||||
[Tags] selfserver http replace ip+请求头完整匹配
|
||||
[Tags] selfserver ip+请求头完整匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -354,7 +354,7 @@ ProxyPolicy-Replace-Http-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00011
|
||||
[Tags] selfserver http replace ip+请求头左匹配
|
||||
[Tags] selfserver ip+请求头左匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -390,7 +390,7 @@ ProxyPolicy-Replace-Http-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00012
|
||||
[Tags] selfserver http replace ip+cookie字串匹配
|
||||
[Tags] selfserver ip+cookie字串匹配+url
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -426,7 +426,7 @@ ProxyPolicy-Replace-Http-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00013
|
||||
[Tags] selfserver http replace ip+应答头右匹配
|
||||
[Tags] selfserver ip+应答头右匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -462,7 +462,7 @@ ProxyPolicy-Replace-Http-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00014
|
||||
[Tags] selfserver http replace ip+应答头字串匹配
|
||||
[Tags] selfserver ip+应答头字串匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -498,7 +498,7 @@ ProxyPolicy-Replace-Http-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00015
|
||||
[Tags] selfserver http replace ip+应答头完整匹配
|
||||
[Tags] selfserver ip+应答头完整匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=utf-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -534,7 +534,7 @@ ProxyPolicy-Replace-Http-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00016
|
||||
[Tags] selfserver http replace ip+应答头左匹配
|
||||
[Tags] selfserver ip+应答头左匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -570,7 +570,7 @@ ProxyPolicy-Replace-Http-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00017
|
||||
[Tags] selfserver http replace ip+set-cookie右匹配
|
||||
[Tags] selfserver ip+set-cookie右匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -606,7 +606,7 @@ ProxyPolicy-Replace-Http-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00018
|
||||
[Tags] selfserver http replace ip+set-cookie字串匹配
|
||||
[Tags] selfserver ip+set-cookie字串匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -642,7 +642,7 @@ ProxyPolicy-Replace-Http-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00019
|
||||
[Tags] selfserver http replace ip+set-cookie完整匹配
|
||||
[Tags] selfserver ip+set-cookie完整匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -678,7 +678,7 @@ ProxyPolicy-Replace-Http-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00020
|
||||
[Tags] selfserver http replace ip+set-cookie左匹配
|
||||
[Tags] selfserver ip+set-cookie左匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -714,7 +714,7 @@ ProxyPolicy-Replace-Http-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Http-00021
|
||||
[Tags] selfserver 最大组合 http replace
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -760,3 +760,57 @@ ProxyPolicy-Replace-Http-00021
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Replace-Http-00022
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${object_sk_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_sk_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Replace-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"replace","rules":[{"search_in":"http_resp_header","find":"html","replace_with":"json"}],"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0002.bat
|
||||
... ELSE set variable curl -kv \ http://open.node.com/test/youtube/youtube.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List text/json
|
||||
... ELSE Create List text/json
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Replace-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"replace","rules":[{"search_in":"http_resp_body","find":"发送POST请求","replace_with":"лайн"}],"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${object_url_Id}|TSG_FIELD_HTTP_URL,${object_sk_Id}|TSG_FIELD_HTTP_RES_HDR policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List лайн
|
||||
... ELSE Create List лайн
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -14,13 +14,13 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ProxyPolicy-Replace-Ssl-00001
|
||||
[Tags] selfserver ip ssl replace
|
||||
[Tags] selfserver ip+url
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -46,7 +46,7 @@ ProxyPolicy-Replace-Ssl-00001
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00002
|
||||
[Tags] selfserver ip+fqdn完整匹配 ssl replace
|
||||
[Tags] selfserver ip+fqdn完整匹配+url
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -56,7 +56,7 @@ ProxyPolicy-Replace-Ssl-00002
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -82,7 +82,7 @@ ProxyPolicy-Replace-Ssl-00002
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00003
|
||||
[Tags] selfserver ip+cat右匹配 ssl replace
|
||||
[Tags] selfserver ip+cat右匹配+url
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -92,7 +92,7 @@ ProxyPolicy-Replace-Ssl-00003
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -118,13 +118,13 @@ ProxyPolicy-Replace-Ssl-00003
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00004
|
||||
[Tags] selfserver ssl replace ip+url右匹配
|
||||
[Tags] selfserver ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*rutube.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -150,13 +150,13 @@ ProxyPolicy-Replace-Ssl-00004
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00005
|
||||
[Tags] selfserver ssl replace ip+url字串匹配
|
||||
[Tags] selfserver ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -182,13 +182,13 @@ ProxyPolicy-Replace-Ssl-00005
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00006
|
||||
[Tags] selfserver ssl replace ip+url完整匹配
|
||||
[Tags] selfserver ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/bytedance/bytedance.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -214,13 +214,13 @@ ProxyPolicy-Replace-Ssl-00006
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00007
|
||||
[Tags] selfserver ssl replace ip+url左匹配
|
||||
[Tags] selfserver ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -246,7 +246,7 @@ ProxyPolicy-Replace-Ssl-00007
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00008
|
||||
[Tags] selfserver ssl replace ip+请求头右匹配
|
||||
[Tags] selfserver ip+请求头右匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -256,7 +256,7 @@ ProxyPolicy-Replace-Ssl-00008
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -282,7 +282,7 @@ ProxyPolicy-Replace-Ssl-00008
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00009
|
||||
[Tags] selfserver ssl replace ip+请求头字串匹配
|
||||
[Tags] selfserver ip+请求头字串匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -292,7 +292,7 @@ ProxyPolicy-Replace-Ssl-00009
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -318,7 +318,7 @@ ProxyPolicy-Replace-Ssl-00009
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00010
|
||||
[Tags] selfserver ssl replace ip+请求头完整匹配
|
||||
[Tags] selfserver ip+请求头完整匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -328,7 +328,7 @@ ProxyPolicy-Replace-Ssl-00010
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -354,7 +354,7 @@ ProxyPolicy-Replace-Ssl-00010
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00011
|
||||
[Tags] selfserver ssl replace ip+请求头左匹配
|
||||
[Tags] selfserver ip+请求头左匹配+url
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -364,7 +364,7 @@ ProxyPolicy-Replace-Ssl-00011
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -390,7 +390,7 @@ ProxyPolicy-Replace-Ssl-00011
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00012
|
||||
[Tags] selfserver ssl replace ip+cookie字串匹配
|
||||
[Tags] selfserver ip+cookie字串匹配+url
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -400,7 +400,7 @@ ProxyPolicy-Replace-Ssl-00012
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -426,7 +426,7 @@ ProxyPolicy-Replace-Ssl-00012
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00013
|
||||
[Tags] selfserver ssl replace ip+应答头右匹配
|
||||
[Tags] selfserver ip+应答头右匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -436,7 +436,7 @@ ProxyPolicy-Replace-Ssl-00013
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -462,7 +462,7 @@ ProxyPolicy-Replace-Ssl-00013
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00014
|
||||
[Tags] selfserver ssl replace ip+应答头字串匹配
|
||||
[Tags] selfserver ip+应答头字串匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -472,7 +472,7 @@ ProxyPolicy-Replace-Ssl-00014
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -498,7 +498,7 @@ ProxyPolicy-Replace-Ssl-00014
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00015
|
||||
[Tags] selfserver ssl replace ip+应答头完整匹配
|
||||
[Tags] selfserver ip+应答头完整匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -508,7 +508,7 @@ ProxyPolicy-Replace-Ssl-00015
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -534,7 +534,7 @@ ProxyPolicy-Replace-Ssl-00015
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00016
|
||||
[Tags] selfserver ssl replace ip+应答头左匹配
|
||||
[Tags] selfserver ip+应答头左匹配+url
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -544,7 +544,7 @@ ProxyPolicy-Replace-Ssl-00016
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -570,7 +570,7 @@ ProxyPolicy-Replace-Ssl-00016
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00017
|
||||
[Tags] selfserver ssl replace ip+set-cookie右匹配
|
||||
[Tags] selfserver ip+set-cookie右匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -580,7 +580,7 @@ ProxyPolicy-Replace-Ssl-00017
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -606,7 +606,7 @@ ProxyPolicy-Replace-Ssl-00017
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00018
|
||||
[Tags] selfserver ssl replace ip+set-cookie字串匹配
|
||||
[Tags] selfserver ip+set-cookie字串匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -616,7 +616,7 @@ ProxyPolicy-Replace-Ssl-00018
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -642,7 +642,7 @@ ProxyPolicy-Replace-Ssl-00018
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00019
|
||||
[Tags] selfserver ssl replace ip+set-cookie完整匹配
|
||||
[Tags] selfserver ip+set-cookie完整匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -652,7 +652,7 @@ ProxyPolicy-Replace-Ssl-00019
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -678,7 +678,7 @@ ProxyPolicy-Replace-Ssl-00019
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00020
|
||||
[Tags] selfserver ssl replace ip+set-cookie左匹配
|
||||
[Tags] selfserver ip+set-cookie左匹配+url
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -688,7 +688,7 @@ ProxyPolicy-Replace-Ssl-00020
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -714,7 +714,7 @@ ProxyPolicy-Replace-Ssl-00020
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
ProxyPolicy-Replace-Ssl-00021
|
||||
[Tags] selfserver 最大组合 ssl replace
|
||||
[Tags] selfserver 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -735,7 +735,7 @@ ProxyPolicy-Replace-Ssl-00021
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type
|
||||
${rescode} ${object_re_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_re_Id}
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -759,3 +759,57 @@ ProxyPolicy-Replace-Ssl-00021
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
ProxyPolicy-Replace-Ssl-00022
|
||||
[Tags] selfserver 修改
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${object_re_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_re_Id}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${object_rq_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_rq_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Replace-SSL-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"replace","rules":[{"search_in":"http_resp_body","find":"видео","replace_with":"酒店式公寓"}],"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL,${object_re_Id}|TSG_FIELD_HTTP_RES_HDR
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List 酒店式公寓 Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List 酒店式公寓 Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=proxyPolicy-Replace-SSL-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"replace","rules":[{"search_in":"http_resp_body","find":"发送POST请求","replace_with":"你好明天"}],"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL,${object_rq_Id}|TSG_FIELD_HTTP_REQ_HDR policyId=${policyId3}
|
||||
${rescode} ${policyId3} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0008.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' \ https://open.node.com
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List 你好明天 Tango Secure Gateway CA X-TG-Construct-By
|
||||
... ELSE Create List 你好明天 Tango Secure Gateway CA X-TG-Construct-By
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
@@ -0,0 +1,35 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Allow-DNS-00001
|
||||
[Tags] selfserver monitor dns
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-DNS-00001 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol": "DNS"} isValid=${1} appObjectIdArray=4
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.yhd.com
|
||||
... ELSE set variable nslookup -d www.yhd.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List canonical name = www.yhd.com
|
||||
... ELSE Create List canonical name = www.yhd.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} common_sled_ip 192.168.40.161
|
||||
@@ -0,0 +1,32 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Allow-Ftp-00001
|
||||
[Tags] selfserver monitor ftp
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-FTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol":"FTP"} isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_success
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} common_server_ip 192.168.100.5
|
||||
@@ -43,11 +43,11 @@ SecurityPolicy-Allow-Http-00002
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-HTTP-00002 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -72,11 +72,11 @@ SecurityPolicy-Allow-Http-00003
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-HTTP-00003 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -101,11 +101,11 @@ SecurityPolicy-Allow-Http-00004
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-HTTP-00003 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Library Custometest
|
||||
Resource ../../../../02-Keyword/tsg_common/StmpHandle.robot
|
||||
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Allow-Mail-00001
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-Mail-00001 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol":"MAIL"} isValid=${1} appObjectIdArray=5
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${Smtp服务器} Set Variable 192.168.100.5
|
||||
${Smtp服务器端口} Set Variable 25
|
||||
${邮箱账号} Set Variable jwctest@mail.tsgmail.com
|
||||
${邮箱密码} Set Variable jwctest
|
||||
${邮件主题} Set Variable 123test
|
||||
${发送者} Set Variable jwctest@mail.tsgmail.com
|
||||
${附件} Set Variable ["${mailpath}/朱明明测试文件.txt"]
|
||||
${接收者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${抄送者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${密送者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${邮件正文} Set Variable 朱明明content
|
||||
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
|
||||
Log ${发送邮件返回结果}
|
||||
should contain ${发送邮件返回结果} mail_success
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
@@ -43,11 +43,11 @@ SecurityPolicy-Allow-SSL-00002
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SSL-00002 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -72,11 +72,11 @@ SecurityPolicy-Allow-SSL-00003
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=allow effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
|
||||
@@ -14,7 +14,7 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Deny-DNS-00001
|
||||
[Tags] Selfserver Deny Dns Ip+Fqdn右匹配
|
||||
[Tags] selfserver dns deny ip+fqdn右匹配
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*yhd.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -26,7 +26,7 @@ SecurityPolicy-Deny-DNS-00001
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.yhd.com
|
||||
... ELSE set variable nslookup -d www.yhd.com
|
||||
... ELSE set variable nslookup \ www.yhd.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 超时
|
||||
... ELSE Create List canonical name = www.yhd.com
|
||||
${starttime} Get Time
|
||||
@@ -39,19 +39,19 @@ SecurityPolicy-Deny-DNS-00001
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname yhd.com
|
||||
|
||||
SecurityPolicy-Deny-DNS-00002
|
||||
[Tags] Selfserver Deny Dns Ip+Cat完整匹配
|
||||
Comment 创建fqdn
|
||||
[Tags] selfserver Ip+cat完整匹配 dns deny
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.toutiao.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_cat_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00001 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"DNS","method":"redirect","resolution":[{"qtype":"A","answer":[{"atype":"CNAME","value":"www.vip.com","ttl":{"min":300,"max":300}}]}]} isValid=${1} appObjectIdArray=4
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00002 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"DNS","method":"redirect","resolution":[{"qtype":"A","answer":[{"atype":"CNAME","value":"www.vip.com","ttl":{"min":300,"max":300}}]}]} isValid=${1} appObjectIdArray=4 referenceObject=${object_cat_Id}|TSG_FIELD_DNS_QNAME
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.toutiao.com
|
||||
... ELSE set variable nslookup \ www.toutiao.com
|
||||
... ELSE set variable nslookup -debug -query=A \ www.toutiao.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List canonical name = www.vip.com
|
||||
... ELSE Create List canonical name = www.vip.com
|
||||
${starttime} Get Time
|
||||
@@ -62,3 +62,204 @@ SecurityPolicy-Deny-DNS-00002
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname toutiao.com
|
||||
|
||||
SecurityPolicy-Deny-DNS-00003
|
||||
[Tags] dns deny selfserver 多Ip+fqdn网站匹配
|
||||
Comment 创建第二个源IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.50.18|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.douban.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00003 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"DNS","method":"redirect","resolution":[{"qtype":"AAAA","answer":[{"atype":"CNAME","value":"www.taobao.com","ttl":{"min":350,"max":350}}]}]} isValid=${1} appObjectIdArray=4 referenceObject=${object_fqdn_Id}|TSG_FIELD_DNS_QNAME,${objectId}|TSG_SECURITY_SOURCE_ADDR
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.douban.com
|
||||
... ELSE set variable nslookup -debug -query=AAAA \ www.douban.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List canonical name = www.taobao.com
|
||||
... ELSE Create List canonical name = www.taobao.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname www.douban.com
|
||||
|
||||
SecurityPolicy-Deny-DNS-00004
|
||||
[Tags] selfserver Ip+cat完整匹配 dns deny
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$www.mgtv.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_cat_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00004 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"DNS","method":"redirect","resolution":[{"qtype":"A","answer":[{"atype":"A","value":"192.168.50.18","ttl":{"min":400,"max":400}}]}]} isValid=${1} appObjectIdArray=4 referenceObject=${object_cat_Id}|TSG_FIELD_DNS_QNAME
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.mgtv.com
|
||||
... ELSE set variable nslookup -debug -query=A \ www.mgtv.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 192.168.50.18
|
||||
... ELSE Create List 192.168.50.18
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname www.mgtv.com
|
||||
|
||||
SecurityPolicy-Deny-DNS-00005
|
||||
[Tags] selfserver dns deny ip+fqdn右匹配
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*suning.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00005 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"DNS","method":"redirect","resolution":[{"qtype":"AAAA","answer":[{"atype":"AAAA","value":"fc00::2:66","ttl":{"min":500,"max":500}}]}]} isValid=${1} appObjectIdArray=4 referenceObject=${object_fqdn_Id}|TSG_FIELD_DNS_QNAME
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.suning.com
|
||||
... ELSE set variable nslookup -debug -query=AAAA \ www.suning.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List fc00::2:66
|
||||
... ELSE Create List fc00::2:66
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname www.suning.com
|
||||
|
||||
SecurityPolicy-Deny-DNS-00006
|
||||
[Tags] selfserver dns deny Ip+fqdn+cat
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*suning.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_cat_Id}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.mgtv.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00006 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"DNS","method":"redirect","resolution":[{"qtype":"AAAA","answer":[{"atype":"AAAA","value":"fc00::2:66","ttl":{"min":500,"max":500}}]}]} isValid=${1} appObjectIdArray=4 referenceObject=${object_fqdn_Id}|TSG_FIELD_DNS_QNAME
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.mgtv.com
|
||||
... ELSE set variable nslookup -debug -query=AAAA \ www.mgtv.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List fc00::2:66
|
||||
... ELSE Create List fc00::2:66
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname www.mgtv.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00006 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"DNS","method":"redirect","resolution":[{"qtype":"A","answer":[{"atype":"A","value":"192.168.50.18","ttl":{"min":400,"max":400}}]}]} referenceObject=${object_cat_Id}|TSG_FIELD_DNS_QNAME isValid=${1} appObjectIdArray=4 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.suning.com
|
||||
... ELSE set variable nslookup -debug -query=A \ www.suning.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 192.168.50.18
|
||||
... ELSE Create List 192.168.50.18
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname www.suning.com
|
||||
|
||||
SecurityPolicy-Deny-DNS-00007
|
||||
[Tags] selfserver dns deny ip+fqdn右匹配
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*suning.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00007 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"DNS","method":"redirect","resolution":[{"answer":[{"atype":"AAAA","value":"fc00::2:66","ttl":{"min":300,"max":300}},{"atype":"CNAME","value":"www.zhihu.com","ttl":{"min":300,"max":300}}],"qtype":"AAAA"}]} isValid=${1} appObjectIdArray=4 referenceObject=${object_fqdn_Id}|TSG_FIELD_DNS_QNAME
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.suning.com
|
||||
... ELSE set variable nslookup -debug -query=AAAA www.suning.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List fc00::2:66 www.zhihu.com ttl = 300
|
||||
... ELSE Create List fc00::2:66 www.zhihu.com ttl = 300
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname www.suning.com
|
||||
|
||||
SecurityPolicy-Deny-DNS-00008
|
||||
[Tags] selfserver dns deny ip+fqdn完整匹配
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.zealer.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00008 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"DNS","method":"redirect","resolution":[{"answer":[{"atype":"A","value":"192.168.50.18","ttl":{"min":500,"max":500}},{"atype":"CNAME","value":"www.bilibili.com","ttl":{"min":500,"max":500}}],"qtype":"A"}]} isValid=${1} appObjectIdArray=4 referenceObject=${object_fqdn_Id}|TSG_FIELD_DNS_QNAME
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.zealer.com
|
||||
... ELSE set variable nslookup -debug -query=A \ www.zealer.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 192.168.50.18 www.bilibili.com ttl = 500
|
||||
... ELSE Create List 192.168.50.18 www.bilibili.com ttl = 500
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname zealer.com
|
||||
|
||||
SecurityPolicy-Deny-DNS-00009
|
||||
[Tags] selfserver dns deny ip+fqdn完整匹配
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$www.douyu.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00009 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"DNS","method":"redirect","resolution":[{"answer":[{"atype":"AAAA","value":"fc00::2:66","ttl":{"min":500,"max":500}},{"atype":"CNAME","value":"www.booking.com","ttl":{"min":500,"max":500}}],"qtype":"AAAA"},{"qtype":"A","answer":[{"atype":"CNAME","value":"www.tuniu.com","ttl":{"min":500,"max":500}},{"atype":"A","value":"192.168.50.18","ttl":{"min":500,"max":500}}]}]} isValid=${1} appObjectIdArray=4 referenceObject=${object_fqdn_Id}|TSG_FIELD_DNS_QNAME
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.douyu.com
|
||||
... ELSE set variable nslookup -debug -query=A www.douyu.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 192.168.50.18 www.tuniu.com ttl = 500 www.booking.com fc00::2:66
|
||||
... ELSE Create List 192.168.50.18 www.tuniu.com ttl = 500
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable nslookup -d www.douyu.com
|
||||
... ELSE set variable nslookup -debug -query=AAAA www.douyu.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 192.168.50.18 www.tuniu.com ttl = 500 www.booking.com fc00::2:66
|
||||
... ELSE Create List ttl = 500 www.booking.com fc00::2:66
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} dns_qname www.douyu.com
|
||||
|
||||
@@ -14,7 +14,7 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Deny-Ftp-00001
|
||||
[Tags] Selfserver Deny Ftp Account子串匹配
|
||||
[Tags] selfserver deny ftp account子串匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=ftp_user
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -36,7 +36,7 @@ SecurityPolicy-Deny-Ftp-00001
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ftp_user
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00002
|
||||
[Tags] Selfserver Deny Ftp Account右匹配
|
||||
[Tags] selfserver deny ftp account右匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=*user
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -58,7 +58,7 @@ SecurityPolicy-Deny-Ftp-00002
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ftp_user
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00003
|
||||
[Tags] Selfserver Deny Ftp Account完整匹配
|
||||
[Tags] selfserver deny ftp account完整匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=$ftp_user
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -80,7 +80,7 @@ SecurityPolicy-Deny-Ftp-00003
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ftp_user
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00004
|
||||
[Tags] Selfserver Deny Ftp Account左匹配
|
||||
[Tags] selfserver deny ftp account左匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=ftp_u*
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -102,23 +102,244 @@ SecurityPolicy-Deny-Ftp-00004
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ftp_user
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00005
|
||||
[Tags] Selfserver Deny Ftp Account子串匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=ftp_user
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_Account_Id}
|
||||
[Tags] selfserver deny ftp url子串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=168.100
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00005 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_Account_Id}|TSG_FIELD_FTP_ACCOUNT isValid=${1} appObjectIdArray=6
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00005 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_url_Id}|TSG_FIELD_FTP_URI isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_down ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 435814 zmmtext123.txt
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_url ftp://192.168.100.5/test.txt
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00006
|
||||
[Tags] selfserver deny ftp url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*t.txt
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00006 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_url_Id}|TSG_FIELD_FTP_URI isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_url ftp://192.168.100.5/test.txt
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00007
|
||||
[Tags] selfserver deny ftp url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$ftp://192.168.100.5/test.txt
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00007 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_url_Id}|TSG_FIELD_FTP_URI isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_url ftp://192.168.100.5/test.txt
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00008
|
||||
[Tags] selfserver deny ftp url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=ftp://192.168.100*
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00008 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_url_Id}|TSG_FIELD_FTP_URI isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_url ftp://192.168.100.5/test.txt
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00009
|
||||
[Tags] selfserver deny ftp content子串匹配
|
||||
Comment 创建content
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=中文test
|
||||
${rescode} ${object_content_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_content_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00009 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_content_Id}|TSG_FIELD_FTP_CONTENT isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_url ftp://192.168.100.5/test.txt
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00010
|
||||
[Tags] selfserver deny ftp content右匹配
|
||||
Comment 创建content
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=*test.txt
|
||||
${rescode} ${object_content_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_content_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00010 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_content_Id}|TSG_FIELD_FTP_CONTENT isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_url ftp://192.168.100.5/test.txt
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00011
|
||||
[Tags] selfserver deny ftp content完整匹配
|
||||
Comment 创建content
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=$中文test.txt
|
||||
${rescode} ${object_content_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_content_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00011 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_content_Id}|TSG_FIELD_FTP_CONTENT isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_url ftp://192.168.100.5/test.txt
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00012
|
||||
[Tags] selfserver deny ftp content左匹配
|
||||
Comment 创建content
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=中文te*
|
||||
${rescode} ${object_content_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_content_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00012 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_content_Id}|TSG_FIELD_FTP_CONTENT isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_url ftp://192.168.100.5/test.txt
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00013
|
||||
[Tags] selfserver deny ftp 多ip+修改
|
||||
Comment 创建第二个源IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.50.10|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=*user
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_Account_Id}
|
||||
Comment 创建content
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=中文te*
|
||||
${rescode} ${object_content_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_content_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00013 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_content_Id}|TSG_FIELD_FTP_CONTENT,${objectId}|TSG_SECURITY_SOURCE_ADDR isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_url ftp://192.168.100.5/test.txt
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00013 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_SOURCE_ADDR,${object_Account_Id}|TSG_FIELD_FTP_ACCOUNT isValid=${1} appObjectIdArray=6 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ftp_user
|
||||
|
||||
SecurityPolicy-Deny-Ftp-00014
|
||||
[Tags] selfserver deny ftp 最大组合
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=168.100
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_url_Id}
|
||||
Comment 创建content
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=中文test
|
||||
${rescode} ${object_content_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_content_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-FTP-00014 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"FTP","method":"drop"} referenceObject=${object_content_Id}|TSG_FIELD_FTP_CONTENT,${object_url_Id}|TSG_FIELD_FTP_URI isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_url ftp://192.168.100.5/test.txt
|
||||
|
||||
@@ -16,7 +16,7 @@ ${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Deny-Http-00001
|
||||
[Tags] Selfserver Ip Deny Http
|
||||
[Tags] deny http p selfserver
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -30,7 +30,7 @@ SecurityPolicy-Deny-Http-00001
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0001.bat
|
||||
... ELSE set variable curl http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Message content over the limit has been removed
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -38,10 +38,10 @@ SecurityPolicy-Deny-Http-00001
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} common_server_ip 192.168.100.5
|
||||
|
||||
SecurityPolicy-Deny-Http-00002
|
||||
[Tags] Selfserver Deny Http Ip+Fqdn右匹配
|
||||
[Tags] selfserver deny http ip+fqdn右匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -59,7 +59,7 @@ SecurityPolicy-Deny-Http-00002
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat
|
||||
... ELSE set variable curl http://open.node.com/test/youtube/youtube.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Message content over the limit has been removed
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -70,7 +70,7 @@ SecurityPolicy-Deny-Http-00002
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00003
|
||||
[Tags] Selfserver Deny Http Ip+Cat完整匹配
|
||||
[Tags] selfserver deny http ip+cat完整匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -99,7 +99,7 @@ SecurityPolicy-Deny-Http-00003
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00004
|
||||
[Tags] Selfserver Deny Http Ip+Url字串匹配
|
||||
[Tags] selfserver deny http ip+url字串匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -128,7 +128,7 @@ SecurityPolicy-Deny-Http-00004
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00005
|
||||
[Tags] Selfserver Deny Http Ip+Url右匹配
|
||||
[Tags] selfserver deny http ip+url右匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -157,7 +157,7 @@ SecurityPolicy-Deny-Http-00005
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00006
|
||||
[Tags] Selfserver Deny Http Ip+Url完整匹配
|
||||
[Tags] selfserver deny http ip+url完整匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -186,7 +186,7 @@ SecurityPolicy-Deny-Http-00006
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00007
|
||||
[Tags] Selfserver Deny Http Ip+Url左匹配
|
||||
[Tags] selfserver deny http ip+url左匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -215,7 +215,7 @@ SecurityPolicy-Deny-Http-00007
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00008
|
||||
[Tags] Selfserver Deny Ip+请求头字串匹配 Http
|
||||
[Tags] selfserver deny ip+请求头字串匹配 http
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -244,7 +244,7 @@ SecurityPolicy-Deny-Http-00008
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00009
|
||||
[Tags] Selfserver Deny Http Ip+请求头右匹配
|
||||
[Tags] selfserver deny http ip+请求头右匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -273,7 +273,7 @@ SecurityPolicy-Deny-Http-00009
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00010
|
||||
[Tags] Selfserver Deny Http Ip+请求头完整匹配
|
||||
[Tags] selfserver deny http ip+请求头完整匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -302,7 +302,7 @@ SecurityPolicy-Deny-Http-00010
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00011
|
||||
[Tags] Selfserver Deny Http Ip+请求头左匹配
|
||||
[Tags] selfserver deny http ip+请求头左匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -331,7 +331,7 @@ SecurityPolicy-Deny-Http-00011
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00012
|
||||
[Tags] Selfserver Http Ip+Cookie子串匹配 Deny
|
||||
[Tags] selfserver http ip+cookie子串匹配 deny
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -360,7 +360,7 @@ SecurityPolicy-Deny-Http-00012
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00013
|
||||
[Tags] Selfserver Deny Http Ip+应答头字串匹配
|
||||
[Tags] selfserver deny http ip+应答头字串匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -389,7 +389,7 @@ SecurityPolicy-Deny-Http-00013
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00014
|
||||
[Tags] Selfserver Deny Http Ip+应答头右匹配
|
||||
[Tags] selfserver deny http ip+应答头右匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -418,7 +418,7 @@ SecurityPolicy-Deny-Http-00014
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00015
|
||||
[Tags] Selfserver Deny Http Ip+应答头完整匹配
|
||||
[Tags] selfserver deny http ip+应答头完整匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -447,7 +447,7 @@ SecurityPolicy-Deny-Http-00015
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00016
|
||||
[Tags] Selfserver Deny Http Ip+应答头左匹配
|
||||
[Tags] selfserver deny http ip+应答头左匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -476,7 +476,7 @@ SecurityPolicy-Deny-Http-00016
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00017
|
||||
[Tags] Selfserver Deny Http Ip+Set-Cookie字串匹配
|
||||
[Tags] selfserver deny http ip+set-cookie字串匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -492,7 +492,7 @@ SecurityPolicy-Deny-Http-00017
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl \ http://open.node.com/
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
@@ -505,7 +505,7 @@ SecurityPolicy-Deny-Http-00017
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00018
|
||||
[Tags] Selfserver Deny Http Ip+Set-Cookie右匹配
|
||||
[Tags] selfserver deny http ip+set-cookie右匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -521,7 +521,7 @@ SecurityPolicy-Deny-Http-00018
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl \ http://open.node.com/
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
@@ -534,7 +534,7 @@ SecurityPolicy-Deny-Http-00018
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00019
|
||||
[Tags] Selfserver Deny Ip+Set-Cookie完整匹配 Http
|
||||
[Tags] selfserver deny ip+set-cookie完整匹配 http
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -550,7 +550,7 @@ SecurityPolicy-Deny-Http-00019
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl \ http://open.node.com/
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
@@ -563,7 +563,7 @@ SecurityPolicy-Deny-Http-00019
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00020
|
||||
[Tags] Selfserver Deny Ip+Set-Cookie左匹配 Http
|
||||
[Tags] selfserver deny ip+set-cookie左匹配 http
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -579,7 +579,7 @@ SecurityPolicy-Deny-Http-00020
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl \ http://open.node.com/
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
@@ -592,7 +592,7 @@ SecurityPolicy-Deny-Http-00020
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00021
|
||||
[Tags] Selfserver Deny Ip+请求体 Http
|
||||
[Tags] selfserver deny ip+请求体 http
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -621,7 +621,7 @@ SecurityPolicy-Deny-Http-00021
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00022
|
||||
[Tags] Selfserver Deny Http Ip+应答体
|
||||
[Tags] selfserver deny http ip+应答体
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -650,7 +650,7 @@ SecurityPolicy-Deny-Http-00022
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00023
|
||||
[Tags] Selfserver Deny Http 最大组合
|
||||
[Tags] selfserver deny http 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -660,11 +660,11 @@ SecurityPolicy-Deny-Http-00023
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node.com
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_uid|Cookie
|
||||
${rescode} ${object_CK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CK_Id}
|
||||
Comment 创建应答头
|
||||
@@ -672,19 +672,19 @@ SecurityPolicy-Deny-Http-00023
|
||||
${rescode} ${object_CT_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CT_Id}
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Ұлттық
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=новости
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00023 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_CK_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR,${object_RQ_Id} |TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00023 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"drop"} referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_CK_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR,${object_RQ_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0012.bat
|
||||
... ELSE set variable curl --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0023.bat
|
||||
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \http://open.node.com/test/tengrinews/tengrinews.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Message content over the limit has been removed
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -693,9 +693,8 @@ SecurityPolicy-Deny-Http-00023
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00024
|
||||
[Tags] selfserver deny Http IP+host block
|
||||
[Tags] selfserver deny http ip+host block
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -723,7 +722,7 @@ SecurityPolicy-Deny-Http-00024
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00025
|
||||
[Tags] selfserver deny Http IP+host alert
|
||||
[Tags] selfserver deny http ip+host alert
|
||||
Comment 创建第二个源IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.50.10|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -752,13 +751,13 @@ SecurityPolicy-Deny-Http-00025
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00026
|
||||
[Tags] selfserver deny Http IP+host alert
|
||||
[Tags] selfserver deny http ip+host alert
|
||||
Comment 创建第二个源IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.50.10|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
#创建引用文件
|
||||
@@ -784,7 +783,7 @@ SecurityPolicy-Deny-Http-00026
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00027
|
||||
[Tags] Selfserver Deny Http 最大组合
|
||||
[Tags] selfserver deny http 最大组合
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
@@ -818,7 +817,7 @@ SecurityPolicy-Deny-Http-00027
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Redirect-HTTP-00023.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Message content over the limit has been removed
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -847,7 +846,7 @@ SecurityPolicy-Deny-Http-00028
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat
|
||||
... ELSE set variable curl http://open.node.com/test/youtube/youtube.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Message content over the limit has been removed
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -872,7 +871,7 @@ SecurityPolicy-Deny-Http-00029
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat
|
||||
... ELSE set variable curl http://open.node.com/test/youtube/youtube.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Message content over the limit has been removed
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -880,7 +879,7 @@ SecurityPolicy-Deny-Http-00029
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} common_server_ip 192.168.100.5
|
||||
|
||||
SecurityPolicy-Deny-Http-00030
|
||||
[Tags] selfserver deny http 新增Filter条件 ip+fqdn
|
||||
@@ -901,7 +900,7 @@ SecurityPolicy-Deny-Http-00030
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat
|
||||
... ELSE set variable curl http://open.node.com/test/youtube/youtube.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Message content over the limit has been removed
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -917,7 +916,7 @@ SecurityPolicy-Deny-Http-00030
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Message content over the limit has been removed
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -925,3 +924,575 @@ SecurityPolicy-Deny-Http-00030
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00031
|
||||
[Tags] selfserver deny alert http ip+url+请求头字串匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=node
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${object_UA_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_UA_Id}
|
||||
#创建引用文件
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00031 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"block","code":404,"html_profile":${profiledId}} referenceObject=${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00031 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_UA_Id}|TSG_FIELD_HTTP_REQ_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0008.bat
|
||||
... ELSE set variable curl \ --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00032
|
||||
[Tags] selfserver deny alert http ip+url+请求头左匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=node
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${object_UA_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_UA_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00032 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"message":"Главная страница"} referenceObject=${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Главная страница
|
||||
... ELSE Create List Главная страница
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00032 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"message":"Главная страница"} referenceObject=${object_UA_Id}|TSG_FIELD_HTTP_REQ_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0008.bat
|
||||
... ELSE set variable curl \ --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Главная страница
|
||||
... ELSE Create List Главная страница
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00033
|
||||
[Tags] selfserver deny alert http ip+url+请求头右匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*nationalbank.html
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${object_UA_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_UA_Id}
|
||||
#创建引用文件
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404english.html resPages
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00033 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"block","code":403,"html_profile":${profiledId}} referenceObject=${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
|
||||
... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00033 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_UA_Id}|TSG_FIELD_HTTP_REQ_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0008.bat
|
||||
... ELSE set variable curl \ --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
|
||||
... ELSE Create List Sorry, the page you requested does not exist, has been deleted, or is temporarily unavailable
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00034
|
||||
[Tags] selfserver deny alert http ip+url+请求头完整匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${object_UA_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_UA_Id}
|
||||
#创建引用文件
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00034 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0001.bat
|
||||
... ELSE set variable curl http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00034 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_UA_Id}|TSG_FIELD_HTTP_REQ_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0008.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ curl \ http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00035
|
||||
[Tags] selfserver deny alert http ip+set-cookie+应答头字串匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=UTF-8|Content-Type
|
||||
${rescode} ${object_CT_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CT_Id}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
||||
#创建引用文件
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00035 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00035 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/proxyPolicy-Deny-HTTP-00017.bat
|
||||
... ELSE set variable curl http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00036
|
||||
[Tags] selfserver deny alert http ip+set-cookie+应答头左匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type
|
||||
${rescode} ${object_CT_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CT_Id}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=1234*|Set-Cookie
|
||||
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00036 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"message":"Главная страница"} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Главная страница
|
||||
... ELSE Create List Главная страница
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00036 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"message":"Главная страница"} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Главная страница
|
||||
... ELSE Create List Главная страница
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00037
|
||||
[Tags] selfserver deny alert http ip+set-cookie+应答头完整匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=UTF-8|Content-Type
|
||||
${rescode} ${object_CT_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CT_Id}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
||||
#创建引用文件
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00037 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0001.bat
|
||||
... ELSE set variable curl http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00037 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00038
|
||||
[Tags] selfserver deny alert http ip+set-cookie+应答头右匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*utf-8|Content-Type
|
||||
${rescode} ${object_CT_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CT_Id}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*5678|Set-Cookie
|
||||
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
||||
#创建引用文件
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00038 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/youtube/youtube.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00038 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00039
|
||||
[Tags] selfserver deny alert http ip+cookie+请求体+应答体
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${object_CK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CK_Id}
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Ұлттық
|
||||
${rescode} ${object_yq_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_yq_Id}
|
||||
#创建引用文件
|
||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
||||
${profiledId} Get From Dictionary ${response} profileId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00039 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_RQ_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00039 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"HTTP","method":"alert","code":200,"html_profile":${profiledId}} referenceObject=${object_CK_Id}|TSG_FIELD_HTTP_REQ_HDR,${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_yq_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0012.bat
|
||||
... ELSE set variable curl --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
SecurityPolicy-Deny-Http-00040
|
||||
[Tags] selfserver ip+请求体and关系
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ctes&t123
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00040 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_RQ_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00041
|
||||
[Tags] selfserver ip+请求体或关系
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test,qazx
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00041 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_RQ_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00042
|
||||
[Tags] selfserver ip+应答体and关系
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Ұлттық&жайлы
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00022 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_RQ_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-Http-00043
|
||||
[Tags] selfserver ip+应答体或关系
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Ұлттық,1234
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-HTTP-00022 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "HTTP","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_RQ_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -16,7 +16,7 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Deny-Mail-00001
|
||||
[Tags] Selfserver Subject右匹配 Mail Deny
|
||||
[Tags] selfserver subject右匹配 mail deny
|
||||
Comment 创建Subject
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=*test
|
||||
${rescode} ${object_Subject_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -50,7 +50,7 @@ SecurityPolicy-Deny-Mail-00001
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00002
|
||||
[Tags] Selfserver Subject完整匹配 Mail Deny
|
||||
[Tags] selfserver subject完整匹配 mail deny
|
||||
Comment 创建Subject
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=$你好明天
|
||||
${rescode} ${object_Subject_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -84,7 +84,7 @@ SecurityPolicy-Deny-Mail-00002
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00003
|
||||
[Tags] Selfserver Subject字串匹配 Mail Deny
|
||||
[Tags] selfserver subject字串匹配 mail deny
|
||||
Comment 创建Subject
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=стопо
|
||||
${rescode} ${object_Subject_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -118,7 +118,7 @@ SecurityPolicy-Deny-Mail-00003
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00004
|
||||
[Tags] Selfserver Subject左匹配 Mail Deny
|
||||
[Tags] selfserver subject左匹配 mail deny
|
||||
Comment 创建Subject
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=zxcv*
|
||||
${rescode} ${object_Subject_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -152,7 +152,7 @@ SecurityPolicy-Deny-Mail-00004
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00005
|
||||
[Tags] Selfserver Content字串匹配 Mail Deny
|
||||
[Tags] selfserver content字串匹配 mail deny
|
||||
Comment 创建Content
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=стопо
|
||||
${rescode} ${object_Content_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -186,7 +186,7 @@ SecurityPolicy-Deny-Mail-00005
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00006
|
||||
[Tags] Selfserver Deny ATT_CONT字串匹配 Mail
|
||||
[Tags] selfserver deny att_cont字串匹配 mail
|
||||
Comment 创建ATT_CONT
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=стопо
|
||||
${rescode} ${object_ATT_CONT_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -220,7 +220,7 @@ SecurityPolicy-Deny-Mail-00006
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00007
|
||||
[Tags] Selfserver Deny From右匹配 Mail
|
||||
[Tags] selfserver deny from右匹配 mail
|
||||
Comment 创建From
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=*il.com
|
||||
${rescode} ${object_From_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -254,7 +254,7 @@ SecurityPolicy-Deny-Mail-00007
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00008
|
||||
[Tags] Selfserver Deny From完整匹配 Mail
|
||||
[Tags] selfserver deny from完整匹配 mail
|
||||
Comment 创建From
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=$jwctest@mail.tsgmail.com
|
||||
${rescode} ${object_From_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -288,7 +288,7 @@ SecurityPolicy-Deny-Mail-00008
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00009
|
||||
[Tags] Selfserver Deny From字串匹配 Mail
|
||||
[Tags] selfserver deny from字串匹配 mail
|
||||
Comment 创建From
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=tsgmail
|
||||
${rescode} ${object_From_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -322,7 +322,7 @@ SecurityPolicy-Deny-Mail-00009
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00010
|
||||
[Tags] Selfserver Deny From左匹配 Mail
|
||||
[Tags] selfserver deny from左匹配 mail
|
||||
Comment 创建From
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=jwct*
|
||||
${rescode} ${object_From_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -356,7 +356,7 @@ SecurityPolicy-Deny-Mail-00010
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00011
|
||||
[Tags] Selfserver Deny To右匹配 Mail
|
||||
[Tags] selfserver deny to右匹配 mail
|
||||
Comment 创建To
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=*il.com
|
||||
${rescode} ${object_To_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -390,7 +390,7 @@ SecurityPolicy-Deny-Mail-00011
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00012
|
||||
[Tags] Selfserver Mali Deny To完整匹配
|
||||
[Tags] selfserver mali deny to完整匹配
|
||||
Comment 创建To
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=$zmmtest@mail.tsgmail.com
|
||||
${rescode} ${object_To_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -424,7 +424,7 @@ SecurityPolicy-Deny-Mail-00012
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00013
|
||||
[Tags] Selfserver Mali Deny To字串匹配
|
||||
[Tags] selfserver mali deny to字串匹配
|
||||
Comment 创建To
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=zmmtes
|
||||
${rescode} ${object_To_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -458,7 +458,7 @@ SecurityPolicy-Deny-Mail-00013
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00014
|
||||
[Tags] Selfserver Mali Deny To左匹配
|
||||
[Tags] selfserver mali deny to左匹配
|
||||
Comment 创建To
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=zmmt*
|
||||
${rescode} ${object_To_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -492,7 +492,7 @@ SecurityPolicy-Deny-Mail-00014
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00015
|
||||
[Tags] Selfserver Mali Deny Account右匹配
|
||||
[Tags] selfserver mali deny account右匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=*ail.com
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -526,7 +526,7 @@ SecurityPolicy-Deny-Mail-00015
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00016
|
||||
[Tags] Selfserver Mali Deny Account完整匹配
|
||||
[Tags] selfserver mali deny account完整匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=$jwctest@mail.tsgmail.com
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -560,7 +560,7 @@ SecurityPolicy-Deny-Mail-00016
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00017
|
||||
[Tags] Selfserver Mali Deny Account字串匹配
|
||||
[Tags] selfserver mali deny account字串匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=jwcte
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -594,7 +594,7 @@ SecurityPolicy-Deny-Mail-00017
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00018
|
||||
[Tags] Selfserver Mali Deny Account左匹配
|
||||
[Tags] selfserver mali deny account左匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=jwctest*
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -626,3 +626,122 @@ SecurityPolicy-Deny-Mail-00018
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00019
|
||||
[Tags] selfserver mali deny 最大组合
|
||||
Comment 创建Subject
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=*vbnm
|
||||
${rescode} ${object_Subject_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_Subject_Id}
|
||||
Comment 创建Content
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=content
|
||||
${rescode} ${object_Content_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_Content_Id}
|
||||
Comment 创建ATT_CONT
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=стопо
|
||||
${rescode} ${object_ATT_CONT_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_ATT_CONT_Id}
|
||||
Comment 创建From
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=il.com
|
||||
${rescode} ${object_From_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_From_Id}
|
||||
Comment 创建To
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=zmmtes
|
||||
${rescode} ${object_To_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_To_Id}
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=jwctest*
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_Account_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00019 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"drop"} referenceObject=${object_Subject_Id}|TSG_FIELD_MAIL_SUBJECT,${object_Account_Id}|TSG_FIELD_MAIL_ACCOUNT,${object_Content_Id}|TSG_FIELD_MAIL_CONTENT,${object_From_Id}|TSG_FIELD_MAIL_FROM,${object_To_Id}|TSG_FIELD_MAIL_TO,${object_ATT_CONT_Id}|TSG_FIELD_MAIL_ATT_CONTENT isValid=${1} appObjectIdArray=5
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${Smtp服务器} Set Variable 192.168.100.5
|
||||
${Smtp服务器端口} Set Variable 25
|
||||
${邮箱账号} Set Variable jwctest@mail.tsgmail.com
|
||||
${邮箱密码} Set Variable jwctest
|
||||
${邮件主题} Set Variable zxcvbnm
|
||||
${发送者} Set Variable jwctest@mail.tsgmail.com
|
||||
${附件} Set Variable ["${mailpath}/姬巍川测试文件.txt"]
|
||||
${接收者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${抄送者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${密送者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${邮件正文} Set Variable 朱明明content
|
||||
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
|
||||
Log ${发送邮件返回结果}
|
||||
should contain ${发送邮件返回结果} mail_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
SecurityPolicy-Deny-Mail-00020
|
||||
[Tags] selfserver mali deny 多ip+修改
|
||||
Comment 创建第二个源IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.50.10|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=jwctest*
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_Account_Id}
|
||||
Comment 创建Subject
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=*cvbnm
|
||||
${rescode} ${object_Subject_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_Subject_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00020 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"drop"} referenceObject=${object_Account_Id}|TSG_FIELD_MAIL_ACCOUNT,${objectId}|TSG_SECURITY_SOURCE_ADDR isValid=${1} appObjectIdArray=5
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${Smtp服务器} Set Variable 192.168.100.5
|
||||
${Smtp服务器端口} Set Variable 25
|
||||
${邮箱账号} Set Variable jwctest@mail.tsgmail.com
|
||||
${邮箱密码} Set Variable jwctest
|
||||
${邮件主题} Set Variable zxcvbnm
|
||||
${发送者} Set Variable jwctest@mail.tsgmail.com
|
||||
${附件} Set Variable ["${mailpath}/朱明明测试文件.txt"]
|
||||
${接收者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${抄送者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${密送者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${邮件正文} Set Variable 朱明明content
|
||||
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
|
||||
Log ${发送邮件返回结果}
|
||||
should contain ${发送邮件返回结果} mail_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00020 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"drop"} referenceObject=${object_Subject_Id}|TSG_FIELD_MAIL_SUBJECT,${objectId}|TSG_SECURITY_SOURCE_ADDR isValid=${1} appObjectIdArray=5 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${Smtp服务器} Set Variable 192.168.100.5
|
||||
${Smtp服务器端口} Set Variable 25
|
||||
${邮箱账号} Set Variable jwctest@mail.tsgmail.com
|
||||
${邮箱密码} Set Variable jwctest
|
||||
${邮件主题} Set Variable zxcvbnm
|
||||
${发送者} Set Variable jwctest@mail.tsgmail.com
|
||||
${附件} Set Variable ["${mailpath}/朱明明测试文件.txt"]
|
||||
${接收者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${抄送者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${密送者} Set Variable ["zmmtest@mail.tsgmail.com"]
|
||||
${邮件正文} Set Variable 朱明明content
|
||||
${发送邮件返回结果} EmailSendFull ${Smtp服务器} ${Smtp服务器端口} ${邮箱账号} ${邮箱密码} ${邮件主题} ${发送者} ${接收者} ${抄送者} ${密送者} ${邮件正文} ${附件}
|
||||
Log ${发送邮件返回结果}
|
||||
should contain ${发送邮件返回结果} mail_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} mail_account jwctest@mail.tsgmail.com
|
||||
|
||||
@@ -14,13 +14,17 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Deny-SSL-00001
|
||||
[Tags] Selfserver Ip Deny Ssl
|
||||
[Tags] selfserver deny ssl ip+fqdn
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00001 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"rst"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00001 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"rst"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -39,17 +43,17 @@ SecurityPolicy-Deny-SSL-00001
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-SSL-00002
|
||||
[Tags] Selfserver Ssl Deny Sni Ip+Fqdn右匹配
|
||||
[Tags] selfserver ssl deny sni ip+fqdn右匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SSL-00002 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00002 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -57,7 +61,7 @@ SecurityPolicy-Deny-SSL-00002
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Operation timed out after
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -68,17 +72,17 @@ SecurityPolicy-Deny-SSL-00002
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-SSL-00003
|
||||
[Tags] Selfserver Deny Sni Ssl Ip+Cat完整匹配
|
||||
[Tags] selfserver deny ssl sni ip+Cat完整匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -86,7 +90,7 @@ SecurityPolicy-Deny-SSL-00003
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0003.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/bytedance/bytedance.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Operation timed out after
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
@@ -97,17 +101,17 @@ SecurityPolicy-Deny-SSL-00003
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-SSL-00004
|
||||
[Tags] Selfserver Ssl Deny Ip+Fqdn右匹配 Cn
|
||||
[Tags] selfserver ssl deny ip+fqdn右匹配 cn
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SSL-00004 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00004 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -126,17 +130,17 @@ SecurityPolicy-Deny-SSL-00004
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-SSL-00005
|
||||
[Tags] Selfserver Deny Cn Ssl Ip+Cat完整匹配
|
||||
[Tags] deny selfserver cn ssl ip+cat完整匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SSL-00005 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"rst"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00005 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"rst"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -155,17 +159,17 @@ SecurityPolicy-Deny-SSL-00005
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-SSL-00006
|
||||
[Tags] Selfserver Ssl Deny Ip+Fqdn右匹配 San
|
||||
[Tags] selfserver ssl deny san ip+fqdn右匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SSL-00006 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"rst"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SAN isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00006 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"rst"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SAN isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -184,17 +188,17 @@ SecurityPolicy-Deny-SSL-00006
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-SSL-00007
|
||||
[Tags] Selfserver Deny San Ssl Ip+Cat完整匹配
|
||||
[Tags] selfserver deny san ssl ip+cat完整匹配
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Allow-SSL-00007 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SAN isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00007 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"drop"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SAN isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -211,3 +215,76 @@ SecurityPolicy-Deny-SSL-00007
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-SSL-00008
|
||||
[Tags] selfserver deny ssl 最大组合 ip+cat+fqdn
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_cat_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00008 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"drop"} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SAN,${object_fqdn_Id}|TSG_FIELD_SSL_SNI,${object_fqdn_Id}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0003.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/bytedance/bytedance.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00008 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"drop"} referenceObject=${object_cat_Id}|TSG_FIELD_SSL_SAN,${object_cat_Id}|TSG_FIELD_SSL_SNI,${object_cat_Id}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=3 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Deny-SSL-00009
|
||||
[Tags] selfserver ssl deny san 多ip+fqdn右匹配
|
||||
Comment 创建第二个源IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.50.18|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-SSL-00009 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol": "SSL","method":"rst"} referenceObject=${objectId}|TSG_SECURITY_SOURCE_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SAN isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||
... ELSE Create List Connection reset by peer
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -43,11 +43,11 @@ SecurityPolicy-Intercept-Http-00002
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00002 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -72,11 +72,11 @@ SecurityPolicy-Intercept-Http-00003
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00003 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -95,3 +95,74 @@ SecurityPolicy-Intercept-Http-00003
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
SecurityPolicy-Intercept-Http-00004
|
||||
[Tags] Selfserver Intercept Http 双协议
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00004 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=2,3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List nationalbank
|
||||
... ELSE Create List nationalbank
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Intercept-Http-00005
|
||||
[Tags] Selfserver Intercept Http 修改
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*open.node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_cat_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00006 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List nationalbank
|
||||
... ELSE Create List nationalbank
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00006 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_cat_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0002.bat
|
||||
... ELSE set variable curl http://open.node.com/test/youtube/youtube.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 您可以免费加入成为频道会员
|
||||
... ELSE Create List 关闭播放器
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -20,7 +20,7 @@ SecurityPolicy-Intercept-SSL-00001
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -43,13 +43,13 @@ SecurityPolicy-Intercept-SSL-00002
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00002 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00002 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -72,13 +72,13 @@ SecurityPolicy-Intercept-SSL-00003
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -95,3 +95,50 @@ SecurityPolicy-Intercept-SSL-00003
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
SecurityPolicy-Intercept-SSL-00004
|
||||
[Tags] Selfserver Intercept Ssl 修改
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_cat_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0003.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/bytedance/bytedance.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' set variable 字节跳动 Tango Secure Gateway CA
|
||||
... ELSE set variable 字节跳动 Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
Comment 修改策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_cat_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3 policyId=${policyId}
|
||||
${rescode} ${policyId} EditPolicy ${policyDict} update
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' set variable Twitter Tango Secure Gateway CA
|
||||
... ELSE set variable 新鲜事一网打尽 Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/keyringobj
|
||||
${keyringId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Intercept-SSL-00001
|
||||
[Tags] ip root selfserver
|
||||
Comment 创建证书
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/root/ mesalab-ca-cert.pem mesalab-ca-key.pem
|
||||
${keyringId} Get From Dictionary ${response} keyringId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":${keyringId},"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' set variable видео mesalab-ca
|
||||
... ELSE set variable рутуб mesalab-ca
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Intercept-SSL-00002
|
||||
[Tags] root selfserver ip+cat
|
||||
Comment 创建证书
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/root/ tango-ca-root-01-cer.pem tango-ca-root-01-key.pem
|
||||
${keyringId} Get From Dictionary ${response} keyringId
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00002 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":${keyringId},"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' set variable Twitter tango-ca-root
|
||||
... ELSE set variable Twitter tango-ca-root
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Intercept-SSL-00003
|
||||
[Tags] root ip+fqdn selfserver
|
||||
Comment 创建证书
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/root/ tango-ca-trust-ca-cer.pem tango-ca-trust-ca-key.pem
|
||||
${keyringId} Get From Dictionary ${response} keyringId
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":${keyringId},"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0003.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/bytedance/bytedance.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' set variable 字节跳动 Tango National Proxy CA
|
||||
... ELSE set variable 字节跳动 Tango National Proxy CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Intercept-SSL-00004
|
||||
[Tags] Selfserver ip intermediate
|
||||
Comment 创建证书
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/intermediate/ tang-ca-v3-intermediate-01-cer.pem tang-ca-v3-intermediate-01-key.pem {"isValid":1,"opAction":"add","returnData":1,"keyringName":"test1","keyringType":"intermediate","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa1024","keyringId":null,"includeRoot":0}
|
||||
${keyringId} Get From Dictionary ${response} keyringId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00004 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":${keyringId},"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' set variable видео tang-ca-v3-intermediate-01
|
||||
... ELSE set variable рутуб tang-ca-v3-intermediate-01
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Intercept-SSL-00005
|
||||
[Tags] selfserver ip+cat intermediate
|
||||
Comment 创建证书
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/intermediate/ tang-ca-v3-intermediate-02-cer.pem tang-ca-v3-intermediate-02-key.pem {"isValid":1,"opAction":"add","returnData":1,"keyringName":"test2","keyringType":"intermediate","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa1024","keyringId":null,"includeRoot":0}
|
||||
${keyringId} Get From Dictionary ${response} keyringId
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00005 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":${keyringId},"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0002.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/twitter/twitter.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' set variable tang-ca-v3-intermediate-02 Twitter
|
||||
... ELSE set variable Twitter tang-ca-v3-intermediate-02
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Intercept-SSL-00006
|
||||
[Tags] ip+fqdn selfserver end-entity
|
||||
Comment 创建证书
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem tang-ca-v3-www.amazon.cn-key.pem {"isValid":1,"opAction":"add","returnData":1,"keyringName":"test3","keyringType":"end-entity","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa1024","keyringId":null,"includeRoot":0}
|
||||
${keyringId} Get From Dictionary ${response} keyringId
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00006 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":${keyringId},"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject=${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0003.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/bytedance/bytedance.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' set variable 字节跳动 Tango Secure Gateway CA
|
||||
... ELSE set variable 字节跳动 Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Intercept-SSL-00007
|
||||
[Tags] Selfserver ip end-entity
|
||||
Comment 创建证书
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/end-entity/ tang-ca-v3-www.bing.com-cer.pem tang-ca-v3-www.bing.com-key.pem {"isValid":1,"opAction":"add","returnData":1,"keyringName":"test4","keyringType":"end-entity","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa1024","keyringId":null,"includeRoot":0}
|
||||
${keyringId} Get From Dictionary ${response} keyringId
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-SSL-00004 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":${keyringId},"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-SSL-0001.bat
|
||||
... ELSE set variable curl \ -kv \ https://open.node.com/test/rutube/rutube.html
|
||||
@{stringlist} run keyword if '${systemType}'=='Windows' set variable видео Tango Secure Gateway CA
|
||||
... ELSE set variable рутуб Tango Secure Gateway CA
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
@@ -45,7 +45,7 @@ SecurityPolicy-Monitor-DNS-00002
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00001 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"DNS"} isValid=${1} appObjectIdArray=4
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-DNS-00001 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"DNS"} isValid=${1} appObjectIdArray=4 referenceObject=${object_fqdn_Id}|TSG_FIELD_DNS_QNAME
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
|
||||
@@ -14,7 +14,7 @@ ${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
SecurityPolicy-Monitor-Ftp-00001
|
||||
[Tags] Selfserver Ftp Monitor Account字串匹配
|
||||
[Tags] selfserver monitor account字串匹配 ftp
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=ftp_user
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -27,7 +27,7 @@ SecurityPolicy-Monitor-Ftp-00001
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" english
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_success
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
@@ -36,7 +36,7 @@ SecurityPolicy-Monitor-Ftp-00001
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ftp_user
|
||||
|
||||
SecurityPolicy-Monitor-Ftp-00002
|
||||
[Tags] Selfserver Ftp Monitor Account右匹配
|
||||
[Tags] selfserver ftp monitor account右匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=*user
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -49,7 +49,7 @@ SecurityPolicy-Monitor-Ftp-00002
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" english
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_success
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
@@ -58,7 +58,7 @@ SecurityPolicy-Monitor-Ftp-00002
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ftp_user
|
||||
|
||||
SecurityPolicy-Monitor-Ftp-00003
|
||||
[Tags] Selfserver Ftp Account完整匹配 Monitor
|
||||
[Tags] selfserver ftp account完整匹配 monitor
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=$ftp_user
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -71,7 +71,7 @@ SecurityPolicy-Monitor-Ftp-00003
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" english
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_success
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
@@ -80,7 +80,7 @@ SecurityPolicy-Monitor-Ftp-00003
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ftp_user
|
||||
|
||||
SecurityPolicy-Monitor-Ftp-00004
|
||||
[Tags] Selfserver Ftp Monitor Account左匹配
|
||||
[Tags] selfserver ftp monitor account左匹配
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=ftp_u*
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
@@ -93,32 +93,10 @@ SecurityPolicy-Monitor-Ftp-00004
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" english
|
||||
${FTP} FTP_login ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 中文test
|
||||
should contain ${FTP} ftp_success
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ftp_user
|
||||
|
||||
SecurityPolicy-Monitor-Ftp-00005
|
||||
[Tags] Selfserver Ftp Account字串 Monitor
|
||||
Comment 创建Account
|
||||
${objectDict} Create Dictionary objectType=account isValid=${1} addItemList=ftp_user
|
||||
${rescode} ${object_Account_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_Account_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-FTP-00005 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"FTP"} referenceObject=${object_Account_Id}|TSG_FIELD_FTP_ACCOUNT isValid=${1} appObjectIdArray=6
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${FTP} FTP_down ftp://192.168.100.5/test.txt -u"ftp_user:qazXSW@edc" 7 zmmtext123.txt
|
||||
should contain ${FTP} ftp_fail
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ftp_account ftp_user
|
||||
|
||||
@@ -43,11 +43,11 @@ SecurityPolicy-Monitor-Http-00002
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00002 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -72,11 +72,11 @@ SecurityPolicy-Monitor-Http-00003
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00003 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_HTTP_HOST isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -101,11 +101,11 @@ SecurityPolicy-Monitor-Http-00004
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node.com
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_url_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00004 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -130,11 +130,11 @@ SecurityPolicy-Monitor-Http-00005
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*youtube.html
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_url_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00005 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -159,11 +159,11 @@ SecurityPolicy-Monitor-Http-00006
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/nationalbank/nationalbank.html
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_url_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00006 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -188,11 +188,11 @@ SecurityPolicy-Monitor-Http-00007
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open*
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_url_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00007 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_url_Id}|TSG_FIELD_HTTP_URL isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -217,11 +217,11 @@ SecurityPolicy-Monitor-Http-00008
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${object_UA_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_UA_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_UA_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00008 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_UA_Id}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -246,11 +246,11 @@ SecurityPolicy-Monitor-Http-00009
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${object_UA_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_UA_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_UA_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00009 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_UA_Id}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -275,11 +275,11 @@ SecurityPolicy-Monitor-Http-00010
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${object_UA_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_UA_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_UA_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00010 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_UA_Id}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -304,11 +304,11 @@ SecurityPolicy-Monitor-Http-00011
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${object_UA_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_UA_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_UA_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00011 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_UA_Id}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -333,11 +333,11 @@ SecurityPolicy-Monitor-Http-00012
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${object_CK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_CK_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CK_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00012 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_CK_Id}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -362,11 +362,11 @@ SecurityPolicy-Monitor-Http-00013
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=utf-8|Content-Type
|
||||
${rescode} ${object_CT_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_CT_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CT_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00013 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -391,11 +391,11 @@ SecurityPolicy-Monitor-Http-00014
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*utf-8|Content-Type
|
||||
${rescode} ${object_CT_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_CT_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CT_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00014 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -420,11 +420,11 @@ SecurityPolicy-Monitor-Http-00015
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=UTF-8|Content-Type
|
||||
${rescode} ${object_CT_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_CT_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CT_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00015 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -449,11 +449,11 @@ SecurityPolicy-Monitor-Http-00016
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text*|Content-Type
|
||||
${rescode} ${object_CT_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_CT_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_CT_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00016 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_CT_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -462,7 +462,7 @@ SecurityPolicy-Monitor-Http-00016
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List ақстан Республ
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List switch=kazakh
|
||||
... ELSE Create List ақстан Республ
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
@@ -478,11 +478,11 @@ SecurityPolicy-Monitor-Http-00017
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=4567|Set-Cookie
|
||||
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_SK_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00017 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -507,11 +507,11 @@ SecurityPolicy-Monitor-Http-00018
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*5678|Set-Cookie
|
||||
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_SK_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00018 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -536,11 +536,11 @@ SecurityPolicy-Monitor-Http-00019
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_SK_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00019 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -565,11 +565,11 @@ SecurityPolicy-Monitor-Http-00020
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=1234*|Set-Cookie
|
||||
${rescode} ${object_SK_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_SK_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_SK_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00020 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_SK_Id}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -594,11 +594,11 @@ SecurityPolicy-Monitor-Http-00021
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_RQ_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00021 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_RQ_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -623,11 +623,11 @@ SecurityPolicy-Monitor-Http-00022
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Ұлттық
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_RQ_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00022 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_RQ_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -646,3 +646,118 @@ SecurityPolicy-Monitor-Http-00022
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
SecurityPolicy-Monitor-Http-00023
|
||||
[Tags] selfserver ip+请求体and关系
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ctes&t123
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00023 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_RQ_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Response Body
|
||||
... ELSE Create List Response Body
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Monitor-Http-00024
|
||||
[Tags] selfserver ip+请求体或关系
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test,qazx
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00024 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_RQ_Id}|TSG_FIELD_HTTP_REQ_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Response Body
|
||||
... ELSE Create List Response Body
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Monitor-Http-00025
|
||||
[Tags] selfserver ip+应答体and关系
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Ұлттық&жайлы
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00025 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_RQ_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List nationalbank
|
||||
... ELSE Create List nationalbank
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
SecurityPolicy-Monitor-Http-00026
|
||||
[Tags] selfserver ip+应答体或关系
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建应答体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Ұлттық,1234
|
||||
${rescode} ${object_RQ_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_RQ_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-HTTP-00026 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "HTTP"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_RQ_Id}|TSG_FIELD_HTTP_RES_CONTENT isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0003.bat
|
||||
... ELSE set variable curl \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List nationalbank
|
||||
... ELSE Create List nationalbank
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId}
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
|
||||
@@ -43,11 +43,11 @@ SecurityPolicy-Monitor-SSL-00002
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SSL-00002 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -72,11 +72,11 @@ SecurityPolicy-Monitor-SSL-00003
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SNI isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -101,11 +101,11 @@ SecurityPolicy-Monitor-SSL-00004
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SSL-00004 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -130,11 +130,11 @@ SecurityPolicy-Monitor-SSL-00005
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SSL-00005 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_CN isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -159,11 +159,11 @@ SecurityPolicy-Monitor-SSL-00006
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SSL-00006 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol":"SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SAN isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
@@ -188,11 +188,11 @@ SecurityPolicy-Monitor-SSL-00007
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectId} ${object_fqdn_Id}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-SSL-00007 policyType=tsg_security policyDesc=autotest userTags= action=monitor effectiveRange= userRegion={"protocol": "SSL"} referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_fqdn_Id}|TSG_FIELD_SSL_SAN isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
|
||||
0
01-TestCase/tsg_bfapi/Settings/.gitkeep
Normal file
0
01-TestCase/tsg_bfapi/Settings/.gitkeep
Normal file
@@ -9,9 +9,9 @@ Statistics-Country-00001
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/country/sourceipnum
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime} set variable 2020-4-11 13:36:35.000
|
||||
${startTime} set variable 2020-05-10 15:56:05
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${endTime} set variable 2020-4-30 13:36:35.000
|
||||
${endTime} set variable 2020-05-25 15:56:35
|
||||
#limit int型
|
||||
${limit} set variable 50
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} limit=${limit}
|
||||
|
||||
@@ -8,5 +8,5 @@ Statistics-domain-00001
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/domain/recommend
|
||||
# \ 统计时间, \ 查询最近24小时数据;例如当前时间为2020-03-26 15:14:00, 查询时间应设为推前1小时的整点,实际传入参数为 "2020-03-26 14:00:00"
|
||||
${statisticTime} set variable 2020-04-26 23:00:00
|
||||
${statisticTime} set variable 2020-05-10 15:56:05
|
||||
GetApi ${apiName} ${url} statisticTime=${statisticTime}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
*** Settings ***
|
||||
Library DateTime
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-domain_resource-00001
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable domain_resource
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/domain/resource/analyze
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime} -30 days
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
${policyId} set variable 0
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} policy_id=${policyId}
|
||||
@@ -9,9 +9,9 @@ Statistics-hijack_srcip_location-00001
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_location
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime} set variable 2020-04-01 16:43:48
|
||||
${startTime} set variable 2020-04-26 16:40:01
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${endTime} set variable 2020-04-26 16:40:01
|
||||
${endTime} set variable 2020-05-26 10:57:47
|
||||
#策略ID
|
||||
${policy_id} set variable 0
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} policy_id=${policy_id}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Library DateTime
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-hijack_scrip_num-00001
|
||||
#120未更新
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_num
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_num
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime} set variable 2020-04-26 16:40:01
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${endTime} set variable 2020-05-26 10:57:47
|
||||
#策略ID列表,多个逗号分隔
|
||||
${policy_ids} set variable 0
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} policy_ids=${policy_ids}
|
||||
|
||||
LogStatistics-hijack_scrip_num-00002
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_num
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_num
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime}= -01:00:00
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
#策略ID列表,多个逗号分隔
|
||||
${policy_ids} set variable 0,1
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} policy_ids=${policy_ids}
|
||||
|
||||
LogStatistics-hijack_scrip_num-00003
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_num
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_num
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime}= -1 days
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
#策略ID列表,多个逗号分隔
|
||||
${policy_ids} set variable 0,1
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} policy_ids=${policy_ids}
|
||||
|
||||
LogStatistics-hijack_scrip_num-00004
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_num
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_num
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime}= -7 days
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
#策略ID列表,多个逗号分隔
|
||||
${policy_ids} set variable 0,1
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} policy_ids=${policy_ids}
|
||||
|
||||
LogStatistics-hijack_scrip_num-00005
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_num
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_num
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime}= -30 days
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
#策略ID列表,多个逗号分隔
|
||||
${policy_ids} set variable 0,1
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} policy_ids=${policy_ids}
|
||||
|
||||
LogStatistics-hijack_scrip_num-00006
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_num
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_num
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime}= -365 days
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
#策略ID列表,多个逗号分隔
|
||||
${policy_ids} set variable 0,1
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} policy_ids=${policy_ids}
|
||||
@@ -0,0 +1,111 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Library DateTime
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-injectionstatistics-00001
|
||||
#120未更新
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable injectionstatistics
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/injectionstatistics
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime} set variable 2020-04-26 16:40:01
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${endTime} set variable 2020-05-26 10:57:47
|
||||
#返回结果记录数
|
||||
${limit} set variable 50
|
||||
#设备id,多个id逗号分隔 \ 支持设备列表查询 ,后台查询条件如:device_id in ($device_ids)
|
||||
${device_ids} set variable CBT2201925000001
|
||||
#统计时间粒度,单位秒,最小统计粒度为30秒
|
||||
${timeGranularity} set variable 30
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity} limit=${limit} device_ids=${device_ids}
|
||||
|
||||
LogStatistics-injectionstatistics-00002
|
||||
#120未更新
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable injectionstatistics
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/injectionstatistics
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime}= -01:00:00
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
#统计时间粒度,单位秒,最小统计粒度为30秒
|
||||
${timeGranularity} set variable 30
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity}
|
||||
|
||||
LogStatistics-injectionstatistics-00003
|
||||
#120未更新
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable injectionstatistics
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/injectionstatistics
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime}= -1 days
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
${device_ids} set variable CBT2201925000001
|
||||
#统计时间粒度,单位秒,最小统计粒度为30秒
|
||||
${timeGranularity} set variable 30
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity}
|
||||
|
||||
LogStatistics-injectionstatistics-00004
|
||||
#120未更新
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable injectionstatistics
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/injectionstatistics
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime}= -7 days
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
${device_ids} set variable CBT2201925000001
|
||||
#统计时间粒度,单位秒,最小统计粒度为30秒
|
||||
${timeGranularity} set variable 30
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity}
|
||||
|
||||
LogStatistics-injectionstatistics-00005
|
||||
#120未更新
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable injectionstatistics
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/injectionstatistics
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime}= -30 days
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
${device_ids} set variable CBT2201925000001
|
||||
#统计时间粒度,单位秒,最小统计粒度为30秒
|
||||
${timeGranularity} set variable 30
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity}
|
||||
|
||||
LogStatistics-injectionstatistics-00006
|
||||
#120未更新
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable injectionstatistics
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/injectionstatistics
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
${endTime} Get Substring ${endTime} \ -4
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime}= add time to date ${endTime}= -365 days
|
||||
${startTime} Get Substring ${startTime} \ -4
|
||||
${device_ids} set variable CBT2201925000001
|
||||
#统计时间粒度,单位秒,最小统计粒度为30秒
|
||||
${timeGranularity} set variable 30
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity}
|
||||
19
01-TestCase/tsg_bfapi/api_log/LogStatistics-topn.robot
Normal file
19
01-TestCase/tsg_bfapi/api_log/LogStatistics-topn.robot
Normal file
@@ -0,0 +1,19 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-topn-00001
|
||||
#131已通过
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable topn
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/topn/domain
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime} set variable 2020-04-26 18:38:07
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${endTime} set variable 2020-05-26 18:38:20
|
||||
#排序依据: \ sessions、bytes、packets
|
||||
${orderBy} set variable sessions
|
||||
#limit int型
|
||||
${limit} set variable 50
|
||||
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} orderBy=${orderBy} limit=${limit}
|
||||
14
01-TestCase/tsg_bfapi/api_log/LogStatistics_Recommend.robot
Normal file
14
01-TestCase/tsg_bfapi/api_log/LogStatistics_Recommend.robot
Normal file
@@ -0,0 +1,14 @@
|
||||
*** Settings ***
|
||||
Resource ../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Library DateTime
|
||||
|
||||
*** Variables ***
|
||||
${url} /report/url/recommend
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-Recommend-00001
|
||||
${Time} get current date
|
||||
${endTime} add time to date ${Time} -01:00:00
|
||||
${endTime} Get Substring ${endTime} \ -9
|
||||
LOG ${endTime}00:00
|
||||
Recommend ${url} ${endTime}00:00
|
||||
@@ -0,0 +1,30 @@
|
||||
*** Settings ***
|
||||
Resource ../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
|
||||
*** Variables ***
|
||||
${url} /report/policyevent/hit/timeandcount
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-Timeandcount-00001
|
||||
[Tags] security_event_hits_log类型正常输出 单policyId
|
||||
Timeandcount ${url} security_event_hits_log 20515
|
||||
|
||||
LogStatistics_Timeandcount-00002
|
||||
[Tags] security_event_hits_log类型正常输出 多ip
|
||||
Timeandcount ${url} security_event_hits_log 14385,32601
|
||||
|
||||
LogStatistics_Timeandcount-00003
|
||||
[Tags] proxy_event_hits_log类型正常输出 单ip
|
||||
Timeandcount ${url} proxy_event_hits_log 34736
|
||||
|
||||
LogStatistics-Timeandcount-00004
|
||||
[Tags] proxy_event_hits_log类型正常输出 多ip
|
||||
Timeandcount ${url} proxy_event_hits_log 34752,34748
|
||||
|
||||
LogStatistics-Timeandcount-00005
|
||||
[Tags] policyid与日志类型不符合 单ip
|
||||
Timeandcount ${url} proxy_event_hits_log 20515
|
||||
|
||||
LogStatistics-Timeandcount-00006
|
||||
[Tags] policyid与日志类型不符合 多ip
|
||||
Timeandcount ${url} proxy_event_hits_log 14385,32601
|
||||
26
01-TestCase/tsg_bfapi/api_log/LogStatistics_Trend.robot
Normal file
26
01-TestCase/tsg_bfapi/api_log/LogStatistics_Trend.robot
Normal file
@@ -0,0 +1,26 @@
|
||||
*** Settings ***
|
||||
Resource ../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
|
||||
*** Variables ***
|
||||
${url} /report/policyevent/hit/trend
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-Trend-00001
|
||||
[Tags] security_event_hits_log类型正常输出
|
||||
Trend ${url} 2020-05-27 00:00:00 2020-05-27 15:00:00 security_event_hits_log 32601
|
||||
|
||||
LogStatistics-Trend-00002
|
||||
[Tags] proxy_event_hits_log类型正常输出
|
||||
Trend ${url} 2020-05-27 00:00:00 2020-05-27 17:00:00 proxy_event_hits_log 34358
|
||||
|
||||
LogStatistics-Trend-00003
|
||||
[Tags] 日志类型和policyId不一致
|
||||
Trend ${url} 2020-05-27 00:00:00 2020-05-27 15:00:00 proxy_event_hits_log 32601
|
||||
|
||||
LogStatistics-Trend-00004
|
||||
[Tags] policyId不在此时间段产生流量
|
||||
Trend ${url} 2020-05-27 00:00:00 2020-05-27 15:00:00 proxy_event_hits_log 34358
|
||||
|
||||
LogStatistics-Trend-00005
|
||||
[Tags] policyId不在此时间段产生流量
|
||||
Trend ${url} 2020-05-27 00:00:00 2020-05-27 15:00:00 security_event_hits_log 14385
|
||||
@@ -0,0 +1,283 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/hijackfiles
|
||||
${profileId} ${EMPTY}
|
||||
*** Keywords ***
|
||||
ProfileComman
|
||||
[Arguments] ${objectedit} ${type}
|
||||
${default_json} ${default_files} ${default_url} Run Keyword If "${type}"=="hijack" Set Variable ${setting_proxy_profiles_hijack} hijack_files/ /policy/profile/hijackfiles
|
||||
... ELSE IF Run Keyword If "${type}"=="insert" Set Variable ${setting_proxy_profiles_insert} insert_files/ /policy/profile/insertfiles
|
||||
... ELSE Set Variable a b c
|
||||
|
||||
${objectDict} Jsoneditmanu ${default_json} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${default_url} ${default_files} ${objectDict}
|
||||
[Return] ${response}
|
||||
*** Test Cases ***
|
||||
Hijack_file_24_type-test
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=Hijack_file_24_type-00000 contentName=Create-Hijack Files-test-0.apk contentType=application/vnd.android.package-archive
|
||||
${response} ProfileComman ${objectedit} hijack
|
||||
|
||||
Hijack_file_24_type-00000
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=Hijack_file_24_type-00000 contentName=Create-Hijack Files-test-0.apk contentType=application/vnd.android.package-archive
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00001
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-1.exe contentType=application/x-msdos-program
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00002
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-2.gif contentType=image/gif
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00003
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-3.html contentType=text/html
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00004
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-4.jpeg contentType=image/jpeg
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00005
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-5.png contentType=image/png
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00005-1
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-5.png contentType=application/x-png
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00006
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-6.svg contentType=image/svg%2Bxml
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00007
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-7.rpm contentType=audio/x-pn-realaudio-plugin
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00008
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-8.dmg contentType=application/x-apple-diskimage
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00009
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-9.js contentType=application/x-javascript
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00010
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-10.rar contentType=application/octet-stream
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00011
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-11.zip contentType=application/x-zip-compressed
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00012
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-12.doc contentType=application/msword
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00013
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-13.docx contentType=application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00014
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-14.json contentType=application/json
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00015
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-15.xml contentType=text/xml
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00016
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-16.pdf contentType=application/pdf
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00017
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-17.xls contentType=application/vnd.ms-excel
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00017-1
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-17.xls contentType=application/x-xls
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00018
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-18.xlsx contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00019
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-19.ppt contentType=application/vnd.ms-powerpoint
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00019-1
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-19.ppt contentType=application/x-ppt
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00020
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-20.pptx contentType=application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00021
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-21.odt contentType=application/vnd.oasis.opendocument.text
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00022
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-22.css contentType=text/css
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00023
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-23.csv contentType=text/comma-separated-values
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
|
||||
Hijack_file_24_type-00024
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-24.plain contentType=text/plain
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ ${objectDict}
|
||||
50
01-TestCase/tsg_bfapi/setting/ClearAllPolicy.robot
Normal file
50
01-TestCase/tsg_bfapi/setting/ClearAllPolicy.robot
Normal file
@@ -0,0 +1,50 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg_bf_api Clear_All_Policys
|
||||
Library String
|
||||
Library OperatingSystem
|
||||
Library Selenium2Library
|
||||
Library Collections
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url1} /policy/profile/keyringobj
|
||||
${url2} /policy/profile/trustedcacertobj
|
||||
${url3} /policy/profile/responsepages
|
||||
${url4} /policy/profile/hijackfiles
|
||||
${url5} /policy/profile/insertscripts
|
||||
${url6} /policy/profile/trafficmirror
|
||||
|
||||
*** Test Cases ***
|
||||
Keyring Policy delete all case
|
||||
# 清空所有策略!!!
|
||||
${reqData} Create Dictionary isClear=true
|
||||
DeletePolicyFile ${url1} ${reqData}
|
||||
|
||||
Trusted Cert Policy delete all case
|
||||
# 清空所有策略!!!
|
||||
${reqData} Create Dictionary isClear=true
|
||||
DeletePolicyFile ${url2} ${reqData}
|
||||
|
||||
Response Pages Policy delete all case
|
||||
# 清空所有策略!!!
|
||||
${reqData} Create Dictionary isClear=true
|
||||
DeletePolicyFile ${url3} ${reqData}
|
||||
|
||||
Hijack Files Policy delete all case
|
||||
# 清空所有策略!!!
|
||||
${reqData} Create Dictionary isClear=true
|
||||
DeletePolicyFile ${url4} ${reqData}
|
||||
|
||||
Insert Scripts Policy delete all case
|
||||
# 清空所有策略!!!
|
||||
${reqData} Create Dictionary isClear=true
|
||||
DeletePolicyFile ${url5} ${reqData}
|
||||
|
||||
Traffic Mirror Policy delete all case
|
||||
# 清空所有策略!!!
|
||||
${reqData} Create Dictionary isClear=true
|
||||
DeletePolicyFile ${url6} ${reqData}
|
||||
|
||||
|
||||
248
01-TestCase/tsg_bfapi/setting/Decryption_Profile.robot
Normal file
248
01-TestCase/tsg_bfapi/setting/Decryption_Profile.robot
Normal file
@@ -0,0 +1,248 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_bf_api Response_Pages
|
||||
Library String
|
||||
Library OperatingSystem
|
||||
Library Selenium2Library
|
||||
Library Collections
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/decryption
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Decryption_Profile-00001
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00002
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest cn=1
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00003
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest issuer=1
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00004
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest self-signed=1
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00005
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest expiration=1
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00006
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest fail_action=pass-through
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00007
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest ev_cert=1
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00008
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest cert_transparency=1
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00009
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest mutual_authentication=1
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00010
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest cert_pinning=1
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00011
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest protocol_errors=1
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00012
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest trusted_root_cert_is_not_installed_on_client=1
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00013
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest allow_http2=0
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
Decryption_Profile-00014
|
||||
#Hijack 需要修改的内容
|
||||
${protocol_version} Create Dictionary min=ssl3 max=tls13 mirror_client=1 allow_http2=1
|
||||
${objectedit} Create Dictionary profileName=zmminserttest protocol_version=${protocol_version}
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profile_decryption_profile} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","profileId":"525","isValid":1,"decryption":{"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"fail_action":"fail-close","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1}}}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
163
01-TestCase/tsg_bfapi/setting/Dnsrecords.robot
Normal file
163
01-TestCase/tsg_bfapi/setting/Dnsrecords.robot
Normal file
@@ -0,0 +1,163 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/dnsrecords
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Dnsrecords_A_-00001
|
||||
#Hijack 需要修改的内容
|
||||
${Dict1} Create Dictionary value=192.168.0.1
|
||||
${Dict2} Create Dictionary value=192.168.0.2
|
||||
${list} Create List ${Dict1} ${Dict2}
|
||||
${objectedit} Create Dictionary recordName=12 recordType=A recordValues=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": 1, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
${aaa} Evaluate type(${reqHeader_edit} )
|
||||
log ${aaa}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
|
||||
Dnsrecords_MX_-00002
|
||||
#Hijack 需要修改的内容
|
||||
${Dict1} Create Dictionary value=abc.com priority=10
|
||||
${Dict2} Create Dictionary value=edf.com priority=12
|
||||
${list} Create List ${Dict1} ${Dict2}
|
||||
${objectedit} Create Dictionary recordName=12 recordType=MX recordValues=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
${aaa} Evaluate type(${reqHeader_edit} )
|
||||
log ${aaa}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
|
||||
Dnsrecords_CNAME_-00003
|
||||
#Hijack 需要修改的内容
|
||||
${Dict1} Create Dictionary value=abc.com
|
||||
${Dict2} Create Dictionary value=edf.com
|
||||
${list} Create List ${Dict1} ${Dict2}
|
||||
${objectedit} Create Dictionary recordName=12 recordType=CNAME recordValues=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
${aaa} Evaluate type(${reqHeader_edit} )
|
||||
log ${aaa}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
|
||||
Dnsrecords_AAAA_-00004
|
||||
#Hijack 需要修改的内容
|
||||
${Dict1} Create Dictionary value=2000:db8:2de::e13
|
||||
${Dict2} Create Dictionary value=2000:db8:2de::e13
|
||||
${list} Create List ${Dict1} ${Dict2}
|
||||
${objectedit} Create Dictionary recordName=12 recordType=AAAA recordValues=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
${aaa} Evaluate type(${reqHeader_edit} )
|
||||
log ${aaa}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
|
||||
Dnsrecords_TXT_-00005
|
||||
#Hijack 需要修改的内容
|
||||
${Dict1} Create Dictionary value=abc.com
|
||||
${Dict2} Create Dictionary value=edf.com
|
||||
${list} Create List ${Dict1} ${Dict2}
|
||||
${objectedit} Create Dictionary recordName=12 recordType=CNAME recordValues=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
${aaa} Evaluate type(${reqHeader_edit} )
|
||||
log ${aaa}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
|
||||
Dnsrecords_NS_-00006
|
||||
#Hijack 需要修改的内容
|
||||
${Dict1} Create Dictionary value=abc.com
|
||||
${Dict2} Create Dictionary value=edf.com
|
||||
${list} Create List ${Dict1} ${Dict2}
|
||||
${objectedit} Create Dictionary recordName=12 recordType=CNAME recordValues=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
${aaa} Evaluate type(${reqHeader_edit} )
|
||||
log ${aaa}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
|
||||
Dnsrecords_PTR_-00007
|
||||
#Hijack 需要修改的内容
|
||||
${Dict1} Create Dictionary value=abc.com
|
||||
${Dict2} Create Dictionary value=edf.com
|
||||
${list} Create List ${Dict1} ${Dict2}
|
||||
${objectedit} Create Dictionary recordName=12 recordType=CNAME recordValues=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_dnsrecords} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["recordId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["recordName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable { \ \ \ \ "opAction": "update", \ \ \ \ "returnData": 1, \ \ \ \ "dnsRecordList": [ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "recordId": ${profileId}, \ \ \ \ \ \ \ \ \ \ \ \ "recordName": "12", \ \ \ \ \ \ \ \ \ \ \ \ "recordType": "A", \ \ \ \ \ \ \ \ \ \ \ \ "recordValues": [ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.1" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value": "192.168.0.2" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "isValid": 1, \ \ \ \ \ \ \ \ \ \ \ \ "profileDesc": "" \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
${aaa} Evaluate type(${reqHeader_edit} )
|
||||
log ${aaa}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
481
01-TestCase/tsg_bfapi/setting/Hijack_file_24_type.robot
Normal file
481
01-TestCase/tsg_bfapi/setting/Hijack_file_24_type.robot
Normal file
@@ -0,0 +1,481 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/hijackfiles
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Hijack_file_24_type_apk-00000
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-0.apk contentType=application/vnd.android.package-archive
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-0.apk ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
#DeletePolicyFile ${url} ${profileId}
|
||||
|
||||
Hijack_file_24_type_exe-00001
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-1.exe contentType=application/x-msdos-program
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-1.exe ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_gif-00002
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-2.gif contentType=image/gif
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-2.gif ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_html-00003
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-3.html contentType=text/html
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-3.html ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_jpeg-00004
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-4.jpeg contentType=image/jpeg
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-4.jpeg ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_png-00005
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-5.png contentType=image/png
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-5.png ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_png-00005-1
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-5.png contentType=application/x-png
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-5.png ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_svg-00006
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-6.svg contentType=image/svg%2Bxml
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-6.svg ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_rpm-00007
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-7.rpm contentType=audio/x-pn-realaudio-plugin
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-7.rpm ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_dmg-00008
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-8.dmg contentType=application/x-apple-diskimage
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-8.dmg ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_js-00009
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-9.js contentType=application/x-javascript
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-9.js ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_rar-00010
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-10.rar contentType=application/octet-stream
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-10.rar ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_zip-00011
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-11.zip contentType=application/x-zip-compressed
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-11.zip ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_doc-00012
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-12.doc contentType=application/msword
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-12.doc ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_docx-00013
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-13.docx contentType=application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-13.docx ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_json-00014
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-14.json contentType=application/json
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-14.json ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_xml-00015
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-15.xml contentType=text/xml
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-15.xml ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_pdf-00016
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-16.pdf contentType=application/pdf
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-16.pdf ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_xls-00017
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-17.xls contentType=application/vnd.ms-excel
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-17.xls ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_xls-00017-1
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-17.xls contentType=application/x-xls
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-17.xls ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_xlsx-00018
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-18.xlsx contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-18.xlsx ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_ppt-00019
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-19.ppt contentType=application/vnd.ms-powerpoint
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-19.ppt ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_ppt-00019-1
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-19.ppt contentType=application/x-ppt
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-19.ppt ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_pptx-00020
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-20.pptx contentType=application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-20.pptx ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_odt-00021
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-21.odt contentType=application/vnd.oasis.opendocument.text
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-21.odt ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_css-00022
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-22.css contentType=text/css
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-22.css ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_csv-00023
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-23.csv contentType=text/comma-separated-values
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-23.csv ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_plain-00024
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-24.plain contentType=text/plain
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-24.plain ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
Hijack_file_24_type_txt-00025
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmmhjacktest contentName=Create-Hijack Files-test-24.txt contentType=text/plain
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_hijack} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} hijack_files/ Create-Hijack Files-test-24.txt ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"contentType":"image/png","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-5.png","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
81
01-TestCase/tsg_bfapi/setting/InsertScriptsPolicy.robot
Normal file
81
01-TestCase/tsg_bfapi/setting/InsertScriptsPolicy.robot
Normal file
@@ -0,0 +1,81 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/insertscripts
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Insert_Scripts_js_before-00001
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest format=js insertOn=before_page_load
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_insert} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} insert_files/ Create-Insert Scripts-test-1.js ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqHeader_edit} Set Variable {"isValid":1,"format":"css","insertOn":"","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} insert_files/ Create-Insert Scripts-test.css ${reqHeader_edit}
|
||||
|
||||
Insert_Scripts_js_after-00002
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest format=js insertOn=after_page_load
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_insert} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} insert_files/ Create-Insert Scripts-test-1.js ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqHeader_edit} Set Variable {"isValid":1,"format":"css","insertOn":"","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} insert_files/ Create-Insert Scripts-test.css ${reqHeader_edit}
|
||||
|
||||
Insert_Scripts_css_before-00003
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest format=css insertOn=""
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_insert} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} insert_files/ Create-Insert Scripts-test.css ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqHeader_edit} Set Variable {"isValid":1,"format":"js","insertOn":"before_page_load ","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} insert_files/ Create-Insert Scripts-test-1.js ${reqHeader_edit}
|
||||
|
||||
Insert_Scripts_css_after-00004
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest format=css insertOn=""
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_insert} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} insert_files/ Create-Insert Scripts-test.css ${objectDict}
|
||||
log 12313123123123213123213
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqHeader_edit} Set Variable {"isValid":1,"format":"js","insertOn":"after_page_load \ ","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} insert_files/ Create-Insert Scripts-test-1.js ${reqHeader_edit}
|
||||
35
01-TestCase/tsg_bfapi/setting/IntermediaCert.robot
Normal file
35
01-TestCase/tsg_bfapi/setting/IntermediaCert.robot
Normal file
@@ -0,0 +1,35 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg_bf_api Cached_Intermediate_Certificates
|
||||
Library String
|
||||
Library OperatingSystem
|
||||
Library Selenium2Library
|
||||
Library Collections
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/exch/intermediacert
|
||||
|
||||
*** Test Cases ***
|
||||
Intermedia Cert Policy case
|
||||
|
||||
# 查询1
|
||||
${suffix_quary} Catenate SEPARATOR=& certId=269 sni=nationalbank.kz
|
||||
QueryPolicyFile ${url} ${suffix_quary}
|
||||
|
||||
# 查询2
|
||||
${suffix_quary} Catenate SEPARATOR=& certIds=263,265 sni=dw-online.ksosoft
|
||||
QueryPolicyFile ${url} ${suffix_quary}
|
||||
|
||||
# 启用/暂停
|
||||
${certId} QueryPolicyFile2 ${url} isValid=1
|
||||
${certIds} Create List ${certId}
|
||||
${data} Set Variable {"opAction":"disable","certIds":${certIds}}
|
||||
UpdatePolicyFile2 ${url} ${data}
|
||||
${data2} Set Variable {"opAction":"enable","certIds":${certIds}}
|
||||
UpdatePolicyFile2 ${url} ${data2}
|
||||
|
||||
|
||||
|
||||
|
||||
48
01-TestCase/tsg_bfapi/setting/KeyringPolicyFile.robot
Normal file
48
01-TestCase/tsg_bfapi/setting/KeyringPolicyFile.robot
Normal file
@@ -0,0 +1,48 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} keyringIds ${keyringId}
|
||||
Force Tags tsg_bf_api Decryption_Keyrings
|
||||
Library String
|
||||
Library OperatingSystem
|
||||
Library Selenium2Library
|
||||
Library Collections
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/keyringobj
|
||||
${keyringId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Settings-ProxyProfiles-KeyringFile_root-00001
|
||||
# 新增 root
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/root/ mesalab-ca-cert.pem mesalab-ca-key.pem root
|
||||
# 查询
|
||||
${keyringId} Get From Dictionary ${response} keyringId
|
||||
${keyringName} Get From Dictionary ${response} keyringName
|
||||
QueryPolicyFile ${url} keyringId=${keyringId}&keyringName=${keyringName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"opAction":"update","returnData":1,"keyringName":"test_edit","keyringType":"end-entity","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa2048","keyringId":"${keyringId}","includeRoot":0}
|
||||
UpdatePolicyMutipartFile ${url} Keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem tang-ca-v3-www.amazon.cn-key.pem ${header_edit}
|
||||
|
||||
Settings-ProxyProfiles-KeyringFile_end-entity-00002
|
||||
# 新增 end-entity
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/end-entity/ tang-ca-v3-www.bing.com-cer.cer tang-ca-v3-www.bing.com-key.pem end-entity
|
||||
# 查询
|
||||
${keyringId} Get From Dictionary ${response} keyringId
|
||||
${keyringName} Get From Dictionary ${response} keyringName
|
||||
QueryPolicyFile ${url} keyringId=${keyringId}&keyringName=${keyringName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"opAction":"update","returnData":1,"keyringName":"test_edit","keyringType":"end-entity","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa2048","keyringId":"${keyringId}","includeRoot":0}
|
||||
UpdatePolicyMutipartFile ${url} Keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem tang-ca-v3-www.amazon.cn-key.pem ${header_edit}
|
||||
|
||||
Settings-ProxyProfiles-KeyringFile_Intermediate-00003
|
||||
# 新增 end-entity
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/Intermediate/ tang-ca-v3-intermediate-01-cer.pem tang-ca-v3-intermediate-01-key.pem Intermediate
|
||||
# 查询
|
||||
${keyringId} Get From Dictionary ${response} keyringId
|
||||
${keyringName} Get From Dictionary ${response} keyringName
|
||||
QueryPolicyFile ${url} keyringId=${keyringId}&keyringName=${keyringName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"opAction":"update","returnData":1,"keyringName":"test_edit","keyringType":"end-entity","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa2048","keyringId":"${keyringId}","includeRoot":0}
|
||||
UpdatePolicyMutipartFile ${url} keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem tang-ca-v3-www.amazon.cn-key.pem ${header_edit}
|
||||
38
01-TestCase/tsg_bfapi/setting/ResponsePagesPolicy.robot
Normal file
38
01-TestCase/tsg_bfapi/setting/ResponsePagesPolicy.robot
Normal file
@@ -0,0 +1,38 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_bf_api Response_Pages
|
||||
Library String
|
||||
Library OperatingSystem
|
||||
Library Selenium2Library
|
||||
Library Collections
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/responsepages
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Response_page_html-00001
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=zmminserttest format=html
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_reponse_page} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${url} response_pages_files/ Create-Response Pages-test.html ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"format":"html","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} response_pages_files/ Create-Response Pages-test.html ${header_edit}
|
||||
97
01-TestCase/tsg_bfapi/setting/TrafficMirrorPolicy.robot
Normal file
97
01-TestCase/tsg_bfapi/setting/TrafficMirrorPolicy.robot
Normal file
@@ -0,0 +1,97 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_bf_api Traffic_Mirror_Profiles
|
||||
Library String
|
||||
Library OperatingSystem
|
||||
Library Selenium2Library
|
||||
Library Collections
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/trafficmirror
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
TrafficMirrorPolicy_vlan_Single_object-00001
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 1
|
||||
${objectedit} Create Dictionary profileName=zmminserttest addrType=vlan addrArray=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_traffic_mirror_profiles} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"trafficMirrorList":[{"profileId":"${profileId}","profileName":"test_edit","addrType":"vlan","isValid":1,"addrArray":["256"]}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
TrafficMirrorPolicy_vlan_Multi_object-00002
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 1 2
|
||||
${objectedit} Create Dictionary profileName=zmminserttest addrType=vlan addrArray=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_traffic_mirror_profiles} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"trafficMirrorList":[{"profileId":"${profileId}","profileName":"test_edit","addrType":"vlan","isValid":1,"addrArray":["256"]}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
TrafficMirrorPolicy_mac_Single_object-00003
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 13:13:13:13:13:13
|
||||
${objectedit} Create Dictionary profileName=zmminserttest addrType=mac addrArray=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_traffic_mirror_profiles} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"trafficMirrorList":[{"profileId":"${profileId}","profileName":"test_edit","addrType":"vlan","isValid":1,"addrArray":["256"]}]}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
|
||||
TrafficMirrorPolicy_mac_Multi_object-00004
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 13:13:13:13:13:13 13:13:13:13:13:13
|
||||
${objectedit} Create Dictionary profileName=zmminserttest addrType=mac addrArray=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
log ${objectedit}
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_traffic_mirror_profiles} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreateRequest ${url} ${objectDict}
|
||||
# 查询
|
||||
log ${response}
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
# 修改
|
||||
${reqData_edit} Set Variable {"opAction":"update","returnData":1,"trafficMirrorList":[{"profileId":"${profileId}","profileName":"test_edit","addrType":"vlan","isValid":1,"addrArray":["256"]}]}
|
||||
${aaa} Evaluate type(${reqData_edit})
|
||||
log ${aaa}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit}
|
||||
56
01-TestCase/tsg_bfapi/setting/TrustedCertPolicy.robot
Normal file
56
01-TestCase/tsg_bfapi/setting/TrustedCertPolicy.robot
Normal file
@@ -0,0 +1,56 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} certIds ${certId}
|
||||
Force Tags tsg_bf_api Trusted_Certificate_Authorities
|
||||
Library String
|
||||
Library OperatingSystem
|
||||
Library Selenium2Library
|
||||
Library Collections
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/trustedcacertobj
|
||||
${certId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
TrustedCertPolicy_root-00001
|
||||
# 新增
|
||||
${response} CreatePolicyFile ${url} keyrings/root/ tango-ca-trust-ca-cer.pem
|
||||
# 查询
|
||||
${certId} Get From Dictionary ${response} certId
|
||||
${certName} Get From Dictionary ${response} certName
|
||||
QueryPolicyFile ${url} certId=${certId}&certName=${certName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"opAction":"update","certName":"test_edit","certId":"${certId}","returnData":1}
|
||||
UpdatePolicyFile ${url} keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem ${header_edit}
|
||||
|
||||
TrustedCertPolicy_end-entity-00002
|
||||
# 新增
|
||||
${response} CreatePolicyFile ${url} keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem
|
||||
# 查询
|
||||
${certId} Get From Dictionary ${response} certId
|
||||
${certName} Get From Dictionary ${response} certName
|
||||
QueryPolicyFile ${url} certId=${certId}&certName=${certName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"opAction":"update","certName":"test_edit","certId":"${certId}","returnData":1}
|
||||
UpdatePolicyFile ${url} keyrings/root/ tango-ca-trust-ca-cer.pem ${header_edit}
|
||||
|
||||
TrustedCertPolicy_Intermediate-00003
|
||||
# 新增
|
||||
${response} CreatePolicyFile ${url} keyrings/Intermediate/ tang-ca-v3-intermediate-01-cer.pem
|
||||
# 查询
|
||||
${certId} Get From Dictionary ${response} certId
|
||||
${certName} Get From Dictionary ${response} certName
|
||||
QueryPolicyFile ${url} certId=${certId}&certName=${certName}
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"opAction":"update","certName":"test_edit","certId":"${certId}","returnData":1}
|
||||
UpdatePolicyFile ${url} keyrings/root/ tango-ca-trust-ca-cer.pem ${header_edit}
|
||||
33
01-TestCase/tsg_bfapi/setting/claimedsrcip.robot
Normal file
33
01-TestCase/tsg_bfapi/setting/claimedsrcip.robot
Normal file
@@ -0,0 +1,33 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} policy/profile/claimedsrcip
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
claimedsrcip-00001
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 192.168.0.1/16 192.168.0.2/16 192.168.0.3/24
|
||||
${objectedit} Create Dictionary profileName=12313 addrType=4 ipList=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_claimedsrcip} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["profileId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["profileName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable {"opAction": "add","returnData": 1,"claimedSrcIpList":[{"profileId":1,"profileName":"1231","addrType":4,"ipList":["192.168.0.1/16","192.168.0.2/16","192.168.0.3/24"],"isValid":1,"profileDesc":""}],"isValid":1,"profileDesc":""}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
33
01-TestCase/tsg_bfapi/setting/redirectdestination.robot
Normal file
33
01-TestCase/tsg_bfapi/setting/redirectdestination.robot
Normal file
@@ -0,0 +1,33 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} policy/profile/redirectdestination
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
claimedsrcip-00001
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 192.168.0.1/16 192.168.0.2/16 192.168.0.3/24
|
||||
${objectedit} Create Dictionary profileName=12313 addrType=4 ipList=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_claimedsrcip} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["profileId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["profileName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable {"opAction": "add","returnData": 1,"claimedSrcIpList":[{"profileId":1,"profileName":"1231","addrType":4,"ipList":["192.168.0.1/16","192.168.0.2/16","192.168.0.3/24"],"isValid":1,"profileDesc":""}],"isValid":1,"profileDesc":""}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
33
01-TestCase/tsg_bfapi/setting/reflector.robot
Normal file
33
01-TestCase/tsg_bfapi/setting/reflector.robot
Normal file
@@ -0,0 +1,33 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} policy/profile/reflector
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
reflector-00001
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 192.168.0.1 192.168.0.2 192.168.0.3
|
||||
${objectedit} Create Dictionary profileName=12313 reflectorType=DNS ipList=${list}
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${setting_proxy_profiles_reflector} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["profileId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["profileName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable {"opAction": "update","returnData": 1,"reflectorList":[{"profileId":${profileId} ,"profileName":"12313","addrType":4,"reflectorType":"dns","ipList":["192.168.0.1","192.168.0.2","192.168.0.3"],"isValid":1,"profileDesc":""}]}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
32
01-TestCase/tsg_bfapi/setting/reflector_payload.robot
Normal file
32
01-TestCase/tsg_bfapi/setting/reflector_payload.robot
Normal file
@@ -0,0 +1,32 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_adc Security_Policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../../03-Variable/AllFlowCaseVariable.txt
|
||||
Resource ../../../03-Variable/Policy_Objects_Module.txt
|
||||
Library Custometest
|
||||
|
||||
*** Variables ***
|
||||
${url} policy/profile/reflector/payload
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
reflector-00001
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=12313 reflectorType=dns payload=SSBMT1ZFIFlPVSDmiJHniLHkvaA=
|
||||
Comment 打印需要修改的json内容
|
||||
${objectDict} Jsoneditmanu ${settig_proxy_profiles_reflector_payload} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} Post-Request ${url} ${objectDict}
|
||||
#查询
|
||||
${profileId} Set Variable ${response['data']['list'][0]["profileId"]}
|
||||
${profileName} Set Variable ${response['data']['list'][0]["profileName"]}
|
||||
QueryPolicyFile ${url} recordId=${profileId}&profileName=${${profileName} }
|
||||
# 修改
|
||||
log ${profileId}
|
||||
${reqHeader_edit} Set Variable {"opAction": "update","returnData": 1,"reflectorList":[{"profileId":1,"profileName":"zzzzzzz","reflectorType":"dns","payload":"SSBMT1ZFIFlPVSDmiJHniLHkvaA=","isValid":1,"profileDesc":""}]}
|
||||
UpdatePolicyFile2 ${url} ${reqHeader_edit}
|
||||
@@ -1,8 +1,9 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui objects HTTPSignature
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/ObjectPages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/Objects.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-HTTPSignature-Request-User-Agent-prefix-001
|
||||
@@ -10,8 +11,8 @@ create-HTTPSignature-Request-User-Agent-prefix-001
|
||||
CreatePage ReqRes create-HTTPSignature-Request-User-Agent-prefix-001 reqrestype=req reqresheader=ua keywordtext=Mozilla/5.0*
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Request-User-Agent-prefix-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Request-User-Agent-prefix-001
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -20,8 +21,8 @@ create-HTTPSignature-Request-User-Agent-sub-002
|
||||
CreatePage ReqRes create-HTTPSignature-Request-User-Agent-sub-002 reqrestype=req reqresheader=ua keywordtext=Mozilla/5.
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Request-User-Agent-sub-002
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Request-User-Agent-sub-002
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -30,8 +31,8 @@ create-HTTPSignature-Request-User-Agent-exactly-003
|
||||
CreatePage ReqRes create-HTTPSignature-Request-User-Agent-exactly-003 reqrestype=req reqresheader=ua keywordtext=$Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Request-User-Agent-exactly-003
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Request-User-Agent-exactly-003
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -40,8 +41,8 @@ create-HTTPSignature-Request-User-Agent-suffix-004
|
||||
CreatePage ReqRes create-HTTPSignature-Request-User-Agent-suffix-004 reqrestype=req reqresheader=ua keywordtext=*Safari/537.36
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Request-User-Agent-suffix-004
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Request-User-Agent-suffix-004
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -50,8 +51,8 @@ create-HTTPSignature-Request-Cookie-prefix-005
|
||||
CreatePage ReqRes create-HTTPSignature-Request-Cookie-prefix-005 reqrestype=req reqresheader=ck keywordtext=cookie*
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Request-Cookie-prefix-005
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Request-Cookie-prefix-005
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -60,8 +61,8 @@ create-HTTPSignature-Request-Cookie-sub-006
|
||||
CreatePage ReqRes create-HTTPSignature-Request-Cookie-sub-006 reqrestype=req reqresheader=ck keywordtext=cookie
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Request-Cookie-sub-006
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Request-Cookie-sub-006
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -70,8 +71,8 @@ create-HTTPSignature-Request-Cookie-exactly-007
|
||||
CreatePage ReqRes create-HTTPSignature-Request-Cookie-exactly-007 reqrestype=req reqresheader=ck keywordtext=$cookie
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Request-Cookie-exactly-007
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Request-Cookie-exactly-007
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -80,8 +81,8 @@ create-HTTPSignature-Request-Cookie-suffix-008
|
||||
CreatePage ReqRes create-HTTPSignature-Request-Cookie-suffix-008 reqrestype=req reqresheader=ck keywordtext=*cookie
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Request-Cookie-suffix-008
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Request-Cookie-suffix-008
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -90,8 +91,8 @@ create-HTTPSignature-Response-Set-Cookie-prefix-009
|
||||
CreatePage ReqRes create-HTTPSignature-Response-Set-Cookie-prefix-009 reqrestype=res reqresheader=sck keywordtext=set-cookie*
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Response-Set-Cookie-prefix-009
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Response-Set-Cookie-prefix-009
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -100,8 +101,8 @@ create-HTTPSignature-Response-Set-Cookie-sub-010
|
||||
CreatePage ReqRes create-HTTPSignature-Response-Set-Cookie-sub-010 reqrestype=res reqresheader=sck keywordtext=set-cookie
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Response-Set-Cookie-sub-010
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Response-Set-Cookie-sub-010
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -110,8 +111,8 @@ create-HTTPSignature-Response-Set-Cookie-exactly-011
|
||||
CreatePage ReqRes create-HTTPSignature-Response-Set-Cookie-exactly-011 reqrestype=res reqresheader=sck keywordtext=$set-cookie
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Response-Set-Cookie-exactly-011
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Response-Set-Cookie-exactly-011
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -120,8 +121,8 @@ create-HTTPSignature-Response-Set-Cookie-suffix-012
|
||||
CreatePage ReqRes create-HTTPSignature-Response-Set-Cookie-suffix-012 reqrestype=res reqresheader=sck keywordtext=*set-cookie
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Response-Set-Cookie-suffix-012
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Response-Set-Cookie-suffix-012
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -130,8 +131,8 @@ create-HTTPSignature-Response-Content-Type-prefix-0013
|
||||
CreatePage ReqRes create-HTTPSignature-Response-Content-Type-prefix-0013 reqrestype=res reqresheader=ct keywordtext=Content-Type*
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Response-Content-Type-prefix-0013
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Response-Content-Type-prefix-0013
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -140,8 +141,8 @@ create-HTTPSignature-Response-Content-Type-sub-0014
|
||||
CreatePage ReqRes create-HTTPSignature-Response-Content-Type-sub-0014 reqrestype=res reqresheader=ct keywordtext=Content-Type
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Response-Content-Type-sub-0014
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Response-Content-Type-sub-0014
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -150,8 +151,8 @@ create-HTTPSignature-Response-Content-Type-exactly-0015
|
||||
CreatePage ReqRes create-HTTPSignature-Response-Content-Type-exactly-0015 reqrestype=res reqresheader=ct keywordtext=$Content-Type
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Response-Content-Type-exactly-0015
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Response-Content-Type-exactly-0015
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -160,8 +161,8 @@ create-HTTPSignature-Response-Content-Type-suffix-0016
|
||||
CreatePage ReqRes create-HTTPSignature-Response-Content-Type-suffix-0016 reqrestype=res reqresheader=ct keywordtext=*Content-Type
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Response-Content-Type-suffix-0016
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Response-Content-Type-suffix-0016
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -170,8 +171,8 @@ edit-HTTPSignature-017
|
||||
CreatePage ReqRes create-HTTPSignature-Request-User-Agent-prefix-001 reqrestype=req reqresheader=ua keywordtext=Mozilla/5.0*
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-Request-User-Agent-prefix-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-Request-User-Agent-prefix-001
|
||||
#修改对象
|
||||
object-edit-HTTPSignature edit-HTTPSignature-017 res sck 8f6c 6362 31 36 8fdb 5236 hex=open
|
||||
#查询修改对象
|
||||
@@ -184,7 +185,7 @@ create-HTTPSignature-open-16-hex-0018
|
||||
CreatePage ReqRes create-HTTPSignature-open-16-hex-0018 reqrestype=res reqresheader=ct keywordtext=*63 6f 6e 74 65 6e 74 hex=open
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-HTTPSignature-open-16-hex-0018
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-HTTPSignature-open-16-hex-0018
|
||||
#删除对象
|
||||
objects-delete
|
||||
@@ -1,9 +1,9 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui objects account
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/ObjectPages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/Objects.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-account-prefix-001
|
||||
@@ -11,8 +11,8 @@ create-account-prefix-001
|
||||
CreatePage Account create-account-prefix-001 keywordtext=www.*
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-account-prefix-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-account-prefix-001
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui objects category
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/ObjectPages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/Objects.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-category-exactly-001
|
||||
@@ -11,8 +11,8 @@ create-category-exactly-001
|
||||
CreatePage Category create-category-exactly-001 keywordtext=$www.baidu.com
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-category-exactly-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-category-exactly-001
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -21,8 +21,8 @@ create-category-suffix-002
|
||||
CreatePage Category create-category-suffix-002 keywordtext=*baidu.com
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-category-suffix-002
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-category-suffix-002
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -31,8 +31,8 @@ edit-category-003
|
||||
CreatePage Category create-category-suffix-002 keywordtext=*baidu.com
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-category-suffix-002
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-category-suffix-002
|
||||
#修改对象
|
||||
object-edit-fqdn deit-category-003 $open.node.com
|
||||
#查询修改对象
|
||||
@@ -1,9 +1,9 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui objects fqdn
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/ObjectPages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/Objects.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-fqdn-exactly-001
|
||||
@@ -11,8 +11,8 @@ create-fqdn-exactly-001
|
||||
CreatePage Fqdn create-fqdn-exactly-001 keywordtext=$open.node.com
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-fqdn-exactly-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-fqdn-exactly-001
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -21,8 +21,18 @@ create-fqdn-suffix-002
|
||||
CreatePage Fqdn create-fqdn-suffix-002 keywordtext=*open.node.com
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-fqdn-suffix-002
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-fqdn-suffix-002
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-fqdn-suffix-003
|
||||
#新建fqdn,exactly
|
||||
CreatePage Fqdn create-fqdn-suffix-003 keywordtext=*123-456_abc
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-fqdn-suffix-003
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-fqdn-suffix-003
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -31,8 +41,8 @@ deit-fqdn-003
|
||||
CreatePage Fqdn create-fqdn-suffix-002 keywordtext=*open.node.com
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-fqdn-suffix-002
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-fqdn-suffix-002
|
||||
#修改对象
|
||||
object-edit-fqdn deit-fqdn-003 $open.node.com
|
||||
#查询修改对象
|
||||
164
01-TestCase/tsg_ui/ui_objects/Object_Ip_Case.robot
Normal file
164
01-TestCase/tsg_ui/ui_objects/Object_Ip_Case.robot
Normal file
@@ -0,0 +1,164 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui objects ip
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/ObjectPages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/Objects.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-ipv4-range-001
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv4-range-001 ipads=ipv4 ipclient=range ipclienttext1=192.168.1.1 ipclienttext2=192.168.1.1
|
||||
... post=0/0
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv4-range-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv4-range-001
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv4-cidr-002
|
||||
#新建ip,cidr
|
||||
CreatePage Ip create-ipv4-cidr-002 ipads=ipv4 ipclient=cidr ipclienttext1=192.168.1.1 ipclienttext2=24
|
||||
... post=65535/65535
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv4-cidr-002
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv4-cidr-002
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv4-masks-003
|
||||
#新建ip,masks
|
||||
CreatePage Ip create-ipv4-masks-003 ipads=ipv4 ipclient=masks ipclienttext1=192.168.1.1 ipclienttext2=255.255.255.0
|
||||
... post=1/1
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv4-masks-003
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv4-masks-003
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv6-range-004
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv6-range-004 ipads=ipv6 ipclient=range ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
|
||||
... post=65535/65535
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-range-004
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv6-range-004
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv6-cidr-005
|
||||
#新建ip,cidr
|
||||
CreatePage Ip create-ipv6-cidr-005 ipads=ipv6 ipclient=cidr ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=64
|
||||
... post=1/1
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-cidr-005
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv6-cidr-005
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv6-masks-006
|
||||
#新建ip,masks
|
||||
CreatePage Ip create-ipv6-masks-006 ipads=ipv6 ipclient=masks ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=0:0:0:0:0:0:0:0
|
||||
... post=65535/65535
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-masks-006
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv6-masks-006
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
edit-ip-007
|
||||
#新建ip,masks
|
||||
CreatePage Ip create-ipv6-masks-007 ipads=ipv6 ipclient=masks ipclienttext1=0:0:0:0:0:0:0:0 ipclienttext2=0:0:0:0:0:0:0:0
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-masks-007
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv6-masks-007
|
||||
#修改对象
|
||||
object-edit-ip edit-ip-007 ipv4 range 192.168.100.1 192.168.100.1 post=0/0
|
||||
#查询修改对象
|
||||
ui-object-search-name edit-ip-007
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv6-range-008
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv6-range-008 ipads=ipv6 ipclient=range ipclienttext1=:: ipclienttext2=::1
|
||||
... post=0/0
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-range-008
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv6-range-008
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv4-range-009
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv4-range-009 ipads=ipv4 ipclient=range ipclienttext1=0.0.0.0 ipclienttext2=255.255.255.255
|
||||
... post=65535/65535
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv4-range-009
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv4-range-009
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv4-cidr-010
|
||||
#新建ip,cidr
|
||||
CreatePage Ip create-ipv4-cidr-010 ipads=ipv4 ipclient=cidr ipclienttext1=0.0.0.0 ipclienttext2=0
|
||||
... post=0/0
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv4-cidr-010
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv4-cidr-010
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv4-cidr-011
|
||||
#新建ip,cidr
|
||||
CreatePage Ip create-ipv4-cidr-011 ipads=ipv4 ipclient=cidr ipclienttext1=255.255.255.255 ipclienttext2=32
|
||||
... post=65535/65535
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv4-cidr-011
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv4-cidr-011
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv6-range-012
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv6-range-012 ipads=ipv6 ipclient=range ipclienttext1=:: ipclienttext2=FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
|
||||
... post=0/0
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-range-012
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv6-range-012
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv6-cidr-013
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv6-cidr-013 ipads=ipv6 ipclient=cidr ipclienttext1=:: ipclienttext2=0
|
||||
... post=0/0
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-cidr-013
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv6-cidr-013
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-ipv6-cidr-014
|
||||
#新建ip,range
|
||||
CreatePage Ip create-ipv6-cidr-014 ipads=ipv6 ipclient=cidr ipclienttext1=FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF ipclienttext2=128
|
||||
... post=65535/65535
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-ipv6-cidr-014
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-ipv6-cidr-014
|
||||
#删除对象
|
||||
objects-delete
|
||||
@@ -1,9 +1,9 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui objects keywords
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/ObjectPages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/Objects.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-keywords-prefix-001
|
||||
@@ -11,48 +11,48 @@ create-keywords-prefix-001
|
||||
CreatePage Key create-keywords-prefix-001 keywordtext=www.*
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-keywords-prefix-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-keywords-prefix-001
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-keywords-sub-002
|
||||
#新建keywords
|
||||
CreatePage Key create-keywords-sub-002 keywordtext=1234
|
||||
CreatePage Key create-keywords-sub-002 keywordtext=1234@#%
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-keywords-sub-002
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-keywords-sub-002
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-keywords-exactly-003
|
||||
#新建keywords
|
||||
CreatePage Key create-keywords-exactly-003 keywordtext=$123456
|
||||
CreatePage Key create-keywords-exactly-003 keywordtext=$支持中文
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-keywords-exactly-003
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-keywords-exactly-003
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-keywords-suffix-004
|
||||
#新建keywords
|
||||
CreatePage Key create-keywords-suffix-004 keywordtext=*123456
|
||||
CreatePage Key create-keywords-suffix-004 keywordtext=*скрипцияк.
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-keywords-suffix-004
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-keywords-suffix-004
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
edit-keywords-005
|
||||
#新建keywords
|
||||
CreatePage Key create-keywords-suffix-004 keywordtext=*123456
|
||||
CreatePage Key create-keywords-suffix-005 keywordtext=*123456
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-keywords-suffix-004
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
ui-object-search-name create-keywords-suffix-005
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-keywords-suffix-005
|
||||
#修改对象
|
||||
object-edit-keywords edit-keywords-005 $www.baidu.com
|
||||
#查询修改对象
|
||||
@@ -1,9 +1,9 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui object sub-id
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/ObjectPages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/Objects.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-Subscriber-ID-001
|
||||
@@ -11,8 +11,18 @@ create-Subscriber-ID-001
|
||||
CreatePage Sub create-sub-id-001 keywordtext=$test37
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-sub-id-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-sub-id-001
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-Subscriber-ID-002
|
||||
#新建sub-id
|
||||
CreatePage Sub create-sub-id-002 keywordtext=$abc_%$#@123中文_скрипцияк.
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-sub-id-002
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-sub-id-002
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui objects url
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/ObjectPages.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/ObjectPages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/Tsg_Ui/Objects/Objects.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/Objects.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-url-prefix-001
|
||||
@@ -11,48 +11,48 @@ create-url-prefix-001
|
||||
CreatePage Url create-url-prefix-001 keywordtext=www.*
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-url-prefix-001
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-url-prefix-001
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-url-sub-002
|
||||
#新建sub-id
|
||||
CreatePage Url create-url-sub-002 keywordtext=jianshu
|
||||
CreatePage Url create-url-sub-002 keywordtext=1234@#%
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-url-sub-002
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-url-sub-002
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-url-exactly-003
|
||||
#新建sub-id
|
||||
CreatePage Url create-url-exactly-003 keywordtext=$www.vip.com
|
||||
CreatePage Url create-url-exactly-003 keywordtext=$支持中文
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-url-exactly-003
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-url-exactly-003
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
create-url-suffix-004
|
||||
#新建sub-id
|
||||
CreatePage Url create-url-suffix-004 keywordtext=*.com
|
||||
CreatePage Url create-url-suffix-004 keywordtext=*скрипцияк.
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-url-suffix-004
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-url-suffix-004
|
||||
#删除对象
|
||||
objects-delete
|
||||
|
||||
edit-url-005
|
||||
#新建sub-id
|
||||
CreatePage Url create-url-suffix-004 keywordtext=*.com
|
||||
CreatePage Url create-url-suffix-005 keywordtext=*.com
|
||||
#验证新建是否成功
|
||||
ui-object-search-name create-url-suffix-004
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span/span[2]/span
|
||||
log ${text}
|
||||
ui-object-search-name create-url-suffix-005
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Should Be Equal As Strings ${text} create-url-suffix-005
|
||||
#修改对象
|
||||
object-edit-url deit-url-005 $www.baidu.com
|
||||
#查询修改对象
|
||||
@@ -0,0 +1,66 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui settings Decryption Keyrings
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
|
||||
Library OperatingSystem
|
||||
|
||||
*** Test Cases ***
|
||||
Create_Decryption_Keyrings-001
|
||||
Create-Decryption Keyrings lyf-RF-test-001 ${path}keyrings//root//tango-ca-root-01-cer.pem ${path}keyrings//root//tango-ca-root-01-key.pem 23 id=certificateType_select0 id=keyringsadd_publicKeyAlgoSelet1
|
||||
|
||||
Create_Decryption_Keyrings-002
|
||||
Create-Decryption Keyrings lyf-RF-test-002 ${path}keyrings//root//tango-ca-root-01-cer.pem ${path}keyrings//root//tango-ca-root-01-key.pem 23 id=certificateType_select0 id=keyringsadd_publicKeyAlgoSelet0
|
||||
|
||||
Create_Decryption_Keyrings-003
|
||||
Create-Decryption Keyrings lyf-RF-test-003 ${path}keyrings//root//tango-ca-root-01-cer.pem ${path}keyrings//root//tango-ca-root-01-key.pem 23 id=certificateType_select0 id=keyringsadd_publicKeyAlgoSelet2
|
||||
|
||||
Create_Decryption_Keyrings-004
|
||||
Create-Decryption Keyrings lyf-RF-test-004 ${path}keyrings//root//tango-ca-root-01-cer.pem ${path}keyrings//root//tango-ca-root-01-key.pem 23 id=certificateType_select0 id=keyringsadd_publicKeyAlgoSelet3
|
||||
|
||||
Create_Decryption_Keyrings-005
|
||||
Create-Decryption Keyrings lyf-RF-test-005 ${path}keyrings//root//tango-ca-root-01-cer.pem ${path}keyrings//root//tango-ca-root-01-key.pem 23 id=certificateType_select0 id=keyringsadd_publicKeyAlgoSelet3
|
||||
... open
|
||||
|
||||
Create_Decryption_Keyrings-006
|
||||
Create-Decryption Keyrings lyf-RF-test-006 ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-cer.pem ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-key.pem 23 id=certificateType_select1 id=keyringsadd_publicKeyAlgoSelet3
|
||||
|
||||
Create_Decryption_Keyrings-007
|
||||
Create-Decryption Keyrings lyf-RF-test-006 ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-cer.pem ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-key.pem 1 id=certificateType_select1 id=keyringsadd_publicKeyAlgoSelet2
|
||||
|
||||
Create_Decryption_Keyrings-008
|
||||
Create-Decryption Keyrings lyf-RF-test-006 ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-cer.pem ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-key.pem 2 id=certificateType_select1 id=keyringsadd_publicKeyAlgoSelet1
|
||||
|
||||
Create_Decryption_Keyrings-009
|
||||
Create-Decryption Keyrings lyf-RF-test-006 ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-cer.pem ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-key.pem 2 id=certificateType_select1 id=keyringsadd_publicKeyAlgoSelet0
|
||||
|
||||
Create_Decryption_Keyrings-010
|
||||
Create-Decryption Keyrings lyf-RF-test-006 ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-cer.pem ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-key.pem 2 id=certificateType_select1 id=keyringsadd_publicKeyAlgoSelet0
|
||||
... open
|
||||
|
||||
Edit_Decryption_Keyrings-011
|
||||
Create-Decryption Keyrings lyf-RF-test-006 ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-cer.pem ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-key.pem 2 id=certificateType_select1 id=keyringsadd_publicKeyAlgoSelet0
|
||||
${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div/p/span
|
||||
Edit-Decryption Keyrings id=input_list_li1 ${id} lyf-RF-edit-1 ${path}keyrings//root//mesalab-ca-cert.pem ${path}keyrings//root//mesalab-ca-key.pem 1
|
||||
... id=certificateType_select0 id=keyringsadd_publicKeyAlgoSelet1
|
||||
|
||||
Edit_Decryption_Keyrings-012
|
||||
Create-Decryption Keyrings lyf-RF-test-006 ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-cer.pem ${path}keyrings//Intermediate//tang-ca-v3-intermediate-01-key.pem 2 id=certificateType_select1 id=keyringsadd_publicKeyAlgoSelet0
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span
|
||||
Edit-Decryption Keyrings id=input_list_li2 ${name} lyf-RF-edit-1 ${path}keyrings//root//mesalab-ca-cert.pem ${path}keyrings//root//mesalab-ca-key.pem 1
|
||||
... id=certificateType_select0 id=keyringsadd_publicKeyAlgoSelet1
|
||||
|
||||
Create_Decryption_Keyrings-013
|
||||
Create-Decryption Keyrings lyf-RF-test-013 ${path}keyrings//end-entity//tang-ca-v3-www.amazon.cn-cer.pem ${path}keyrings//end-entity//tang-ca-v3-www.amazon.cn-key.pem 23 id=certificateType_select2 id=keyringsadd_publicKeyAlgoSelet0
|
||||
|
||||
Create_Decryption_Keyrings-014
|
||||
Create-Decryption Keyrings lyf-RF-test-014 ${path}keyrings//end-entity//tang-ca-v3-www.amazon.cn-cer.pem ${path}keyrings//end-entity//tang-ca-v3-www.amazon.cn-key.pem 23 id=certificateType_select2 id=keyringsadd_publicKeyAlgoSelet1
|
||||
|
||||
Create_Decryption_Keyrings-015
|
||||
Create-Decryption Keyrings lyf-RF-test-015 ${path}keyrings//end-entity//tang-ca-v3-www.amazon.cn-cer.pem ${path}keyrings//end-entity//tang-ca-v3-www.amazon.cn-key.pem 23 id=certificateType_select2 id=keyringsadd_publicKeyAlgoSelet2
|
||||
|
||||
Create_Decryption_Keyrings-016
|
||||
Create-Decryption Keyrings lyf-RF-test-016 ${path}keyrings//end-entity//tang-ca-v3-www.amazon.cn-cer.pem ${path}keyrings//end-entity//tang-ca-v3-www.amazon.cn-key.pem 23 id=certificateType_select2 id=keyringsadd_publicKeyAlgoSelet3
|
||||
|
||||
Create_Decryption_Keyrings-017
|
||||
Create-Decryption Keyrings lyf-RF-test-017 ${path}keyrings//end-entity//tang-ca-v3-www.amazon.cn-cer.pem ${path}keyrings//end-entity//tang-ca-v3-www.amazon.cn-key.pem 1 id=certificateType_select2 id=keyringsadd_publicKeyAlgoSelet3
|
||||
... open
|
||||
110
01-TestCase/tsg_ui/ui_settings/Decryption_Profile_Case.robot
Normal file
110
01-TestCase/tsg_ui/ui_settings/Decryption_Profile_Case.robot
Normal file
@@ -0,0 +1,110 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui settings Decryption Profile
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
|
||||
Library OperatingSystem
|
||||
|
||||
*** Test Cases ***
|
||||
Create_Decryption_Profile-001
|
||||
${dict} Create Dictionary Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=1
|
||||
... Certificate Transparency=1 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=1 Mirror Client Versions=1
|
||||
... Allow HTTP/2=1
|
||||
Create-Policy_Verify1 lyf-test-1 ${dict}
|
||||
|
||||
Create_Decryption_Profile-002
|
||||
${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0e
|
||||
... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0
|
||||
... Allow HTTP/2=0
|
||||
Create-Policy_Verify1 lyf-test-2 ${dict}
|
||||
|
||||
Create_Decryption_Profile-003
|
||||
${dict} Create Dictionary Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=1
|
||||
... Certificate Transparency=1 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=1 Mirror Client Versions=1
|
||||
... Allow HTTP/2=1
|
||||
Create-Policy_Verify1 lyf-test-3 ${dict} fail1=Fail-close
|
||||
|
||||
Create_Decryption_Profile-004
|
||||
${dict} Create Dictionary Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=1
|
||||
... Certificate Transparency=1 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=1 Mirror Client Versions=1
|
||||
... Allow HTTP/2=1
|
||||
Create-Policy_Verify1 lyf-test-3 ${dict} fail1=Pass-through
|
||||
|
||||
Create_Decryption_Profile-005
|
||||
${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0
|
||||
... Allow HTTP/2=0
|
||||
Create-Policy_Verify1 lyf-test-5 ${dict} min1=SSLv3.0 max1=SSLv3.0
|
||||
|
||||
Create_Decryption_Profile-006
|
||||
${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0
|
||||
... Allow HTTP/2=0
|
||||
Create-Policy_Verify1 lyf-test-6 ${dict} min1=TLSv1.0 max1=TLSv1.0
|
||||
|
||||
Create_Decryption_Profile-007
|
||||
${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0
|
||||
... Allow HTTP/2=0
|
||||
Create-Policy_Verify1 lyf-test-7 ${dict} min1=TLSv1.1 max1=TLSv1.1
|
||||
|
||||
Create_Decryption_Profile-008
|
||||
${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0
|
||||
... Allow HTTP/2=0
|
||||
Create-Policy_Verify1 lyf-test-8 ${dict} min1=TLSv1.2 max1=TLSv1.2
|
||||
|
||||
Create_Decryption_Profile-009
|
||||
${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0
|
||||
... Allow HTTP/2=0
|
||||
Create-Policy_Verify1 lyf-test-9 ${dict} min1=TLSv1.3 max1=TLSv1.3
|
||||
|
||||
Create_Decryption_Profile-010
|
||||
${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=0 Mirror Client Versions=1
|
||||
... Allow HTTP/2=1
|
||||
Create-Policy_Verify1 lyf-test-10 ${dict}
|
||||
|
||||
Create_Decryption_Profile-011
|
||||
${dict} Create Dictionary Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=0 Mirror Client Versions=1
|
||||
... Allow HTTP/2=1
|
||||
Create-Policy_Verify1 lyf-test-11 ${dict} fail1=Fail-close
|
||||
|
||||
Create_Decryption_Profile-012
|
||||
${dict} Create Dictionary Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=0 Mirror Client Versions=1
|
||||
... Allow HTTP/2=1
|
||||
Create-Policy_Verify1 lyf-test-12 ${dict} fail1=Pass-through
|
||||
|
||||
Create_Decryption_Profile-013
|
||||
${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=1
|
||||
... Certificate Transparency=1 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=1 Mirror Client Versions=1
|
||||
... Allow HTTP/2=1
|
||||
Create-Policy_Verify1 lyf-test-13 ${dict}
|
||||
|
||||
Create_Decryption_Profile-014
|
||||
${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=1
|
||||
... Allow HTTP/2=1
|
||||
Create-Policy_Verify1 lyf-test-14 ${dict}
|
||||
|
||||
Create_Decryption_Profile-015
|
||||
${dict} Create Dictionary Common Name=0 Issuer=0 Self-signed=0 Expiry Date=0 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0
|
||||
... Allow HTTP/2=1
|
||||
Create-Policy_Verify1 lyf-test-15 ${dict}
|
||||
|
||||
Edit_Dercryption_Profile-16
|
||||
${dict} Create Dictionary Common Name=1 Issuer=1 Self-signed=1 Expiry Date=1 EV Certificat=1
|
||||
... Certificate Transparency=1 Mutual Authentication=1 On Protocol Errors=1 Certificate Pinning=1 Certificate Not Installed=1 Mirror Client Versions=0
|
||||
... Allow HTTP/2=0
|
||||
Create-Policy_Verify1 lyf-test-16 ${dict} fail1=Pass-through min1=SSLv3.0 max1=SSLv3.0
|
||||
Sleep 1
|
||||
${id} get text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span
|
||||
sleep 1
|
||||
${dict1} Create Dictionary Common Name=0 Issuer=0 Self-signed=1 Expiry Date=1 EV Certificat=0
|
||||
... Certificate Transparency=0 Mutual Authentication=0 On Protocol Errors=0 Certificate Pinning=0 Certificate Not Installed=0 Mirror Client Versions=0
|
||||
... Allow HTTP/2=0
|
||||
Edit_Policy_Verify id=input_list_li1 ${id} lyf-edit-test-1 ${dict1} fail1=Fail-close min1=TLSv1.2
|
||||
... max1=TLSv1.2
|
||||
48
01-TestCase/tsg_ui/ui_settings/Hijack_Files_Case.robot
Normal file
48
01-TestCase/tsg_ui/ui_settings/Hijack_Files_Case.robot
Normal file
@@ -0,0 +1,48 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui settings Hijack Files
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
|
||||
Library OperatingSystem
|
||||
|
||||
*** Test Cases ***
|
||||
Create_Hijack_Files-001
|
||||
Create-Hijack Files lyf-test-001-apk ${path}hijack_files/Create-Hijack Files-test.apk id=application/vnd.android.package-archive0
|
||||
|
||||
Create_Hijack_Files-002
|
||||
Create-Hijack Files lyf-test-002-exe ${path}hijack_files/Create-Hijack Files-test-1.exe id=application/x-msdos-program0
|
||||
|
||||
Create_Hijack_Files-003
|
||||
Create-Hijack Files lyf-test-003-gif ${path}hijack_files/Create-Hijack Files-test-2.gif id=image/gif0
|
||||
|
||||
Create_Hijack_Files-004
|
||||
Create-Hijack Files lyf-test-004-html ${path}hijack_files/Create-Hijack Files-test-3.html id=text/html0
|
||||
|
||||
Create_Hijack_Files-005
|
||||
Create-Hijack Files lyf-test-005-jpeg ${path}hijack_files/Create-Hijack Files-test-4.jpeg id=image/jpeg1
|
||||
|
||||
Create_Hijack_Files-006
|
||||
Create-Hijack Files lyf-test-006-png ${path}hijack_files/Create-Hijack Files-test-5.png id=image/png2
|
||||
|
||||
Create_Hijack_Files-007
|
||||
Create-Hijack Files lyf-test-007-svg ${path}hijack_files/Create-Hijack Files-test-6.svg id=image/svg+xml3
|
||||
|
||||
Edit_Hijack_Files-008
|
||||
Create-Hijack Files lyf-test-001-apk ${path}hijack_files/Create-Hijack Files-test.apk id=application/vnd.android.package-archive0
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/span
|
||||
Edit-Hijack Files id=input_list_li2 ${name} lyf-Edit-test-001 ${path}hijack_files\\Create-Hijack Files-test.apk id=application/vnd.android.package-archive0
|
||||
|
||||
Edit_Hijack_Files-009
|
||||
Create-Hijack Files lyf-test-001-apk ${path}hijack_files/Create-Hijack Files-test.apk id=application/vnd.android.package-archive0
|
||||
${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/span
|
||||
Edit-Hijack Files id=input_list_li1 ${id} lyf-Edit-test-002 ${path}hijack_files\\Create-Hijack Files-test.apk id=application/vnd.android.package-archive0
|
||||
|
||||
Edit_Hijack_Files-010
|
||||
Create-Hijack Files lyf-test-001-apk ${path}hijack_files/Create-Hijack Files-test.apk id=application/vnd.android.package-archive0
|
||||
${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/span
|
||||
Edit-Hijack Files id=input_list_li1 ${id} lyf-Edit-test-003 ${path}hijack_files\\Create-Hijack Files-test.apk id=application/vnd.android.package-archive0 close
|
||||
|
||||
Create_Hijack_Files-011
|
||||
Create-Hijack Files lyf-test-011-svg ${path}hijack_files/Create-Hijack Files-test-6.svg id=image/svg+xml3 close shuru
|
||||
|
||||
Create_Hijack_Files-012
|
||||
Create-Hijack Files lyf-test-011-svg ${path}hijack_files/Create-Hijack Files-test-6.svg id=image/svg+xml3 open
|
||||
42
01-TestCase/tsg_ui/ui_settings/Insert_Scripts_Case.robot
Normal file
42
01-TestCase/tsg_ui/ui_settings/Insert_Scripts_Case.robot
Normal file
@@ -0,0 +1,42 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui settings insert_scripts
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
|
||||
|
||||
*** Test Cases ***
|
||||
Create_Insert_Scripts-001
|
||||
[Tags] css
|
||||
Create-Insert Scripts lyf-test-001-css ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1]
|
||||
|
||||
Create_Insert_Scripts-002
|
||||
[Tags] js
|
||||
Create-Insert Scripts lyf-test-002-js ${path}insert_files\\Create-Insert_Scripts-test.js xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||||
|
||||
Create_Insert_Scripts-003
|
||||
[Tags] css name最小值
|
||||
Create-Insert Scripts 1 ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1]
|
||||
|
||||
Create_Insert_Scripts-004
|
||||
[Tags] css name传入超过128字符
|
||||
Create-Insert Scripts ${path}insert_files\\Create-Insert Scripts-test.css${path}insert_files\\Create-Insert Scripts-test.css${path}insert_files\\Create-Insert Scripts-test.css ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1]
|
||||
|
||||
Create_Insert_Scripts-005
|
||||
[Tags] js name最小值
|
||||
Create-Insert Scripts 1 ${path}insert_files\\Create-Insert_Scripts-test.js xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||||
|
||||
Create_Insert_Scripts-006
|
||||
[Tags] js name传入超过128字符
|
||||
Create-Insert Scripts ${path}insert_files\\Create-Insert Scripts-test.css${path}insert_files\\Create-Insert Scripts-test.css${path}insert_files\\Create-Insert Scripts-test.css ${path}insert_files\\Create-Insert_Scripts-test.js xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||||
|
||||
Edit_Insert_Scripts-007
|
||||
[Tags] css edit
|
||||
Create-Insert Scripts lyf-test-001-css ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1]
|
||||
${id} get text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr/td[1]/div/div/span
|
||||
Edit-Insert Scripts id=input_list_li1 ${id} lyf-Edit-test-001 ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1]
|
||||
|
||||
Edit_Insert_Scripts-008
|
||||
[Tags] edit js
|
||||
Create-Insert Scripts 1 ${path}insert_files\\Create-Insert Scripts-test.css xpath=/html/body/div/div[1]/div[1]/ul/li[1]
|
||||
${name} get text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||||
Edit-Insert Scripts id=input_list_li2 ${name} lyf-Edit-test-008 ${path}insert_files\\Create-Insert_Scripts-test.js xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||||
38
01-TestCase/tsg_ui/ui_settings/Response_Pages_Case.robot
Normal file
38
01-TestCase/tsg_ui/ui_settings/Response_Pages_Case.robot
Normal file
@@ -0,0 +1,38 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui settings response_pages
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
|
||||
|
||||
*** Test Cases ***
|
||||
Create_Response_pages-001
|
||||
[Tags] html
|
||||
Create-Response Pages Create-Response Pages-001 ${path}response_pages_files\\Create-Response Pages-test.html
|
||||
|
||||
Create_Response_pages-002
|
||||
[Tags] htm
|
||||
Create-Response Pages Create-Response Pages-001 ${path}response_pages_files\\Create-Response_Pages-test-2.htm
|
||||
|
||||
Create_Response_pages-003
|
||||
[Tags] name最小值
|
||||
Create-Response Pages 1 ${path}response_pages_files\\Create-Response_Pages-test-2.htm
|
||||
|
||||
Create_Response_pages-004
|
||||
[Tags] name超过128字符
|
||||
Create-Response Pages ${path}response_pages_files\\Create-Response Pages-test2.htm${path}response_pages_files\\Create-Response Pages-test2.htm${path}response_pages_files\\Create-Response Pages-test2.htm ${path}response_pages_files\\Create-Response_Pages-test-2.htm
|
||||
|
||||
Create_Response_pages-005
|
||||
[Tags] 中英俄特殊字符
|
||||
Create-Response Pages 中文+absc+моряков+@#¥%……&* ${path}response_pages_files\\Create-Response Pages-test.html
|
||||
|
||||
Edit_Response_pages-006
|
||||
[Tags] 修改+以id为查找对象
|
||||
Create-Response Pages Create-Response Pages-001 ${path}response_pages_files\\Create-Response Pages-test.html
|
||||
${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/span
|
||||
Edit-Response Pages id=input_list_li1 ${id} lyf-Edit-test-001 ${path}response_pages_files\\Create-Response Pages-test-1.html
|
||||
|
||||
Edit_Response_pages-007
|
||||
[Tags] 修改+以name为查找对象
|
||||
Create-Response Pages Create-Response Pages-001 ${path}response_pages_files\\Create-Response Pages-test.html
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span
|
||||
Edit-Response Pages id=input_list_li2 ${name} lyf-Edit-test-007 ${path}response_pages_files\\Create-Response Pages-test-1.html
|
||||
@@ -0,0 +1,22 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui settings SSL Decryption Exclusion
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
|
||||
Library OperatingSystem
|
||||
|
||||
*** Test Cases ***
|
||||
Create_SSL_Decryption_Exclusion-001
|
||||
Create-SSL Decryption Exclusion $www.jianshu.com jianshu www.jianshu.com
|
||||
|
||||
Create_SSL_Decryption_Exclusion-002
|
||||
Create-SSL Decryption Exclusion *myssl.com myssl.com myssl.com
|
||||
|
||||
Edit_SSL_Decryption_Exclusion-003
|
||||
Create-SSL Decryption Exclusion *myssl.com myssl.com myssl.com
|
||||
${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div/p/span
|
||||
Edit-SSL Decryption Exclusion id=input_list_li1 ${id} $www.jianshu.com 简书
|
||||
|
||||
Edit_SSL_Decryption_Exclusion-004
|
||||
Create-SSL Decryption Exclusion *myssl.com myssl.com myssl.com
|
||||
${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div/p/span
|
||||
Edit-SSL Decryption Exclusion id=input_list_li1 ${id} $www.jianshu.com 简xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div/p/spanxpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div/p/span书
|
||||
@@ -0,0 +1,30 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui settings Cached Intermediate Certificates
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
|
||||
Library OperatingSystem
|
||||
|
||||
*** Test Cases ***
|
||||
Search_Cached_Intermediate_Certificates-001
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||||
Sleep 2
|
||||
click xpath=//*[@id="proxyTabs"]/div/ul/li[4] #点击Cached Intermediate Certificates按钮
|
||||
Sleep 3
|
||||
${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/div/p/span
|
||||
Sleep 2
|
||||
Search-Cached Intermediate Certificates id=input_list_li1 ${id} xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[9]
|
||||
|
||||
Search_Cached_Intermediate_Certificates-002
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||||
Sleep 2
|
||||
click xpath=//*[@id="proxyTabs"]/div/ul/li[4] #点击Cached Intermediate Certificates按钮
|
||||
Sleep 3
|
||||
${sni} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/div/p/span
|
||||
Sleep 3
|
||||
Search-Cached Intermediate Certificates id=input_list_li2 ${sni} xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[9]
|
||||
@@ -0,0 +1,30 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui settings Traffic Mirror Profiles
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
|
||||
Library OperatingSystem
|
||||
|
||||
*** Test Cases ***
|
||||
Create_Traffic_Mirror_Profiles-001
|
||||
[Tags] vlan最小值
|
||||
Create-Traffic Mirror Profiles lyf-test-004-vlan xpath=/html/body/div/div[1]/div[1]/ul/li[1] 1
|
||||
|
||||
Create_Traffic_Mirror_Profiles-002
|
||||
[Tags] vlan最大值
|
||||
Create-Traffic Mirror Profiles lyf-test-002-vlan xpath=/html/body/div/div[1]/div[1]/ul/li[1] 4094
|
||||
|
||||
Create_Traffic_Mirror_Profiles-003
|
||||
[Tags] mac
|
||||
Create-Traffic Mirror Profiles lyf-test-003-mac xpath=/html/body/div/div[1]/div[1]/ul/li[2] 11:11:11:11:11:11
|
||||
|
||||
Edit_Traffic_Mirror_Profiles-004
|
||||
[Tags] mac
|
||||
Create-Traffic Mirror Profiles lyf-test-003-mac xpath=/html/body/div/div[1]/div[1]/ul/li[2] 11:11:11:11:11:11
|
||||
${id} get text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr/td[1]/div/div/span
|
||||
Edit-Traffic Mirror Profiles id=input_list_li1 ${id} lyf-Edit-test-001 xpath=/html/body/div/div[1]/div[1]/ul/li[2] 11:11:11:11:11:12
|
||||
|
||||
Edit_Traffic_Mirror_Profiles-005
|
||||
[Tags] vlan最大值
|
||||
Create-Traffic Mirror Profiles lyf-test-002-vlan xpath=/html/body/div/div[1]/div[1]/ul/li[1] 4094
|
||||
${name} get text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span
|
||||
Edit-Traffic Mirror Profiles id=input_list_li2 ${name} lyf-Edit-test-002 xpath=/html/body/div/div[1]/div[1]/ul/li[1] 11
|
||||
@@ -0,0 +1,25 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui settings Trusted Certificate Authorities
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
|
||||
Library OperatingSystem
|
||||
|
||||
*** Test Cases ***
|
||||
Create_Trusted_Certificate_Authorities-001
|
||||
import-Trusted Certificate Authorities lyf-RF-test-001 ${path}keyrings//root//tango-ca-root-01-cer.pem
|
||||
|
||||
Create_Trusted_Certificate_Authorities-002
|
||||
import-Trusted Certificate Authorities test ${path}keyrings//root//tango-ca-root-01-cer.pem
|
||||
|
||||
Create_Trusted_Certificate_Authorities-003
|
||||
import-Trusted Certificate Authorities ${path}keyrings//root//tango-ca-root-01-cer.pem${path}keyrings//root//tango-ca-root-01-cer.pem${path}keyrings//root//tango-ca-root-01-cer.pem ${path}keyrings//root//tango-ca-root-01-cer.pem
|
||||
|
||||
Edit_Trusted_Certificate_Authorities-004
|
||||
import-Trusted Certificate Authorities lyf-RF-test-001 ${path}keyrings//root//tango-ca-root-01-cer.pem
|
||||
${id} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div/p/span
|
||||
Edit-Trusted Certificate Authorities id=input_list_li1 ${id} lyf-edit-test-001 ${path}keyrings//root//tango-ca-root-01-cer.pem
|
||||
|
||||
Edit_Trusted_Certificate_Authorities-005
|
||||
import-Trusted Certificate Authorities lyf-RF-test-001 ${path}keyrings//root//tango-ca-root-01-cer.pem
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span
|
||||
Edit-Trusted Certificate Authorities id=input_list_li2 ${name} lyf-edit-test-001 ${path}keyrings//root//tango-ca-root-01-cer.pem
|
||||
1213
01-TestCase/zjj/ZJJ_ProxyPolciy-Hijack-SSL.robot
Normal file
1213
01-TestCase/zjj/ZJJ_ProxyPolciy-Hijack-SSL.robot
Normal file
File diff suppressed because it is too large
Load Diff
1213
01-TestCase/zjj/ZJJ_ProxyPolicy-Insert-SSL.robot
Normal file
1213
01-TestCase/zjj/ZJJ_ProxyPolicy-Insert-SSL.robot
Normal file
File diff suppressed because it is too large
Load Diff
997
01-TestCase/zjj/ZJJ_ProxyPolicy-Redirect.robot
Normal file
997
01-TestCase/zjj/ZJJ_ProxyPolicy-Redirect.robot
Normal file
@@ -0,0 +1,997 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Force Tags zjj tsg_adc proxy_policy
|
||||
Library OperatingSystem
|
||||
Resource ../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
Resource ../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||
Resource ../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||
Resource ../../03-Variable/AllFlowCaseVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00001
|
||||
[Tags] selfserver ip http redirect
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00001 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.ziroom.com/","code":301,"protocol":"HTTP","enforcement_ratio":0.1} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |Redirect-Http
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.1访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00002
|
||||
[Tags] selfserver ip+fqdn完整匹配 http redirect
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_fqdn_Id}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ZJJ-SecurityPolicy-Intercept-SSL-00002 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00002 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.yhd.com/","code":302,"protocol":"HTTP","enforcement_ratio":0.2} isValid=${1} appObjectIdArray=2 referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.2访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00003
|
||||
[Tags] selfserver ip+cat右匹配 http redirect
|
||||
Comment 创建cat
|
||||
${objectDict} Create Dictionary objectType=fqdn_category isValid=${1} addItemList=*node.com
|
||||
${rescode} ${object_cat_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${object_cat_Id}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ZJJ-SecurityPolicy-Intercept-SSL-00003 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00003 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.toutiao.com/ch/news_hot/","code":301,"protocol":"HTTP","enforcement_ratio":0.3} isValid=${1} appObjectIdArray=2 referenceObject=${object_cat_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.3访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00004
|
||||
[Tags] selfserver http redirect ip+url右匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*xiaozhu.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ZJJ-SecurityPolicy-Intercept-SSL-00004 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00004 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://bbs.tianya.cn/list-lookout-1.shtml","code":301,"protocol":"HTTP","enforcement_ratio":0.4} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.4访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00005
|
||||
[Tags] selfserver http redirect ip+url字串匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ZJJ-SecurityPolicy-Intercept-SSL-00005 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00005 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://kefu.ctrip.com/index","code":301,"protocol":"HTTP","enforcement_ratio":0.5} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0002.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/youtube/youtube.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.5访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00006
|
||||
[Tags] selfserver http redirect ip+url完整匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=$open.node.com/test/nationalbank/nationalbank.html
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-00006 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00006 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.booking.com/","code":302,"protocol":"HTTP","enforcement_ratio":0.6} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0003.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.6访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00007
|
||||
[Tags] selfserver http redirect ip+url左匹配
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open.node*
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-00007 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00007 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.eastmoney.com/","code":301,"protocol":"HTTP","enforcement_ratio":0.7} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.7访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00008
|
||||
[Tags] selfserver http redirect ip+请求头右匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-00008 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00008 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.iqiyi.com/","code":301,"protocol":"HTTP","enforcement_ratio":0.8} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0008.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.8访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00009
|
||||
[Tags] selfserver http redirect ip+请求头字串匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Chrome|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-00009 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00009 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://chaoshi.tmall.com/","code":302,"protocol":"HTTP","enforcement_ratio":0.9} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0008.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.9访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00010
|
||||
[Tags] selfserver http redirect ip+请求头完整匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000010 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00010 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://military.china.com/zh_cn/","code":301,"protocol":"HTTP","enforcement_ratio":1} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0008.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 1访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00011
|
||||
[Tags] selfserver http redirect ip+请求头左匹配
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Mozilla/5.0*|User-Agent
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000011 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00011 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.tiexue.net/","code":302,"protocol":"HTTP","enforcement_ratio":0.1111} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0008.bat
|
||||
... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' \ http://open.node.com
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.1111访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00012
|
||||
[Tags] selfserver http redirect ip+cookie字串匹配
|
||||
Comment 创建cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=_ym_isad=2|Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=test
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000012 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00012 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.douyu.com/","code":301,"protocol":"HTTP","enforcement_ratio":0.111111} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0012.bat
|
||||
... ELSE set variable curl -kv --cookie "*_ga=GA1.2.721078436.1587543528; _gid=GA1.2.916148851.1587543528; _gat=1; _ym_uid=1587543532244912958; _ym_d=1587543532; _ym_isad=2" --referer 'http://www.baidu.com/' \ http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.2222访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00013
|
||||
[Tags] selfserver http redirect ip+应答头右匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000013 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00013 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.fang.com/","code":301,"protocol":"HTTP","enforcement_ratio":0.2222} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.3333访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00014
|
||||
[Tags] selfserver http redirect ip+应答头字串匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000014 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00014 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.zealer.com/video?ZC_ACCESS_TOKEN=&ZC_UID=","code":302,"protocol":"HTTP","enforcement_ratio":0.3333} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0001.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/xiaozhu/xiaozhu.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.4444访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00015
|
||||
[Tags] selfserver http redirect ip+应答头完整匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$text/html; charset=UTF-8|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000015 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00015 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://stock.stockstar.com/gem/","code":302,"protocol":"HTTP","enforcement_ratio":0.5555} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0003.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/test/nationalbank/nationalbank.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.5555访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00016
|
||||
[Tags] selfserver http redirect ip+应答头左匹配
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=text/html*|Content-Type
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000016 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00016 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.kugou.com/yy/html/rank.html","code":301,"protocol":"HTTP","enforcement_ratio":0.6666} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-0002.bat
|
||||
... ELSE set variable curl -kv \ http://open.node.com/test/youtube/youtube.html
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.6666访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00017
|
||||
[Tags] selfserver http redirect ip+set-cookie右匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*HttpOnly|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000017 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00017 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.yy.com/","code":301,"protocol":"HTTP","enforcement_ratio":0.7777} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.7777访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00018
|
||||
[Tags] selfserver http redirect ip+set-cookie字串匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=Path=/tsgInterface|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000018 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00018 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.xiaohongshu.com/","code":302,"protocol":"HTTP","enforcement_ratio":0.8888} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.8888访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00019
|
||||
[Tags] selfserver http redirect ip+set-cookie完整匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=$12345678|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000019 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00019 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.zhihu.com/signin?next=%2F","code":301,"protocol":"HTTP","enforcement_ratio":0.9999} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redircet-HTTP-0017.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv \ http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.9999访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00020
|
||||
[Tags] selfserver http redirect ip+set-cookie左匹配
|
||||
Comment 创建set-cookie
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=JSESSIONID*|Set-Cookie
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000020 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00020 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.pcauto.com.cn/","code":302,"protocol":"HTTP","enforcement_ratio":0.01} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-00017.bat
|
||||
... ELSE set variable curl -kv http://open.node.com/
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.comBy
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.01访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00021
|
||||
[Tags] selfserver http redirect ip+请求体字串匹配
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000021 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00021 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"http://www.cmbchina.com/","code":301,"protocol":"HTTP","enforcement_ratio":0} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT,${object_url_Id}|TSG_FIELD_HTTP_URL
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redircet-HTTP-0017.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body"-kv http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ-ProxyPolicy-Redirect-Http-00022
|
||||
[Tags] selfserver 最大组合 http redirect
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1} addItemList=CIDR|192.168.100.5|32|0/0
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=$open.node.com
|
||||
${rescode} ${object_fqdn_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_fqdn_Id}
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=open
|
||||
${rescode} ${object_url_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_url_Id}
|
||||
Comment 创建请求头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=*Safari/537.36|User-Agent
|
||||
${rescode} ${object_rq_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_rq_Id}
|
||||
Comment 创建应答头
|
||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=charset|Content-Type
|
||||
${rescode} ${object_re_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_re_Id}
|
||||
Comment 创建请求体
|
||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test
|
||||
${rescode} ${object_by_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_by_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-SecurityPolicy-Intercept-SSL-000022 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
${policyIds} Create List ${policyId1}
|
||||
Comment 创建管控策略
|
||||
${policyDict} Create Dictionary policyName=ZJJ-ProxyPolicy-Redirect-HTTP-00022 policyType=pxy_manipulation policyDesc=autotest userTags= action=manipulation effectiveRange= userRegion={"method":"redirect","to":"https://www.yhd.com/","code":301,"protocol":"HTTP","enforcement_ratio":1} isValid=${1} appObjectIdArray=2 referenceObject=${object_fqdn_Id}|TSG_FIELD_HTTP_HOST,${object_url_Id}|TSG_FIELD_HTTP_URL,${object_rq_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_re_Id}|TSG_FIELD_HTTP_RES_HDR,${object_by_Id}|TSG_FIELD_HTTP_REQ_CONTENT,${objectId}|TSG_SECURITY_DESTINATION_ADDR
|
||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
Comment 功能端验证HTTP验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/selfserver/ProxyPolicy-Redirect-HTTP-00023.bat
|
||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/action
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connected to open.node.com
|
||||
... ELSE Create List Connected to open.node.com
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 1访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
@@ -14,7 +14,7 @@ Library json
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/responsepages
|
||||
${url} /policy/profile/decryption
|
||||
${profiledId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
@@ -63,13 +63,14 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00001
|
||||
${rescode} ${object_FQDN_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_FQDN_Id}
|
||||
|
||||
#${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":1,"cert_transparency":1,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1}
|
||||
#${protocol_version} set variable "protocol_version":{"min":"","max":"","mirror_client":1,"allow_http2":1}
|
||||
#${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
#${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
#${data} Create List ${requestbody}
|
||||
#${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
#${mirror_profile} Get From Dictionary ${response} profileId
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileDesc":"autotest_decryption_add","isValid":1,"decryption":{${dynamic_bypass},${certificate_checks},${protocol_version}}}]}
|
||||
#{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"profileDesc":"autotest"}]}}
|
||||
${data} set variable ${requestbody}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${decryption_profile} Get From Dictionary ${response} profileId
|
||||
Comment 创建拦截策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
@@ -77,8 +78,8 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00001
|
||||
... policyDesc=${caseName}
|
||||
... action=intercept
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
#... userRegion={"protocol":"SSL","keyring":123,"decryption",1,"decrypt_mirror":{"enable":1,"mirror_profile":${mirror_profile}}
|
||||
#... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
... userRegion={"protocol":"SSL","keyring":1,"decryption":${decryption_profile},"decrypt_mirror":{"enable":0,"mirror_profile":null}}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_FQDN_Id}|TSG_FIELD_SSL_SNI
|
||||
... isValid=1
|
||||
... appObjectIdArray=${3}
|
||||
@@ -97,7 +98,7 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00001
|
||||
... policyDesc=${Default_PolicyDesc}
|
||||
... action=manipulation
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.0001,"protocol":"HTTP"}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.1,"protocol":"HTTP"}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_URL_Id}|TSG_FIELD_HTTP_URL
|
||||
... isValid=1
|
||||
... appObjectIdArray=${2}
|
||||
@@ -115,7 +116,7 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00001
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/zjj/ZJJ_ProxyPolicy-Replace-00001.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=find&setCookie=set-cookie&contentType=text/html;charset=UTF-8&resBody=Response Body" https://open.node.com/action
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango Secure Gateway CA
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List schannel
|
||||
#OpenSSL SSL_connect: Connection was reset in connection toX-TG-Construct-By: tfe
|
||||
#Send failure: Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Tango Secure Gateway CA
|
||||
@@ -131,10 +132,11 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00001
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt ${starttime}
|
||||
Append To File ${path}/enforcement_ratio.txt ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt ${s}
|
||||
Append To File ${path}/enforcement_ratio.txt ${endtime}
|
||||
Append To File ${path}/enforcement_ratio.txt |Replace-SSL\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.1访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00002
|
||||
[Tags] selfserver SIP+DIP+URL
|
||||
${caseName} set variable ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00002
|
||||
@@ -180,13 +182,14 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00002
|
||||
${rescode} ${object_FQDN_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_FQDN_Id}
|
||||
|
||||
#${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":1,"cert_transparency":1,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1}
|
||||
#${protocol_version} set variable "protocol_version":{"min":"","max":"","mirror_client":1,"allow_http2":1}
|
||||
#${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
#${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
#${data} Create List ${requestbody}
|
||||
#${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
#${mirror_profile} Get From Dictionary ${response} profileId
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileDesc":"autotest_decryption_add","isValid":1,"decryption":{${dynamic_bypass},${certificate_checks},${protocol_version}}}]}
|
||||
#{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"profileDesc":"autotest"}]}}
|
||||
${data} set variable ${requestbody}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${decryption_profile} Get From Dictionary ${response} profileId
|
||||
Comment 创建拦截策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
@@ -194,8 +197,8 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00002
|
||||
... policyDesc=${caseName}
|
||||
... action=intercept
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
#... userRegion={"protocol":"SSL","keyring":123,"decryption",1,"decrypt_mirror":{"enable":1,"mirror_profile":${mirror_profile}}
|
||||
#... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
... userRegion={"protocol":"SSL","keyring":1,"decryption":${decryption_profile},"decrypt_mirror":{"enable":0,"mirror_profile":null}}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_FQDN_Id}|TSG_FIELD_SSL_SNI
|
||||
... isValid=1
|
||||
... appObjectIdArray=${3}
|
||||
@@ -214,7 +217,7 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00002
|
||||
... policyDesc=${Default_PolicyDesc}
|
||||
... action=manipulation
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.1,"protocol":"HTTP"}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.2,"protocol":"HTTP"}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_URL_Id}|TSG_FIELD_HTTP_URL
|
||||
... isValid=1
|
||||
... appObjectIdArray=${2}
|
||||
@@ -232,7 +235,7 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00002
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/zjj/ZJJ_ProxyPolicy-Replace-00001.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=find&setCookie=set-cookie&contentType=text/html;charset=UTF-8&resBody=Response Body" https://open.node.com/action
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango Secure Gateway CA
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List schannel
|
||||
#OpenSSL SSL_connect: Connection was reset in connection toX-TG-Construct-By: tfe
|
||||
#Send failure: Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Tango Secure Gateway CA
|
||||
@@ -248,10 +251,10 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00002
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt ${starttime}
|
||||
Append To File ${path}/enforcement_ratio.txt ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt ${s}
|
||||
Append To File ${path}/enforcement_ratio.txt ${endtime}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.2访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00003
|
||||
[Tags] selfserver SIP+DIP+URL
|
||||
${caseName} set variable ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00003
|
||||
@@ -297,13 +300,14 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00003
|
||||
${rescode} ${object_FQDN_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_FQDN_Id}
|
||||
|
||||
#${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":1,"cert_transparency":1,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1}
|
||||
#${protocol_version} set variable "protocol_version":{"min":"","max":"","mirror_client":1,"allow_http2":1}
|
||||
#${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
#${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
#${data} Create List ${requestbody}
|
||||
#${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
#${mirror_profile} Get From Dictionary ${response} profileId
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileDesc":"autotest_decryption_add","isValid":1,"decryption":{${dynamic_bypass},${certificate_checks},${protocol_version}}}]}
|
||||
#{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"profileDesc":"autotest"}]}}
|
||||
${data} set variable ${requestbody}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${decryption_profile} Get From Dictionary ${response} profileId
|
||||
Comment 创建拦截策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
@@ -311,8 +315,8 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00003
|
||||
... policyDesc=${caseName}
|
||||
... action=intercept
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
#... userRegion={"protocol":"SSL","keyring":123,"decryption",1,"decrypt_mirror":{"enable":1,"mirror_profile":${mirror_profile}}
|
||||
#... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
... userRegion={"protocol":"SSL","keyring":1,"decryption":${decryption_profile},"decrypt_mirror":{"enable":0,"mirror_profile":null}}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_FQDN_Id}|TSG_FIELD_SSL_SNI
|
||||
... isValid=1
|
||||
... appObjectIdArray=${3}
|
||||
@@ -331,7 +335,7 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00003
|
||||
... policyDesc=${Default_PolicyDesc}
|
||||
... action=manipulation
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.9,"protocol":"HTTP"}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.3,"protocol":"HTTP"}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_URL_Id}|TSG_FIELD_HTTP_URL
|
||||
... isValid=1
|
||||
... appObjectIdArray=${2}
|
||||
@@ -349,7 +353,7 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00003
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/zjj/ZJJ_ProxyPolicy-Replace-00001.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=find&setCookie=set-cookie&contentType=text/html;charset=UTF-8&resBody=Response Body" https://open.node.com/action
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango Secure Gateway CA
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List schannel
|
||||
#OpenSSL SSL_connect: Connection was reset in connection toX-TG-Construct-By: tfe
|
||||
#Send failure: Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Tango Secure Gateway CA
|
||||
@@ -365,10 +369,10 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00003
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt ${starttime}
|
||||
Append To File ${path}/enforcement_ratio.txt ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt ${s}
|
||||
Append To File ${path}/enforcement_ratio.txt ${endtime}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.3访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00004
|
||||
[Tags] selfserver SIP+DIP+URL
|
||||
${caseName} set variable ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00004
|
||||
@@ -414,13 +418,14 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00004
|
||||
${rescode} ${object_FQDN_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_FQDN_Id}
|
||||
|
||||
#${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":1,"cert_transparency":1,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1}
|
||||
#${protocol_version} set variable "protocol_version":{"min":"","max":"","mirror_client":1,"allow_http2":1}
|
||||
#${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
#${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
#${data} Create List ${requestbody}
|
||||
#${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
#${mirror_profile} Get From Dictionary ${response} profileId
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileDesc":"autotest_decryption_add","isValid":1,"decryption":{${dynamic_bypass},${certificate_checks},${protocol_version}}}]}
|
||||
#{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"profileDesc":"autotest"}]}}
|
||||
${data} set variable ${requestbody}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${decryption_profile} Get From Dictionary ${response} profileId
|
||||
Comment 创建拦截策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
@@ -428,8 +433,8 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00004
|
||||
... policyDesc=${caseName}
|
||||
... action=intercept
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":0,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
#... userRegion={"protocol":"SSL","keyring":123,"decryption",1,"decrypt_mirror":{"enable":1,"mirror_profile":${mirror_profile}}
|
||||
#... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
... userRegion={"protocol":"SSL","keyring":1,"decryption":${decryption_profile},"decrypt_mirror":{"enable":0,"mirror_profile":null}}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_FQDN_Id}|TSG_FIELD_SSL_SNI
|
||||
... isValid=1
|
||||
... appObjectIdArray=${3}
|
||||
@@ -448,7 +453,7 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00004
|
||||
... policyDesc=${Default_PolicyDesc}
|
||||
... action=manipulation
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.9999,"protocol":"HTTP"}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.4,"protocol":"HTTP"}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_URL_Id}|TSG_FIELD_HTTP_URL
|
||||
... isValid=1
|
||||
... appObjectIdArray=${2}
|
||||
@@ -466,7 +471,7 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00004
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/zjj/ZJJ_ProxyPolicy-Replace-00001.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=find&setCookie=set-cookie&contentType=text/html;charset=UTF-8&resBody=Response Body" https://open.node.com/action
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango Secure Gateway CA
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List schannel
|
||||
#OpenSSL SSL_connect: Connection was reset in connection toX-TG-Construct-By: tfe
|
||||
#Send failure: Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Tango Secure Gateway CA
|
||||
@@ -481,9 +486,14 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00004
|
||||
${endtime} Get Time
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.4访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00005
|
||||
[Tags] selfserver SIP+DIP+URL
|
||||
${caseName} set variable ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00005
|
||||
${caseName} set variable ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00006
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=ip
|
||||
@@ -526,13 +536,14 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00005
|
||||
${rescode} ${object_FQDN_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_FQDN_Id}
|
||||
|
||||
#${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":1,"cert_transparency":1,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1}
|
||||
#${protocol_version} set variable "protocol_version":{"min":"","max":"","mirror_client":1,"allow_http2":1}
|
||||
#${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
#${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
#${data} Create List ${requestbody}
|
||||
#${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
#${mirror_profile} Get From Dictionary ${response} profileId
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileDesc":"autotest_decryption_add","isValid":1,"decryption":{${dynamic_bypass},${certificate_checks},${protocol_version}}}]}
|
||||
#{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"profileDesc":"autotest"}]}}
|
||||
${data} set variable ${requestbody}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${decryption_profile} Get From Dictionary ${response} profileId
|
||||
Comment 创建拦截策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
@@ -540,8 +551,126 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00005
|
||||
... policyDesc=${caseName}
|
||||
... action=intercept
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":0.5,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
#... userRegion={"protocol":"SSL","keyring":123,"decryption",1,"decrypt_mirror":{"enable":1,"mirror_profile":${mirror_profile}}
|
||||
#... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
... userRegion={"protocol":"SSL","keyring":1,"decryption":${decryption_profile},"decrypt_mirror":{"enable":0,"mirror_profile":null}}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_FQDN_Id}|TSG_FIELD_SSL_SNI
|
||||
... isValid=1
|
||||
... appObjectIdArray=${3}
|
||||
... userTags=${Default_UserTags}
|
||||
... doLog=${Default_DoLog}
|
||||
... scheduleId=${Default_ScheduleId}
|
||||
|
||||
${rescode} ${securitypolicyId} AddPolicy2 ${1} ${policyDict}
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${securitypolicyId}]}
|
||||
|
||||
|
||||
Comment 创建带有比例的替换策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
... policyType=pxy_manipulation
|
||||
... policyDesc=${Default_PolicyDesc}
|
||||
... action=manipulation
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.5,"protocol":"HTTP"}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_URL_Id}|TSG_FIELD_HTTP_URL
|
||||
... isValid=1
|
||||
... appObjectIdArray=${2}
|
||||
... userTags=${Default_UserTags}
|
||||
... doLog=${Default_DoLog}
|
||||
... scheduleId=${Default_ScheduleId}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
${s} Convert to String ${policyId}
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${securitypolicyId}]} {"policyType":"pxy_manipulation","policyIds":[${policyId}]}
|
||||
#{"objectId":5668,"protocolFields":["TSG_FIELD_HTTP_HOST"]},{"objectId":7732,"protocolFields":["TSG_FIELD_HTTP_URL"]}]}
|
||||
#
|
||||
#${disablePolciy} set variable {"opAction":"enable","policyList":[{"policyType":"pxy_manipulation","policyId":[${policyId}]}]}
|
||||
#EditPolicy ${disablePolciy}
|
||||
Comment 功能端验证SSL验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/zjj/ZJJ_ProxyPolicy-Replace-00001.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=find&setCookie=set-cookie&contentType=text/html;charset=UTF-8&resBody=Response Body" https://open.node.com/action
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List schannel
|
||||
#OpenSSL SSL_connect: Connection was reset in connection toX-TG-Construct-By: tfe
|
||||
#Send failure: Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Tango Secure Gateway CA
|
||||
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
log endfor
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.5访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00006
|
||||
[Tags] selfserver SIP+DIP+URL
|
||||
${caseName} set variable ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00006
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=ip
|
||||
... isValid=1
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${caseName}_IPobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=CIDR|192.168.100.5|32|0/0&${Default_AddItem_ServerIpFormat}|${Default_AddItem_ServerIp1}|${Default_AddItem_ServerIp2}|${Default_AddItem_ServerPort}|${Default_AddItem_IsInitialize}|${Default_AddItem_ItemName}|${Default_AddItem_ItemDesc}
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
|
||||
#创建url
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=url
|
||||
... isValid=${1}
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${caseName}_URLobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=open.node.com/action
|
||||
${rescode} ${object_URL_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_URL_Id}
|
||||
|
||||
#创建url
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=fqdn
|
||||
... isValid=${1}
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${caseName}_fqdnobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=$open.node.com
|
||||
${rescode} ${object_FQDN_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_FQDN_Id}
|
||||
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileDesc":"autotest_decryption_add","isValid":1,"decryption":{${dynamic_bypass},${certificate_checks},${protocol_version}}}]}
|
||||
#{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"profileDesc":"autotest"}]}}
|
||||
${data} set variable ${requestbody}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${decryption_profile} Get From Dictionary ${response} profileId
|
||||
Comment 创建拦截策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
... policyType=tsg_security
|
||||
... policyDesc=${caseName}
|
||||
... action=intercept
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
#... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
... userRegion={"protocol":"SSL","keyring":1,"decryption":${decryption_profile},"decrypt_mirror":{"enable":0,"mirror_profile":null}}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_FQDN_Id}|TSG_FIELD_SSL_SNI
|
||||
... isValid=1
|
||||
... appObjectIdArray=${3}
|
||||
@@ -578,7 +707,7 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00005
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/zjj/ZJJ_ProxyPolicy-Replace-00001.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=find&setCookie=set-cookie&contentType=text/html;charset=UTF-8&resBody=Response Body" https://open.node.com/action
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango Secure Gateway CA
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List schannel
|
||||
#OpenSSL SSL_connect: Connection was reset in connection toX-TG-Construct-By: tfe
|
||||
#Send failure: Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Tango Secure Gateway CA
|
||||
@@ -594,21 +723,254 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00005
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
log 22${logsize}
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt ${starttime}
|
||||
Append To File ${path}/enforcement_ratio.txt ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt ${s}
|
||||
Append To File ${path}/enforcement_ratio.txt ${endtime}
|
||||
#TestLogSize
|
||||
#日志验证security_event_log
|
||||
#GetLogListSize proxy_event_log 2020-04-28 09:40:00 2020-04-28 10:00:00 192.168.50.6 4837 ssl_sni httpdns.n.netease.co
|
||||
#${logsize} GetLogListSize security_event_log 2020-04-28 09:40:00 2020-04-28 10:00:00 192.168.50.6 4837 ssl_sni httpdns.n.netease.co
|
||||
#log 11${logsize}
|
||||
#${logsize} GetLogCount security_event_log 2020-04-28 09:40:00 2020-04-28 10:00:00 192.168.50.6 4837 ssl_sni httpdns.n.netease.co
|
||||
#log 22${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.9访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000010
|
||||
[Tags] selfserver SIP+DIP+URL
|
||||
${caseName} set variable ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000010
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=ip
|
||||
... isValid=1
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${caseName}_IPobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=CIDR|192.168.100.5|32|0/0&${Default_AddItem_ServerIpFormat}|${Default_AddItem_ServerIp1}|${Default_AddItem_ServerIp2}|${Default_AddItem_ServerPort}|${Default_AddItem_IsInitialize}|${Default_AddItem_ItemName}|${Default_AddItem_ItemDesc}
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
|
||||
#创建url
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=url
|
||||
... isValid=${1}
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${caseName}_URLobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=open.node.com/action
|
||||
${rescode} ${object_URL_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_URL_Id}
|
||||
|
||||
#创建url
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=fqdn
|
||||
... isValid=${1}
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${caseName}_fqdnobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=$open.node.com
|
||||
${rescode} ${object_FQDN_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_FQDN_Id}
|
||||
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileDesc":"autotest_decryption_add","isValid":1,"decryption":{${dynamic_bypass},${certificate_checks},${protocol_version}}}]}
|
||||
#{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"profileDesc":"autotest"}]}}
|
||||
${data} set variable ${requestbody}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${decryption_profile} Get From Dictionary ${response} profileId
|
||||
Comment 创建拦截策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
... policyType=tsg_security
|
||||
... policyDesc=${caseName}
|
||||
... action=intercept
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
#... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":0,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
... userRegion={"protocol":"SSL","keyring":1,"decryption":${decryption_profile},"decrypt_mirror":{"enable":0,"mirror_profile":null}}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_FQDN_Id}|TSG_FIELD_SSL_SNI
|
||||
... isValid=1
|
||||
... appObjectIdArray=${3}
|
||||
... userTags=${Default_UserTags}
|
||||
... doLog=${Default_DoLog}
|
||||
... scheduleId=${Default_ScheduleId}
|
||||
|
||||
${rescode} ${securitypolicyId} AddPolicy2 ${1} ${policyDict}
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${securitypolicyId}]}
|
||||
|
||||
|
||||
Comment 创建带有比例的替换策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
... policyType=pxy_manipulation
|
||||
... policyDesc=${Default_PolicyDesc}
|
||||
... action=manipulation
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.9999,"protocol":"HTTP"}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_URL_Id}|TSG_FIELD_HTTP_URL
|
||||
... isValid=1
|
||||
... appObjectIdArray=${2}
|
||||
... userTags=${Default_UserTags}
|
||||
... doLog=${Default_DoLog}
|
||||
... scheduleId=${Default_ScheduleId}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
${s} Convert to String ${policyId}
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${securitypolicyId}]} {"policyType":"pxy_manipulation","policyIds":[${policyId}]}
|
||||
#{"objectId":5668,"protocolFields":["TSG_FIELD_HTTP_HOST"]},{"objectId":7732,"protocolFields":["TSG_FIELD_HTTP_URL"]}]}
|
||||
#
|
||||
#${disablePolciy} set variable {"opAction":"enable","policyList":[{"policyType":"pxy_manipulation","policyId":[${policyId}]}]}
|
||||
#EditPolicy ${disablePolciy}
|
||||
Comment 功能端验证SSL验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/zjj/ZJJ_ProxyPolicy-Replace-00001.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=find&setCookie=set-cookie&contentType=text/html;charset=UTF-8&resBody=Response Body" https://open.node.com/action
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List schannel
|
||||
#OpenSSL SSL_connect: Connection was reset in connection toX-TG-Construct-By: tfe
|
||||
#Send failure: Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Tango Secure Gateway CA
|
||||
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
log endfor
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
log 22${logsize}
|
||||
|
||||
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.9999访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000011
|
||||
[Tags] selfserver SIP+DIP+URL
|
||||
${caseName} set variable ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000011
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=ip
|
||||
... isValid=1
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${caseName}_IPobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=CIDR|192.168.100.5|32|0/0&${Default_AddItem_ServerIpFormat}|${Default_AddItem_ServerIp1}|${Default_AddItem_ServerIp2}|${Default_AddItem_ServerPort}|${Default_AddItem_IsInitialize}|${Default_AddItem_ItemName}|${Default_AddItem_ItemDesc}
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectids} set Variable ${objectId}
|
||||
|
||||
#创建url
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=url
|
||||
... isValid=${1}
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${caseName}_URLobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=open.node.com/action
|
||||
${rescode} ${object_URL_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_URL_Id}
|
||||
|
||||
#创建url
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=fqdn
|
||||
... isValid=${1}
|
||||
... objectSubType=${Default_ObjectSubType}
|
||||
... isInitialize=${Default_IsInitialize}
|
||||
... isExclusion=${Default_IsExclusion}
|
||||
... objectName=${caseName}_fqdnobject
|
||||
... objectDesc=${Default_ObjectDesc}
|
||||
... subObjectIds=${Default_SubObjectIds}
|
||||
... addItemList=$open.node.com
|
||||
${rescode} ${object_FQDN_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_FQDN_Id}
|
||||
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"}
|
||||
${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileDesc":"autotest_decryption_add","isValid":1,"decryption":{${dynamic_bypass},${certificate_checks},${protocol_version}}}]}
|
||||
#{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"profileDesc":"autotest"}]}}
|
||||
${data} set variable ${requestbody}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${decryption_profile} Get From Dictionary ${response} profileId
|
||||
Comment 创建拦截策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
... policyType=tsg_security
|
||||
... policyDesc=${caseName}
|
||||
... action=intercept
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
#... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":0.5,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
... userRegion={"protocol":"SSL","keyring":1,"decryption":${decryption_profile},"decrypt_mirror":{"enable":0,"mirror_profile":null}}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_FQDN_Id}|TSG_FIELD_SSL_SNI
|
||||
... isValid=1
|
||||
... appObjectIdArray=${3}
|
||||
... userTags=${Default_UserTags}
|
||||
... doLog=${Default_DoLog}
|
||||
... scheduleId=${Default_ScheduleId}
|
||||
|
||||
${rescode} ${securitypolicyId} AddPolicy2 ${1} ${policyDict}
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${securitypolicyId}]}
|
||||
|
||||
|
||||
Comment 创建带有比例的替换策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
... policyType=pxy_manipulation
|
||||
... policyDesc=${Default_PolicyDesc}
|
||||
... action=manipulation
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":1,"protocol":"HTTP"}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_URL_Id}|TSG_FIELD_HTTP_URL
|
||||
... isValid=1
|
||||
... appObjectIdArray=${2}
|
||||
... userTags=${Default_UserTags}
|
||||
... doLog=${Default_DoLog}
|
||||
... scheduleId=${Default_ScheduleId}
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
${s} Convert to String ${policyId}
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${securitypolicyId}]} {"policyType":"pxy_manipulation","policyIds":[${policyId}]}
|
||||
#{"objectId":5668,"protocolFields":["TSG_FIELD_HTTP_HOST"]},{"objectId":7732,"protocolFields":["TSG_FIELD_HTTP_URL"]}]}
|
||||
#
|
||||
#${disablePolciy} set variable {"opAction":"enable","policyList":[{"policyType":"pxy_manipulation","policyId":[${policyId}]}]}
|
||||
#EditPolicy ${disablePolciy}
|
||||
Comment 功能端验证SSL验证
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/zjj/ZJJ_ProxyPolicy-Replace-00001.bat
|
||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=find&setCookie=set-cookie&contentType=text/html;charset=UTF-8&resBody=Response Body" https://open.node.com/action
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List schannel
|
||||
#OpenSSL SSL_connect: Connection was reset in connection toX-TG-Construct-By: tfe
|
||||
#Send failure: Connection was reset Tango Secure Gateway CA
|
||||
... ELSE Create List Tango Secure Gateway CA
|
||||
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
:FOR ${n} IN RANGE 1000
|
||||
SystemCommands ${commandstr} ${stringlist}
|
||||
END
|
||||
log endfor
|
||||
Sleep ${policyLogVerificationSleepSeconds}s
|
||||
${endtime} Get Time
|
||||
${logsize} GetLogCount proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
log 22${logsize}
|
||||
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 1访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000012
|
||||
[Tags] selfserver SIP+DIP+URL+ResHeader+ReqHeader
|
||||
|
||||
${caseName} set variable ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-00002
|
||||
${caseName} set variable ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000012
|
||||
Comment 创建目标IP
|
||||
${objectDict} Create Dictionary
|
||||
... objectType=ip
|
||||
@@ -665,6 +1027,14 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000012
|
||||
${rescode} ${object_ReqH_Id} AddObject2 ${1} ${objectDict}
|
||||
${objectids} Catenate SEPARATOR=, ${objectids} ${object_ReqH_Id}
|
||||
|
||||
${dynamic_bypass} set variable "dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1}
|
||||
${protocol_version} set variable "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
${certificate_checks} set variable "certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}
|
||||
${requestbody} set variable {"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","profileDesc":"autotest_decryption_add","isValid":1,"decryption":{${dynamic_bypass},${certificate_checks},${protocol_version}}}]}
|
||||
#{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":1,"profileDesc":"autotest"}]}}
|
||||
${data} set variable ${requestbody}
|
||||
${response} CreatePolicyFileNoFile ${url} ${data}
|
||||
${decryption_profile} Get From Dictionary ${response} profileId
|
||||
Comment 创建拦截策略
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
@@ -672,7 +1042,8 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000012
|
||||
... policyDesc=${caseName}
|
||||
... action=intercept
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
#... userRegion={"protocol":"SSL","protocol_version":{"allow_http2":1,"min":"ssl3","max":"tls13","mirror_client":1},"dynamic_bypass":{"mutual_authentication":1,"cert_pinning":1,"cert_transparency":0,"protocol_errors":1,"ev_cert":0},"decrypt_mirror":{"enable":0},"certificate_checks":{"fail_action":"pass-through","approach":{"self-signed":1,"expiration":1,"cn":1,"issuer":1}},"keyring":1}
|
||||
... userRegion={"protocol":"SSL","keyring":1,"decryption":${decryption_profile},"decrypt_mirror":{"enable":0,"mirror_profile":null}}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR
|
||||
... isValid=1
|
||||
... appObjectIdArray=${2},${3}
|
||||
@@ -690,7 +1061,7 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000012
|
||||
... policyDesc=${caseName}
|
||||
... action=manipulation
|
||||
... effectiveRange=${Default_EffectiveRange}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find汉字 результатом манипуляций","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.1,"protocol":"HTTP"}
|
||||
... userRegion={"method":"replace","rules":[{"search_in":"http_req_body","find":"find汉字 результатом манипуляций","replace_with":"replace"},{"search_in":"http_res_body","find":"replace","replace_with":"replacetest"}],"enforcement_ratio":0.111111,"protocol":"HTTP"}
|
||||
... referenceObject=${objectId}|TSG_SECURITY_DESTINATION_ADDR,${object_URL_Id}|TSG_FIELD_HTTP_URL,${object_ReqH_Id}|TSG_FIELD_HTTP_REQ_HDR,${object_ResH_Id}|TSG_FIELD_HTTP_RES_HDR
|
||||
... isValid=1
|
||||
... appObjectIdArray=${2}
|
||||
@@ -710,10 +1081,10 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000012
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${path}/zjj/ZJJ_ProxyPolicy-Replace-00002.bat
|
||||
... ELSE set variable curl -kv --cookie "JSESSIONID=976F28F6C1A5B803B0CDF5FF3E1D2725" -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=find汉字 результатом манипуляций&setCookie=JSESSIONID=976F28F6C1A5B803B0CDF5FF3E1D2725&contentType=text/html;charset=UTF-8&resBody=Response Body" https://open.node.com/action
|
||||
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango Secure Gateway CA replacetest
|
||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List schannel
|
||||
#OpenSSL SSL_connect: Connection was reset in connection to
|
||||
#Send failure: Connection was reset
|
||||
... ELSE Create List Tango Secure Gateway CA replacetest
|
||||
... ELSE Create List Tango Secure Gateway CA
|
||||
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
@@ -722,9 +1093,10 @@ ZJJ_ProxyPolicy-Replace-ResbodyReqbocy-000012
|
||||
${endtime} Get Time
|
||||
#日志验证
|
||||
GetLogList security_event_log ${starttime} ${endtime} ${testClentIP} ${s} ssl_sni open.node.com
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt ${starttime}
|
||||
Append To File ${path}/enforcement_ratio.txt ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt ${s}
|
||||
Append To File ${path}/enforcement_ratio.txt ${endtime}
|
||||
|
||||
${logsize} Convert to String ${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt |-starttime:|${starttime}\r\n
|
||||
Append To File ${path}/enforcement_ratio.txt 0.111111访问1000次logsize:|${logsize}
|
||||
Append To File ${path}/enforcement_ratio.txt s:|${s}
|
||||
Append To File ${path}/enforcement_ratio.txt endtime:|${endtime}
|
||||
|
||||
@@ -37,3 +37,27 @@ SystemCommand
|
||||
${rescode} Set Variable 200
|
||||
log ${rescode}
|
||||
[Return] ${rescode}
|
||||
|
||||
|
||||
SystemCommandReturnCompare
|
||||
#执行命令并比对命令返回结果 需要执行的系统命令 命令返回结果要包含的字符串列表 命令返回结果不能包含的字符串列表
|
||||
[Arguments] ${commandstr} ${stringlist} ${stringlistnotin}
|
||||
log toSystemCommand_SystemCommandTest
|
||||
${commandreturn} OperatingSystem.Run ${commandstr}
|
||||
Append To File ${path}/write_file.txt ${commandstr}
|
||||
Append To File ${path}/write_file.txt %%%%%%%%%%%%%%newbat
|
||||
Append To File ${path}/write_file.txt ${commandreturn}
|
||||
#${commandreturn} Set Variable abcdeConnection was reset
|
||||
${listlenth}= Get Length ${stringlist}
|
||||
FOR ${var} IN RANGE ${listlenth}
|
||||
log ${var}
|
||||
Should Contain ${commandreturn} ${stringlist}[${var}]
|
||||
END
|
||||
${listnotin}= Get Length ${stringlistnotin}
|
||||
FOR ${varn} IN RANGE ${listnotin}
|
||||
log ${varn}
|
||||
Should Not Contain ${commandreturn} ${stringlistnotin}[${varn}]
|
||||
END
|
||||
${rescode} Set Variable 200
|
||||
log ${rescode}
|
||||
[Return] ${rescode}
|
||||
|
||||
@@ -6,7 +6,8 @@ Library Collections
|
||||
|
||||
*** Keywords ***
|
||||
GetApi
|
||||
[Arguments] ${apiName} ${url} ${startTime}=${None} ${endTime}=${None} ${limit}=50000 ${statisticTime}=${None} ${statisticsUnit}=${None} ${timeGranularity}=${None} ${policy_id}=${None} ${ip}=${None}
|
||||
[Arguments] ${apiName} ${url} ${startTime}=${None} ${endTime}=${None} ${limit}=50000 ${statisticTime}=${None} ${statisticsUnit}=${None} ${timeGranularity}=${None} ${policy_id}=${None} ${ip}=${None} ${device_ids}=${None} ${policy_ids}=${None} ${orderBy}=${None}
|
||||
log policy_ids:${policy_ids}
|
||||
#拼接查询条件
|
||||
${strstrartTime}= run keyword if '${startTime}'!='${None}' Set Variable startTime=${startTime}&
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
@@ -20,11 +21,21 @@ GetApi
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${strtimeGranularity}= run keyword if '${timeGranularity}'!='${None}' Set Variable timeGranularity=${timeGranularity}&
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${strpolicy_id} run keyword if '${policy_id}'!='${None}' Set Variable policy_id=${policy_id}&
|
||||
${strpolicy_id}= run keyword if '${policy_id}'!='${None}' Set Variable policy_id=${policy_id}&
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${strip} run keyword if '${ip}'!='${None}' Set Variable ip=${ip}&
|
||||
${strip}= run keyword if '${ip}'!='${None}' Set Variable ip=${ip}&
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${condition} catenate SEPARATOR= ${strstrartTime} ${strendTime} ${strstatisticTime} ${strlimit} ${strstatisticsUnit} ${strtimeGranularity} ${strpolicy_id} ${strip}
|
||||
${strdevice_ids}= run keyword if '${device_ids}'!='${None}' Set Variable device_ids=${device_ids}&
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${strpolicy_ids}= run keyword if '${policy_ids}'!='${None}' Set Variable policy_ids=${policy_ids}&
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${strorderBy}= run keyword if '${orderBy}'!='${None}' Set Variable orderBy=${orderBy}&
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
#替换policy_id为policyId
|
||||
${strpolicy_id}= run keyword if '${apiName}'=='domain_resource' replace string ${strpolicy_id} policy_id policyId
|
||||
... ELSE Set Variable ${strpolicy_id}
|
||||
#bifang请求信息
|
||||
${condition} catenate SEPARATOR= ${strstrartTime} ${strendTime} ${strstatisticTime} ${strlimit} ${strstatisticsUnit} ${strtimeGranularity} ${strpolicy_id} ${strip} ${strdevice_ids} ${strpolicy_ids} ${strorderBy}
|
||||
#创建请求信息
|
||||
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded Authorization=${token}
|
||||
Create Session api http://${host}:${port}/${version}
|
||||
@@ -45,15 +56,25 @@ GetApi
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${strtimeGranularity}= run keyword if '${timeGranularity}'!='${None}' Set Variable timeGranularity=${timeGranularity} and
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${strpolicy_id} run keyword if '${policy_id}'!='${None}' Set Variable policy_id=${policy_id} and
|
||||
${strpolicy_id}= run keyword if '${policy_id}'!='${None}' Set Variable policy_id=${policy_id} and
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${strip} run keyword if '${ip}'!='${None}' Set Variable ip=${ip} and
|
||||
${strip}= run keyword if '${ip}'!='${None}' Set Variable ip=${ip} and
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
${strdevice_ids}= run keyword if '${device_ids}'!='${None}' Set Variable device_ids=${device_ids} and
|
||||
... ELSE Set Variable ${EMPTY}
|
||||
#sql拼接 ${where}
|
||||
${sqlwhere} catenate ${strstrartTime} ${strendTime} ${strstatisticTime} ${strstatisticsUnit} ${strtimeGranularity} ${strpolicy_id} ${strip}
|
||||
${sqlwhere} catenate ${strstrartTime} ${strendTime} ${strstatisticTime} ${strstatisticsUnit} ${strtimeGranularity} ${strpolicy_id} ${strip} ${strdevice_ids}
|
||||
${strippedwhere}= Strip String ${sqlwhere} mode=right
|
||||
#截取最后一个and
|
||||
${where}= Get Substring ${strippedwhere} \ -4
|
||||
#injectionstatics 时间粒度默认为30
|
||||
${timeGranularity}= run keyword if '${timeGranularity}'=="${None}" and '${apiName}'=="injectionstatics" set variable 30
|
||||
... ELSE set variable ${timeGranularity}
|
||||
log ${apiName}
|
||||
#topn排序依据: \ sessions、totalbytes、totalpackets
|
||||
${TotalOrderBy}= run keyword if '${orderBy}'=="bytes" and '${apiName}'=="topn" set variable totalBytes
|
||||
... ELSE IF '${orderBy}'=="packets" and '${apiName}'=="topn" set variable totalPackets
|
||||
... ELSE IF '${orderBy}'=="sessions" and '${apiName}'=="topn" set variable sessions
|
||||
#BigData
|
||||
${sql}= run keyword if '${apiName}'=="country" Set Variable SELECT country, APPROX_COUNT_DISTINCT_DS_HLL(ip_object) as num FROM source_country_ip_num_log where ${where} group by country order by num desc limit ${limit}
|
||||
... ELSE IF '${apiName}'=="domain" Set Variable SELECT domain, protocol_type, ip_num, session_num \ FROM top_domain_recommend_daily_log where __time = '${statisticTime}'
|
||||
@@ -64,7 +85,12 @@ GetApi
|
||||
... ELSE IF '${apiName}'=="traffic" and '${statisticsUnit}'=='${None}' Set Variable select sum(total_in_bytes) as trafficInBytes, sum(total_out_bytes) as trafficOutBytes, \ sum(total_in_bytes+total_out_bytes) as trafficTotalBytes, sum(total_in_packets) as trafficInPackets,sum(total_out_packets) as trafficOutPackets,sum(total_in_packets+total_out_packets) as trafficTotalPackets, sum(new_conn_num) as sessions from traffic_metrics_log where __time >= '${startTime}' and __time < '${endTime}'
|
||||
... ELSE IF '${apiName}'=="ip_correlation_domain" and '${ip}'!='${None}' Set Variable SELECT \ ip, FROM_UNIXTIME(max(stat_time)) as last_time, FROM_UNIXTIME(min(stat_time)) as first_time, groupUniqArrayMerge(domain_list) as domain_list, groupUniqArrayMerge(port_list) as port_list \ FROM security_ip_info where \ stat_time >= '${startTime}' and stat_time < '${endTime}' and ip='${ip}' group by ip
|
||||
... ELSE IF '${apiName}'=="ip_correlation_domain" and ${ip}==${None} Set Variable SELECT ip,FROM_UNIXTIME(max(stat_time)) as last_time, FROM_UNIXTIME(min(stat_time)) as first_time, groupUniqArrayMerge(domain_list) as domain_list, groupUniqArrayMerge(port_list) as port_list \ FROM security_ip_info where \ stat_time >= '${startTime}' and stat_time < '${endTime}' \ group by ip
|
||||
... ELSE IF '${apiName}'=="hijack_srcip_num" Set Variable SELECT policy_id,country,location, APPROX_COUNT_DISTINCT_DS_HLL(ip_object) as num \ FROM proxy_event_hits_log where \ __time >='${startTime}' and __time <'${endTime}' and policy_id in \ ( ${policy_ids} ) group by policy_id , country,location order by num desc
|
||||
... ELSE IF '${apiName}'=="hijack_srcip_location" Set Variable select ip, IP_TO_CITY(ip) as location, IP_TO_GEO(ip) as geo from (SELECT policy_id, arrayJoin(groupUniqArrayMerge(ip_list)) as ip FROM proxy_ip_info where \ stat_time >= '${startTime}' and stat_time < '${endTime}' and policy_id = ${policy_id} group by policy_id )
|
||||
... ELSE IF '${apiName}'=="domain_resource" Set Variable SELECT \ domain, groupUniqArrayMerge(ip_list) as ip_list, groupUniqArrayMerge(cdn_list) as cdn_list, groupUniqArrayMerge(protocol_type_list) as protocol_type_list, groupUniqArrayMerge(port_list) as port_list \ FROM security_website_domain_info where \ stat_time >= '${startTime}' and stat_time < '${endTime}' and policy_id=${policy_id} group by domain
|
||||
... ELSE IF '${apiName}'=="injectionstatistics" Set Variable select DATE_FORMAT(FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(__time)/${timeGranularity})*${timeGranularity}),'%Y-%m-%d %H:%i:%s') as stat_time, \ sum(bytes) as bytes from injection_metrics_log \ where __time >= '${startTime}' and __time < '${endTime}' group by DATE_FORMAT(FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(__time)/${timeGranularity})*${timeGranularity}),'%Y-%m-%d %H:%i:%s') limit ${limit}
|
||||
... ELSE IF '${apiName}'=="topn" Set Variable select domain,sum(session_num) as sessions,sum(c2s_byte_num) as sentBytes,sum(s2c_byte_num) as receivedBytes,sum(c2s_byte_num+s2c_byte_num) as totalBytes,sum(c2s_pkt_num) as sentPackets,sum(s2c_pkt_num) as receivedPackets,sum(c2s_pkt_num+s2c_pkt_num) as totalPackets from top_website_domain_log where __time >= '${startTime}' \ and __time < '${endTime}' \ and order_by='${orderBy}' \ group by domain order by ${TotalOrderBy} desc limit ${limit}
|
||||
log ${sql}
|
||||
log sql------------${sql}
|
||||
#traffic二次请求sql
|
||||
${sql2}= run keyword if '${apiName}'=='traffic' SplicingTrafficSql ${apiName} ${startTime} ${endTime} statisticsUnit=${statisticsUnit} timeGranularity=${timeGranularity} limit=${limit}
|
||||
@@ -82,7 +108,7 @@ GetApi
|
||||
... AND Should Be Equal As Strings ${bigdata2}[status] 200
|
||||
#traffic二次请求json拼接与毕方一致
|
||||
${bigdataTraffic}= run keyword if '${apiName}'=="traffic" SplicingTrafficJson ${bigdata} ${bigdata2}
|
||||
${bifanglist} run keyword if '${apiName}'=="ip_correlation_domain" set variable ${bifang['data']['list']['list']}
|
||||
${bifanglist} run keyword if '${apiName}'=="ip_correlation_domain" \ or '${apiName}'=='domain_resource' set variable ${bifang['data']['list']['list']}
|
||||
... ELSE IF '${apiName}'=="traffic" set variable ${bifang['data']}
|
||||
... ELSE set variable ${bifang['data']['list']}
|
||||
${bigdatalist} run keyword if '${apiName}'=="traffic" set variable ${bigdataTraffic}
|
||||
@@ -96,7 +122,7 @@ GetApi
|
||||
BigData
|
||||
[Arguments] ${sql}
|
||||
#创建请求信息
|
||||
Create Session api http://192.168.40.224:9999
|
||||
Create Session api http://192.168.40.186:9999
|
||||
#发送请求
|
||||
${remoteResponse}= Get Request api ?query=${sql}
|
||||
[Return] ${remoteResponse}
|
||||
@@ -206,3 +232,35 @@ SplicingTrafficSql
|
||||
${where}= Get Substring ${strippedwhere} \ -1
|
||||
${sql2} catenate select DATE_FORMAT(FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(__time)/${timeGranularity})*${timeGranularity}),'%Y-%m-%d %H:%i:%s') as statisticsTime, ${where} from traffic_metrics_log where __time >= '${startTime}' and __time < '${endTime}' group by DATE_FORMAT(FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(__time)/${timeGranularity})*${timeGranularity}),'%Y-%m-%d %H:%i:%s') limit ${limit}
|
||||
[Return] ${sql2}
|
||||
Recommend
|
||||
[Arguments] ${url} ${statisticTime}
|
||||
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded Authorization=${token}
|
||||
Create Session api http://${host}:${port}/${version} headers=${header}
|
||||
${remoteResponse} Get Request api ${url}?statisticTime=${statisticTime} headers=${header}
|
||||
${response} to json ${remoteResponse.content}
|
||||
Should Be Equal As Strings ${remoteResponse.status_code} 200
|
||||
|
||||
Trend
|
||||
[Arguments] ${url} ${startTime} ${endTime} ${logType} ${policyId}
|
||||
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded Authorization=${token}
|
||||
Create Session api http://${host}:${port}/${version} headers=${header}
|
||||
${remoteResponse} Get Request api ${url}?policyId=${policyId}&logType=${logType}&startTime=${startTime}&endTime=${endTime} headers=${header}
|
||||
${response} to json ${remoteResponse.content}
|
||||
Should Be Equal As Strings ${remoteResponse.status_code} 200
|
||||
Should Be Equal As Strings ${remoteResponse.json()}[msg] Success
|
||||
|
||||
Timeandcount
|
||||
[Arguments] ${url} ${logType} ${policyIds}
|
||||
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded Authorization=${token}
|
||||
Create Session api http://${host}:${port}/${version} headers=${header}
|
||||
${remoteResponse} Get Request api ${url}?policyIds=${policyIds}&logType=${logType} headers=${header}
|
||||
${response} to json ${remoteResponse.content}
|
||||
Should Be Equal As Strings ${remoteResponse.status_code} 200
|
||||
Should Be Equal As Strings ${remoteResponse.json()}[msg] Success
|
||||
${data} set variable ${response}[data][list]
|
||||
FOR ${kk} ${vv} IN ENUMERATE @{data}
|
||||
log ${vv}[policyId]
|
||||
${true} Evaluate "${vv}[policyId]" in "${policyIds}"
|
||||
Should Be Equal As Strings ${true} True
|
||||
END
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ Library REST http://${host}:${port}/${version}
|
||||
Library Collections
|
||||
Library SSHLibrary
|
||||
Resource PolicyObject.robot
|
||||
Resource ../tsg_ui/Logout/Logout.robot
|
||||
Resource ../tsg_ui/Login/Login.robot
|
||||
Resource ../tsg_ui/logout/Logout.robot
|
||||
Resource ../tsg_ui/login/Login.robot
|
||||
Resource Tag.robot
|
||||
|
||||
*** Keywords ***
|
||||
|
||||
@@ -204,3 +204,39 @@ TeardownDelete
|
||||
Log teardown operation:${msg}
|
||||
Log teardown condition:${data}
|
||||
|
||||
|
||||
CreatePolicyFile4
|
||||
[Arguments] ${url} ${filePath} ${fileName} ${objectDict}
|
||||
[Timeout]
|
||||
${binFile} Evaluate open(r"${path}/${filePath}${fileName}",'rb')
|
||||
${fileDict} Create Dictionary file=${binFile}
|
||||
${requestData} Create Dictionary name="file" filename="${fileName}" Content-Type=application/octet-stream
|
||||
${suffix} Generate Random String
|
||||
${profileName} Catenate SEPARATOR=_ test ${suffix}
|
||||
log ${objectDict}
|
||||
${string} Convert To String ${objectDict}
|
||||
${fileDesc} Create Dictionary File-Desc=${string}
|
||||
log ${fileDesc}[File-Desc]
|
||||
${content} UpFilePostRequest ${url} ${requestData} ${fileDict} ${fileDesc}
|
||||
${msg} Set Variable ${content['msg']}
|
||||
${list} Set Variable ${content['data']['list']}
|
||||
${profileId} Set Variable ${list[0]['profileId']}
|
||||
${profileName} Set Variable ${list[0]['profileName']}
|
||||
${response} Create Dictionary msg=${msg} profileId=${profileId} profileName=${profileName}
|
||||
Log add operation:${msg}
|
||||
Log profileId:${profileId}
|
||||
[Return] ${response}
|
||||
|
||||
CreateRequest
|
||||
[Arguments] ${url} ${data}
|
||||
[Documentation] 必传参数:url
|
||||
... 可选参数:data(不传时使用默认值)
|
||||
${content} Post-Request ${url} ${data}
|
||||
${msg} Set Variable ${content['msg']}
|
||||
${list} Set Variable ${content['data']['list']}
|
||||
${profileId} Set Variable ${list[0]['profileId']}
|
||||
${profileName} Set Variable ${list[0]['profileName']}
|
||||
${response} Create Dictionary msg=${msg} profileId=${profileId} profileName=${profileName}
|
||||
Log add operation:${msg}
|
||||
Log profileId:${profileId}
|
||||
[Return] ${response}
|
||||
|
||||
@@ -434,10 +434,15 @@ Run5
|
||||
Write ${command}
|
||||
${r} Read delay=10s
|
||||
Should Not Be Empty ${r}
|
||||
#${str} Replace String ${r} ${\n} -
|
||||
${index} Evaluate '${r}'.rindex('tsgcli >')
|
||||
#用换行符作为命令结束
|
||||
${str} Replace String ${r} ${\n} -
|
||||
${index} Evaluate '${str}'.rindex('-')
|
||||
${len} Convert To Integer ${index}
|
||||
${json} Evaluate '${r}'[0:${len}]
|
||||
${json} Evaluate '${str}'[0:${len}]
|
||||
#cli命令结果返回结束为换行使用下面截取
|
||||
#${index} Evaluate '${r}'.rindex('tsgcli >')
|
||||
#${len} Convert To Integer ${index}
|
||||
#${json} Evaluate '${r}'[0:${len}]
|
||||
${dict} json.Loads ${json}
|
||||
${list} Convert To List ${dict}
|
||||
[Return] ${list}
|
||||
|
||||
@@ -4,8 +4,8 @@ Library REST http://${host}:${port}/${version}
|
||||
Library Collections
|
||||
Library ExtensionLibrary
|
||||
Resource ../tsg_bfapi/LoginLogout.robot
|
||||
Resource ../tsg_ui/Logout/Logout.robot
|
||||
Resource ../tsg_ui/Login/Login.robot
|
||||
Resource ../tsg_ui/logout/Logout.robot
|
||||
Resource ../tsg_ui/login/Login.robot
|
||||
|
||||
*** Keywords ***
|
||||
LoginAndAddLocalIP
|
||||
@@ -16,10 +16,10 @@ LoginAndAddLocalIP
|
||||
|
||||
Run Keyword If '${loginType}' == 'api' ApiLoginAndAddLocalIP
|
||||
... ELSE IF '${loginType}' == 'cli' CliLogin
|
||||
... ELSE IF '${loginType}' != '${None}' UiLoginAndAaddLocalIP
|
||||
... ELSE IF '${loginType}' != '${None}' UiLoginAndAddLocalIP
|
||||
|
||||
LogoutAndDelLocalIP
|
||||
[Tags] tsg_adc tsg_bf_api tsg_cli
|
||||
Run Keyword If '${loginType}' == 'api' ApiLogoutAndDelLocalIP
|
||||
... ELSE IF '${loginType}' == 'cli' CliLogout
|
||||
... ELSE IF '${loginType}' != '${None}' UiLoginAndAaddLocalIP
|
||||
... ELSE IF '${loginType}' != '${None}' UiLogoutAndDelLocalIP
|
||||
|
||||
@@ -1,541 +0,0 @@
|
||||
*** Settings ***
|
||||
Library Selenium2Library
|
||||
Library E:/Program Files (x86)/Python37-32/Lib/site-packages/robot/libraries/String.py
|
||||
|
||||
*** Keywords ***
|
||||
click
|
||||
[Arguments] ${element}
|
||||
Click Element ${element}
|
||||
|
||||
input
|
||||
[Arguments] ${element} ${text}
|
||||
Input Text ${element} ${text}
|
||||
|
||||
ui-logout
|
||||
Close Browser
|
||||
|
||||
ui-login
|
||||
Open Browser http://192.168.40.120 Chrome
|
||||
input xpath=//*[@id="app"]/div/div[2]/div/div[2]/div/input lyf
|
||||
input xpath=//*[@id="app"]/div/div[2]/div/div[3]/div/input 111111
|
||||
click xpath=//*[@id="app"]/div/div[2]/div/div[4]/button
|
||||
|
||||
Create-Hijack Files
|
||||
[Arguments] ${name} ${file} ${type}
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||||
Sleep 2
|
||||
click id=profilesTabs_Profile_HijackFiles #点击Hijack Files按钮
|
||||
Sleep 1
|
||||
click id=hijackAdd #点击Create
|
||||
Sleep 2
|
||||
input id=hijack_profileName ${name} #输入name
|
||||
Sleep 2
|
||||
Choose File xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/form/div[2]/div/div/div[1]/input ${file} #上传文件
|
||||
Sleep 2
|
||||
click id=hijackAddContentType #点击+ 打开侧滑窗口
|
||||
Sleep 1
|
||||
click ${type} #选择文件类型
|
||||
sleep 2
|
||||
click id=hijackAddOk #点击OK
|
||||
Sleep 2
|
||||
input id=one-input ${name} #搜索输入框输入name
|
||||
Sleep 1
|
||||
click id=select_new_search_btn #点击搜索按钮
|
||||
Sleep 1
|
||||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/span #获取点击后页面文本信息
|
||||
Should Be Equal As Strings ${text1} ${name} #断言
|
||||
|
||||
Create-Insert Scripts
|
||||
[Arguments] ${name} ${file} ${type}
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||||
Sleep 2
|
||||
click id=profilesTabs_Profile_Insert #点击Insert Scripts按钮
|
||||
Sleep 1
|
||||
click id=insertAdd #点击Create
|
||||
Sleep 2
|
||||
input id=insert_profileName ${name} #输入name
|
||||
Sleep 2
|
||||
Choose File xpath=//*[@id="insertAddUpload"]/div[1]/input ${file} #上传文件
|
||||
Sleep 2
|
||||
click id=insert_select_format #点击下拉框按钮
|
||||
Sleep 1
|
||||
click ${type} #选择css
|
||||
sleep 1
|
||||
click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[5]/div/div/button[1] #点击OK
|
||||
Sleep 1
|
||||
input xpath=//*[@id="one-input"] ${name} #搜索输入框输入name
|
||||
Sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/div[2]/i #点击搜索按钮
|
||||
Sleep 1
|
||||
${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span #获取点击后页面文本信息
|
||||
Should Be Equal As Strings ${text1} ${name} #断言
|
||||
ui-logout
|
||||
|
||||
Create-Traffic Mirror Profiles
|
||||
[Arguments] ${name} ${type} ${shuru}
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||||
Sleep 2
|
||||
click id=profilesTabs_Profile_TrafficMirrorProfiles #点击Traffic Mirror Profiles按钮
|
||||
Sleep 1
|
||||
click id=trafficMirrorAdd #点击Create
|
||||
Sleep 2
|
||||
input id=trafficmirror_profileName ${name} #输入name
|
||||
Sleep 2
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[2]/div/div/div[1]/span/span/i #点击下拉框
|
||||
Sleep 2
|
||||
click ${type} #选择vlan或者mac
|
||||
Sleep 1
|
||||
input id=trafficmirror_addrArray0 ${shuru}
|
||||
sleep 2
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[5]/div/div/button[1] #点击OK
|
||||
Sleep 2
|
||||
input id=one-input ${name} #搜索输入框输入name
|
||||
Sleep 1
|
||||
click id=select_new_search_btn #点击搜索按钮
|
||||
Sleep 1
|
||||
${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息
|
||||
Should Be Equal As Strings ${text1} ${name} #断言
|
||||
ui-logout
|
||||
|
||||
Edit-Insert Scripts
|
||||
[Arguments] ${id-name} ${name} ${name1} ${file} ${type}
|
||||
[Documentation] 引用关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${id-name}:为选择要查询的类型是ID或者Name的元素
|
||||
... ${name}:为查询输入框输入内容
|
||||
... ${name1}:为修改页面的name输入框里输入的内容
|
||||
... ${file}:为修改页面要上传文件的路径
|
||||
... ${type}:选择文件类型的元素
|
||||
Sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[2]/ul/li[6]/div #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||||
Sleep 2
|
||||
click id=profilesTabs_Profile_Insert #点击Insert files按钮
|
||||
sleep 1
|
||||
click id=one-input #搜索点击输入框
|
||||
sleep 1
|
||||
click ${id-name} #选择ID或者name
|
||||
sleep 1
|
||||
input id=sreach_input ${name} #输入搜索内容
|
||||
sleep 1
|
||||
click xpath=//*[@id="select_new_search_btn"] #点击搜索按钮
|
||||
sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
|
||||
sleep 1
|
||||
click id=insertEdit #点击Edit
|
||||
sleep 1
|
||||
Clear Element Text id=insert_profileName #清空输入框
|
||||
sleep 1
|
||||
input id=insert_profileName ${name1} #输入框输入
|
||||
sleep 1
|
||||
Choose File xpath=//*[@id="insertAddUpload"]/div[1]/input ${file} #上传文件
|
||||
sleep 1
|
||||
click id=insert_select_format #点击下拉框
|
||||
sleep 1
|
||||
click ${type} #选择文件类型
|
||||
sleep 1
|
||||
click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[8]/div/div/button[1] #点击ok提交
|
||||
|
||||
Create-Response Pages
|
||||
[Arguments] ${name} ${file}
|
||||
[Documentation] 引用次关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${name}:新建页面name输入框里的内容
|
||||
... ${file}:上传文件所在本地的路径
|
||||
#打开浏览器
|
||||
#ui-login lyf 111111
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||||
Sleep 2
|
||||
click id=respinseAdd #Response Pages点击Create
|
||||
Sleep 2
|
||||
input id=responsepages_profileName ${name} #输入name
|
||||
Sleep 2
|
||||
Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
|
||||
Sleep 2
|
||||
click xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[4]/div/div/button[1] #点击OK缇交
|
||||
Sleep 1
|
||||
input xpath=//*[@id="one-input"] ${name} #搜索框输入
|
||||
Sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[1]/div[2]/i #点击搜索按钮
|
||||
Sleep 1
|
||||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息
|
||||
Should Be Equal As Strings ${text1} ${name} #断言
|
||||
#ui-logout
|
||||
|
||||
Edit-Response Pages
|
||||
[Arguments] ${id-name} ${name} ${name1} ${file}
|
||||
[Documentation] 引用关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${id-name}:为选择要查询的类型是ID或者Name的元素
|
||||
... ${name}:为查询输入框输入内容
|
||||
... ${name1}:为修改页面的name输入框里输入的内容
|
||||
... ${file}:为修改页面要上传文件的路径
|
||||
Sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[2]/ul/li[6]/div #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||||
Sleep 2
|
||||
click id=one-input #搜索点击输入框
|
||||
sleep 1
|
||||
click ${id-name} #选择ID或者name
|
||||
sleep 1
|
||||
input id=sreach_input ${name}
|
||||
sleep 1
|
||||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
|
||||
sleep 1
|
||||
click id=resinseEdit #点击Edit
|
||||
sleep 1
|
||||
Clear Element Text id=responsepages_profileName #清空name输入框
|
||||
sleep 1
|
||||
input id=responsepages_profileName ${name1}
|
||||
sleep 1
|
||||
Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[5]/div/div/div/input ${file}
|
||||
sleep 1
|
||||
click xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[7]/div/div/button[1]
|
||||
|
||||
Edit-Hijack Files
|
||||
[Arguments] ${id-name} ${name} ${name1} ${file} ${type}
|
||||
[Documentation] 引用关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${id-name}:为选择要查询的类型是ID或者Name的元素
|
||||
... ${name}:为查询输入框输入内容
|
||||
... ${name1}:为修改页面的name输入框里输入的内容
|
||||
... ${file}:为修改页面要上传文件的路径
|
||||
... ${type}:为文件类型的元素
|
||||
Sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[2]/ul/li[6]/div #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||||
Sleep 2
|
||||
click id=profilesTabs_Profile_HijackFiles #点击Hijack files按钮
|
||||
sleep 1
|
||||
click id=one-input #搜索点击输入框
|
||||
sleep 1
|
||||
click ${id-name} #选择ID或者name
|
||||
sleep 1
|
||||
input id=sreach_input ${name} #输入搜索内容
|
||||
sleep 1
|
||||
click xpath=//*[@id="select_new_search_btn"] #点击搜索按钮
|
||||
sleep 1
|
||||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
|
||||
sleep 1
|
||||
click id=hijackEdit #点击Edit
|
||||
sleep 1
|
||||
Clear Element Text id=hijack_profileName #清空输入框
|
||||
sleep 1
|
||||
input id=hijack_profileName ${name1} #输入框输入
|
||||
sleep 1
|
||||
Choose File xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/form/div[5]/div/div/div[1]/input ${file} #上传文件
|
||||
sleep 1
|
||||
click id=hijackAddContentType #点击+号打开侧滑框
|
||||
sleep 3
|
||||
click ${type} #选择类型
|
||||
sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[2]/button #关闭侧滑框
|
||||
sleep 1
|
||||
click id=hijackAddOk #点击ok提交
|
||||
|
||||
Edit-Traffic Mirror Profiles
|
||||
[Arguments] ${id-name} ${name} ${name1} ${type} ${shuju}
|
||||
[Documentation] 引用关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${id-name}:为选择要查询的类型是ID或者Name的元素
|
||||
... ${name}:为查询输入框输入内容
|
||||
... ${name1}:为修改页面的name输入框里输入的内容
|
||||
... ${type}:为选择点击vlan或mac的元素
|
||||
... ${shuju}:为输入框输入内容
|
||||
Sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[2]/ul/li[6]/div #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||||
Sleep 2
|
||||
click id=profilesTabs_Profile_TrafficMirrorProfiles #点击Traffic Mirror Profiles按钮
|
||||
sleep 1
|
||||
click id=one-input #搜索点击输入框
|
||||
sleep 1
|
||||
click ${id-name} #选择ID或者name
|
||||
sleep 1
|
||||
input id=sreach_input ${name} #输入搜索内容
|
||||
sleep 1
|
||||
click xpath=//*[@id="select_new_search_btn"] #点击搜索按钮
|
||||
sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
|
||||
sleep 1
|
||||
click id=trafficMirrorEdit #点击Edit
|
||||
sleep 1
|
||||
Clear Element Text id=trafficmirror_profileName #清空输入框
|
||||
sleep 1
|
||||
input id=trafficmirror_profileName ${name1} #输入框输入
|
||||
sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[5]/div/div/div[1]/input #点击下拉框
|
||||
sleep 1
|
||||
click ${type} #选择vlan或者mac
|
||||
sleep 1
|
||||
Clear Element Text id=trafficmirror_addrArray0 #清空输入框
|
||||
sleep 1
|
||||
input id=trafficmirror_addrArray0 ${shuju} #输入内容
|
||||
sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[8]/div/div/button[1] #点击ok
|
||||
|
||||
import-Trusted Certificate Authorities
|
||||
[Arguments] ${name} ${file}
|
||||
[Documentation] 引用次关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${name}:新建页面name输入框里的内容
|
||||
... ${file}:上传文件所在本地的路径
|
||||
#打开浏览器
|
||||
#ui-login lyf 111111
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||||
Sleep 2
|
||||
click id=Authorities_create #点击Import
|
||||
Sleep 2
|
||||
input id=authoritiesAdd_name ${name} #输入name
|
||||
Sleep 2
|
||||
Choose File xpath=//*[@id="upload_dome"]/div/input ${file} #上传文件
|
||||
Sleep 2
|
||||
click id=authoritiesAdd_sub #点击OK缇交
|
||||
Sleep 1
|
||||
input xpath=//*[@id="one-input"] ${name} #搜索框输入
|
||||
Sleep 1
|
||||
click id=select_new_search_btn #点击搜索按钮
|
||||
Sleep 1
|
||||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息
|
||||
Should Be Equal As Strings ${text1} ${name} #断言
|
||||
#ui-logout
|
||||
|
||||
Create-Decryption Keyrings
|
||||
[Arguments] ${name} ${file} ${file1} ${1or2} ${type} ${type1}
|
||||
[Documentation] 引用次关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${name}:新建页面name输入框里的内容
|
||||
... ${file}:上传文件所在本地的路径
|
||||
... ${file1}:上传文件所在本地的路径
|
||||
... ${1or2}:填入1 或者其他
|
||||
... ${type}:上传证书类型的元素
|
||||
... ${type1}:上传证书加密解密算法的元素
|
||||
#打开浏览器
|
||||
#ui-login lyf 111111
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||||
Sleep 2
|
||||
click xpath=//*[@id="proxyTabs"]/div/ul/li[2] #点击Decryption Keyrings
|
||||
sleep 1
|
||||
click id=Keyrings_create #点击Create
|
||||
Sleep 2
|
||||
input id=keyringsadd_name ${name} #输入name
|
||||
Sleep 2
|
||||
Choose File xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
|
||||
Sleep 2
|
||||
Choose File xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[4]/div/div/div/input ${file1} #上传文件
|
||||
${select} Set Variable ${1or2}
|
||||
Run Keyword If '${select}'=='1' click id=keyringsadd_customized
|
||||
Run Keyword If '${select}'=='1' input id=reissueExpiryDate 10
|
||||
sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[7]/div/div/div[1] #点击下拉框
|
||||
sleep 1
|
||||
click ${type} #选择证书类型
|
||||
sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[8]/div/div/div[1] #点击下拉框
|
||||
sleep 1
|
||||
click ${type1} #选择加密解密类型
|
||||
sleep 1
|
||||
click id=keyringsadd_sub #点击OK缇交
|
||||
Sleep 1
|
||||
input xpath=//*[@id="one-input"] ${name} #搜索框输入
|
||||
Sleep 1
|
||||
click id=select_new_search_btn #点击搜索按钮
|
||||
Sleep 1
|
||||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息
|
||||
Should Be Equal As Strings ${text1} ${name} #断言
|
||||
#ui-logout
|
||||
|
||||
Create-SSL Decryption Exclusion
|
||||
[Arguments] ${name} ${value} ${name1}
|
||||
[Documentation] 引用次关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${name}:新建页面name输入框里的内容
|
||||
... ${value}:输入内容
|
||||
... ${naem1}:搜索框填入内容
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||||
Sleep 2
|
||||
click xpath=//*[@id="proxyTabs"]/div/ul/li[3] #点击SSL Decryption Exclusion按钮
|
||||
sleep 1
|
||||
click id=ssl_create #点击Create
|
||||
Sleep 2
|
||||
input id=sslAdd_name ${name} #输入name
|
||||
Sleep 2
|
||||
input id=sslAdd_itemDesc ${value} #输入内容
|
||||
Sleep 2
|
||||
click id=ssl_ok #点击OK缇交
|
||||
Sleep 1
|
||||
input xpath=//*[@id="one-input"] ${name1} #搜索框输入
|
||||
Sleep 1
|
||||
click id=select_new_search_btn #点击搜索按钮
|
||||
Sleep 1
|
||||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息
|
||||
Should Be Equal As Strings ${text1} ${name} #断言
|
||||
|
||||
Search-Cached Intermediate Certificates
|
||||
[Arguments] ${type} ${id-sni} ${enabled}
|
||||
[Documentation] 引用关键字,填入必填参数
|
||||
... ${type}:为搜索类型的元素(id或sni)
|
||||
... ${enabled}:为enabled开启或关闭按钮的元素
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||||
Sleep 2
|
||||
click xpath=//*[@id="proxyTabs"]/div/ul/li[4] #点击Cached Intermediate Certificates按钮
|
||||
Sleep 1
|
||||
click id=one-input #点击搜索框
|
||||
Sleep 1
|
||||
click ${type}
|
||||
Sleep 1
|
||||
input id=sreach_input ${id-sni}
|
||||
click id=select_new_search_btn #点击搜索按钮
|
||||
Sleep 1
|
||||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[8]/div/div/div/p/a/i #点击下载
|
||||
Sleep 10
|
||||
click ${enabled} #点击enabled按钮
|
||||
sleep 1
|
||||
|
||||
Edit-Trusted Certificate Authorities
|
||||
[Arguments] ${id-name} ${value} ${name} ${file}
|
||||
[Documentation] 引用关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${id-name}:为选择要查询的类型是ID或者Name的元素
|
||||
... ${value}:为查询输入框输入内容
|
||||
... ${name}:为修改页面的name输入框里输入的内容
|
||||
... ${file}:为修改页面要上传文件的路径
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||||
Sleep 2
|
||||
click id=one-input #点击搜索框
|
||||
sleep 1
|
||||
click ${id-name} #选择搜索类型
|
||||
sleep 1
|
||||
input id=sreach_input ${value} #输入内容
|
||||
sleep 1
|
||||
click id=select_new_search_btn #点击搜索按钮
|
||||
sleep 1
|
||||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr #点击搜索列表
|
||||
sleep 1
|
||||
click id=Authorities_edit #点击Edit按钮
|
||||
sleep 1
|
||||
Clear Element Text id=authoritiesAdd_name #清空name输入框
|
||||
sleep 1
|
||||
input id=authoritiesAdd_name ${name} #输入name
|
||||
sleep 1
|
||||
Choose File xpath=//*[@id="upload_dome"]/div/input ${file} #上传文件
|
||||
sleep 1
|
||||
click id=authoritiesAdd_sub #点击ok
|
||||
|
||||
Edit-Decryption Keyrings
|
||||
[Arguments] ${id-name} ${value} ${name} ${file} ${file1} ${1or2}
|
||||
... ${type} ${type1}
|
||||
[Documentation] 引用次关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${id-name}:为选择要查询的类型是ID或者Name的元素
|
||||
... ${value}:为查询输入框输入内容
|
||||
... ${name}:新建页面name输入框里的内容
|
||||
... ${file}:上传文件所在本地的路径
|
||||
... ${file1}:上传文件所在本地的路径
|
||||
... ${1or2}:填入1 或者其他
|
||||
... ${type}:上传证书类型的元素
|
||||
... ${type1}:上传证书加密解密算法的元素
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||||
Sleep 2
|
||||
click xpath=//*[@id="proxyTabs"]/div/ul/li[2] #点击Decryption Keyrings
|
||||
sleep 1
|
||||
click id=one-input #点击搜索框
|
||||
sleep 1
|
||||
click ${id-name} #选择搜索类型
|
||||
sleep 1
|
||||
input id=sreach_input ${value} #输入内容
|
||||
sleep 1
|
||||
click id=select_new_search_btn #点击搜索按钮
|
||||
sleep 1
|
||||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr #点击搜索列表
|
||||
sleep 1
|
||||
click id=Keyrings_edit #点击Edit按钮
|
||||
sleep 1
|
||||
Clear Element Text id=keyringsadd_name #清空name输入框
|
||||
sleep 1
|
||||
input id=keyringsadd_name ${name} #输入name
|
||||
sleep 1
|
||||
Choose File xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[5]/div/div/div/input ${file} #上传文件
|
||||
Sleep 2
|
||||
Choose File xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[7]/div/div/div/input ${file1} #上传文件
|
||||
${select} Set Variable ${1or2}
|
||||
Run Keyword If '${select}'=='1' click id=keyringsadd_customized
|
||||
Run Keyword If '${select}'=='1' input id=reissueExpiryDate 10
|
||||
sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[10]/div/div/div[1] #点击下拉框
|
||||
sleep 1
|
||||
click ${type} #选择证书类型
|
||||
sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[11]/div/div/div[1] #点击下拉框
|
||||
sleep 1
|
||||
click ${type1} #选择加密解密类型
|
||||
sleep 1
|
||||
click id=keyringsadd_sub #点击OK缇交
|
||||
|
||||
Edit-SSL Decryption Exclusion
|
||||
[Arguments] ${id-name} ${value} ${name} ${value1}
|
||||
[Documentation] 引用关键字,填入必填参数
|
||||
... ${id-name}:id或者name的元素
|
||||
... ${value}:输入搜索的内容
|
||||
... ${name}:输入name
|
||||
... ${calue1}:输入内容
|
||||
Sleep 1
|
||||
click id=children5 #点击一级目录Settings
|
||||
Sleep 1
|
||||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||||
Sleep 2
|
||||
click xpath=//*[@id="proxyTabs"]/div/ul/li[3] #点击SSL Decryption Exclusion按钮
|
||||
sleep 1
|
||||
click id=one-input #点击搜索框
|
||||
sleep 1
|
||||
click ${id-name} #选择搜索类型
|
||||
sleep 1
|
||||
input id=sreach_input ${value} #输入内容
|
||||
sleep 1
|
||||
click id=select_new_search_btn #点击搜索按钮
|
||||
sleep 1
|
||||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr #点击搜索列表
|
||||
Sleep 1
|
||||
click id=ssl_edit #点击Edit
|
||||
Sleep 1
|
||||
Clear Element Text id=sslAdd_name #清空name输入框
|
||||
sleep 1
|
||||
input id=sslAdd_name ${name} #输入name
|
||||
sleep 1
|
||||
input id=sslAdd_itemDesc ${value1} #输入内容
|
||||
Sleep 2
|
||||
click id=ssl_ok #点击OK缇交
|
||||
@@ -2,8 +2,8 @@
|
||||
Library Selenium2Library
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library Selenium2Library
|
||||
Resource ../Objects/Objects.robot
|
||||
Resource ../Objects/ObjectPages.robot
|
||||
Resource ../objects/Objects.robot
|
||||
Resource ../objects/ObjectPages.robot
|
||||
|
||||
*** Keywords ***
|
||||
Login
|
||||
@@ -18,8 +18,8 @@ AddLocalIp
|
||||
CreatePage ${obj1}[type] ${obj1}[name] ipads=${obj1}[ipads] ipclient=${obj1}[ipclient] ipclienttext1=${obj1}[ipclienttext1] ipclienttext2=${obj1}[ipclienttext2]
|
||||
set global variable ${LocahIPName} ${obj1}[name]
|
||||
|
||||
UiLoginAndAaddLocalIP
|
||||
log UiLoginAndAaddLocalIP
|
||||
UiLoginAndAddLocalIP
|
||||
log UiLoginAndAddLocalIP
|
||||
Login.Login
|
||||
Run Keyword If ${addTestClentIPFlag}==1 AddLocalIp
|
||||
log UiLoginAndAaddLocalIP:${LocahIPName}
|
||||
log UiLoginAndAddLocalIP:${LocahIPName}
|
||||
@@ -1,6 +1,6 @@
|
||||
*** Settings ***
|
||||
Library Selenium2Library
|
||||
Resource ../Objects/ObjectPages.robot
|
||||
Resource ../objects/ObjectPages.robot
|
||||
|
||||
*** Keywords ***
|
||||
Logout
|
||||
@@ -11,7 +11,6 @@ Logout
|
||||
Close All Browsers
|
||||
|
||||
UiLogoutAndDelLocalIP
|
||||
[Arguments] ${tempParm}
|
||||
log UiLogoutAndDelLocalIP${tempParm}
|
||||
Objects.DeletePage ${LocahIPName}
|
||||
log UiLogoutAndDelLocalIP
|
||||
Run Keyword If ${addTestClentIPFlag}==1 DeletePage ${LocahIPName}
|
||||
Logout.Logout
|
||||
@@ -7,7 +7,7 @@ Library Collections
|
||||
*** Keywords ***
|
||||
CreatePage
|
||||
[Arguments] ${objtype} ${name} ${ipads}=null ${ipclient}=null ${ipclienttext1}=null ${ipclienttext2}=null
|
||||
... ${keywordtext}=null ${hex}=close ${reqrestype}=null ${reqresheader}=null
|
||||
... ${keywordtext}=null ${hex}=close ${reqrestype}=null ${reqresheader}=null ${post}=null
|
||||
Menu policy&objects Objects
|
||||
sleep 3
|
||||
Objects.CreateButton ${objtype}
|
||||
@@ -15,7 +15,7 @@ CreatePage
|
||||
Objects.Create-item
|
||||
run keyword if "${objtype}"=="Ip" run keywords Objects.Create-ip-AddressType ${ipads}
|
||||
... AND Objects.Create-ip-ClientIP ${ipclient}
|
||||
... AND Objects.Create-ip-ClientIP-text ${ipclient} ${ipclienttext1} ${ipclienttext2}
|
||||
... AND Objects.Create-ip-ClientIP-text ${ipclient} ${ipclienttext1} ${ipclienttext2} ${post}
|
||||
run keyword if "${objtype}"=="Fqdn" or "${objtype}"=="Sub" or "${objtype}"=="Url" or "${objtype}"=="Category" or "${objtype}"=="Account" run keywords Objects.Create-keyword-text ${objtype} ${keywordtext}
|
||||
... AND sleep 1
|
||||
run keyword if '${objtype}'=='Key' run keywords Objects.Create-Key-text ${keywordtext}
|
||||
@@ -69,4 +69,3 @@ DeleteObjects
|
||||
\ sleep 2
|
||||
\ run keyword if "${key}"!="Ip" DeletePage ${obj}[${key}]
|
||||
\ sleep 1
|
||||
END
|
||||
@@ -76,23 +76,26 @@ Create-ip-ClientIP
|
||||
click element id=object_ip_sourecip0
|
||||
sleep 2
|
||||
run keyword if "${clientIPType}"=="range" run keywords sleep 1
|
||||
... AND click element id=range0Range
|
||||
... AND click element id=range0Range0111111
|
||||
... ELSE IF "${clientIPType}"=="cidr" run keywords sleep 1
|
||||
... AND click element id=CIDR0CIDR
|
||||
... AND click element id=CIDR0CIDR1
|
||||
... ELSE IF "${clientIPType}"=="masks" run keywords sleep 1
|
||||
... AND click element id=mask0Masks
|
||||
... AND click element id=mask0Masks2
|
||||
... ELSE IF log 选择错误
|
||||
sleep 2
|
||||
|
||||
Create-ip-ClientIP-text
|
||||
[Arguments] ${clientIPType} ${clientIPStart} ${clientIPEnd}
|
||||
[Arguments] ${clientIPType} ${clientIPStart} ${clientIPEnd} ${port}=null
|
||||
sleep 2
|
||||
run keyword if "${clientIPType}"=="range" run keywords input text id=object_ip_clientip10 ${clientIPStart}
|
||||
... AND input text id=object_ip_clientip20 ${clientIPEnd}
|
||||
... AND input text id=object_ip_clientPort110 ${port}
|
||||
run keyword if "${clientIPType}"=="cidr" run keywords input text id=object_ip_clientip30 ${clientIPStart}
|
||||
... AND input text id=object_ip_clientip40 ${clientIPEnd}
|
||||
... AND input text id=object_ip_clientPort110 ${port}
|
||||
run keyword if "${clientIPType}"=="masks" run keywords input text id=object_ip_clientip50 ${clientIPStart}
|
||||
... AND input text id=object_ip_clientip60 ${clientIPEnd}
|
||||
... AND input text id=object_ip_clientPort110 ${port}
|
||||
|
||||
Create-ip-ClientPort
|
||||
|
||||
@@ -262,6 +265,7 @@ objects-delete
|
||||
click element id=objectDel #点击删除按钮
|
||||
sleep 1
|
||||
click element xpath=/html/body/div/div/div[3]/button[2]
|
||||
#Close Browser #关闭浏览器
|
||||
|
||||
object-edit-fqdn
|
||||
[Arguments] ${name} ${keywordtext}
|
||||
@@ -378,7 +382,7 @@ object-edit-HTTPSignature
|
||||
Sleep 2
|
||||
|
||||
object-edit-ip
|
||||
[Arguments] ${name} ${ipads} ${ipclient} ${ipclienttext1} ${ipclienttext2}
|
||||
[Arguments] ${name} ${ipads} ${ipclient} ${ipclienttext1} ${ipclienttext2} ${post}=null
|
||||
Sleep 2
|
||||
click element id=objectEdit
|
||||
Sleep 2
|
||||
@@ -388,7 +392,7 @@ object-edit-ip
|
||||
Sleep 1
|
||||
Objects.Create-ip-AddressType ${ipads}
|
||||
Objects.Create-ip-ClientIP ${ipclient}
|
||||
Objects.Create-ip-ClientIP-text ${ipclient} ${ipclienttext1} ${ipclienttext2}
|
||||
Objects.Create-ip-ClientIP-text ${ipclient} ${ipclienttext1} ${ipclienttext2} ${post}
|
||||
Sleep 1
|
||||
click element id=objectAddItemIpOk
|
||||
Sleep 1
|
||||
1149
02-Keyword/tsg_ui/setting/Settings.robot
Normal file
1149
02-Keyword/tsg_ui/setting/Settings.robot
Normal file
File diff suppressed because it is too large
Load Diff
14
03-Variable/Policy_Objects_Module.txt
Normal file
14
03-Variable/Policy_Objects_Module.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
*** Variables ***
|
||||
${objects_ip} {"opAction":"add","returnData":1,"objectList":{"objectType":"ip","objectSubType":"endpoint","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"zmmtestip","objectDesc":"","subObjectIds":[],"addItemList":[{"addrType":4,"protocol":0,"direction":0,"isSession":"endpoint","clientIp1":"192.168.50.1","clientIp2":"192.168.50.1","clientIpFormat":"range","clientPortFormat":"range","clientPort1":0,"clientPort2":0,"serverIpFormat":"range","serverPortFormat":"range"}],"updateItemList":[],"deleteItemIds":[]}}
|
||||
${objects_keywords} {"opAction":"add","returnData":1,"objectList":{"objectType":"keywords","objectSubType":"","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"zmmtest_keywords","objectDesc":"","subObjectIds":[],"addItemList":[{"keywordArray":["www.baidu.com"],"isHexbin":0,"itemId":""}],"updateItemList":[],"deleteItemIds":[]}}
|
||||
${policys_security_Intercept_ssl} {"opAction":"add","returnData":1,"policyList":{"policyId":"","policyName":"zmmtest","policyType":"tsg_security","action":"intercept","userTags":"","doBlacklist":0,"doLog":1,"policyDesc":"","effectiveRange":{"tag_sets":[[]]},"userRegion":{"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}},"referenceObject":[{"objectId":"","protocolFields":["TSG_SECURITY_SOURCE_ADDR"]}],"isValid":1,"scheduleId":[],"appObjectIdArray":[3]}}
|
||||
${setting_proxy_profiles_hijack} {"isValid":1,"contentType":"text%2Fhtml","opAction":"add","profileName":"zmmHijackFile","contentName":"404english.html","profileId":null,"returnData":1}
|
||||
${setting_proxy_profiles_insert} {"isValid":1,"format":"js","insertOn":"","opAction":"add","profileName":"zmmtest","profileId":null,"returnData":1}
|
||||
${setting_proxy_profiles_reponse_page} {"isValid":1,"format":"html","opAction":"add","profileName":"zmmtest","profileId":null,"returnData":1}
|
||||
${setting_proxy_profiles_traffic_mirror_profiles} {"opAction":"add","returnData":1,"trafficMirrorList":[{"profileName":"zmmtest","addrType":"vlan","isValid":1,"addrArray":["1"]}]}
|
||||
${setting_proxy_profile_decryption_profile} {"opAction":"add","returnData":1,"list":[{"profileName":"zmmtest","profileDesc":"","isValid":1,"decryption":{"dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0,"trusted_root_cert_is_not_installed_on_client":0},"certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"fail-close"},"protocol_version":{"min":"ssl3","max":"ssl3","mirror_client":0,"allow_http2":0}}}]}
|
||||
${setting_CertificateManagement_Trusted_Certificate_Authorities} {"isValid":1,"opAction":"add","certName":"zmmtest","certId":null,"returnData":1}
|
||||
${setting_proxy_profiles_dnsrecords} { \ \ \ "opAction": "add", \ \ \ "returnData": 1, \ \ \ "dnsRecordList":[ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ "recordId":1, \ \ \ \ \ \ \ \ \ \ \ "recordName":"12312", \ \ \ \ \ "recordType":"A", \ \ \ \ \ \ \ \ \ \ \ "recordValues":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value":"192.168.0.1", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "priority":"" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "value":"192.168.0.2", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "priority":"" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ "profileDesc":"" \ \ \ \ \ \ \ } \ \ \ ]}
|
||||
${setting_proxy_profiles_reflector} {"opAction": "add","returnData": 1,"reflectorList":[{"profileId":1,"profileName":"12313","addrType":4,"reflectorType":"dns","ipList":["192.168.0.1","192.168.0.2","192.168.0.3"],"isValid":1,"profileDesc":""}]}
|
||||
${setting_proxy_profiles_claimedsrcip} {"opAction": "add","returnData": 1,"claimedSrcIpList":[{"profileId":1,"profileName":"1231","addrType":4,"ipList":["192.168.0.1/16","192.168.0.2/16","192.168.0.3/24"],"isValid":1,"profileDesc":""}],"isValid":1,"profileDesc":""}
|
||||
${settig_proxy_profiles_reflector_payload} {"opAction": "add","returnData": 1,"reflectorList":[{"profileId":1,"profileName":"123123","reflectorType":"dns","payload":"SSBMT1ZFIFlPVSDmiJHniLHkvaA=","isValid":1,"profileDesc":""}]}
|
||||
@@ -136,37 +136,85 @@ class Order:
|
||||
os_name = platform.system()
|
||||
return os_name
|
||||
|
||||
|
||||
#需要替换的内容进行循环替换 jsons为初始默认json datas为需要替换的内容
|
||||
# 全局变量 null,将java中的空值(null),装换位python中空值("")
|
||||
global null
|
||||
null = ''
|
||||
|
||||
# 对需要替换的内容进行循环替换 jsons为初始默认json datas为需要替换的内容,header 启用自定义json
|
||||
def Jsoneditmanu(self, jsons, datas=None,header=None):
|
||||
#判断是否启用自定义json
|
||||
if header != None:
|
||||
header = eval(header)
|
||||
# 返回 header
|
||||
return header
|
||||
# 判断是否需要更改json内容
|
||||
elif datas != None:
|
||||
# datas = eval(datas)
|
||||
jsons = eval(jsons)
|
||||
# 循环遍历替换json内容
|
||||
for k, v in datas.items():
|
||||
Order.UpdateAllvalues(self,jsons, k, v)
|
||||
return jsons
|
||||
else:
|
||||
# 返回初始json
|
||||
return jsons
|
||||
|
||||
# 循环嵌套替换
|
||||
def UpdateAllvalues(self,mydict, key, value):
|
||||
if isinstance(mydict, dict): # 使用isinstance检测数据类型,如果是字典
|
||||
if key in mydict.keys(): # 替换字典第一层中所有key与传参一致的key
|
||||
mydict[key] = value
|
||||
for k in mydict.keys(): # 遍历字典的所有子层级,将子层级赋值为变量chdict,分别替换子层级第一层中所有key对应的value,最后在把替换后的子层级赋值给当前处理的key
|
||||
chdict = mydict[k]
|
||||
Order.UpdateAllvalues(self,chdict, key, value)
|
||||
mydict[k] = chdict
|
||||
elif isinstance(mydict, list): # 如是list
|
||||
for element in mydict: # 遍历list元素,以下重复上面的操作
|
||||
if isinstance(element, dict):
|
||||
if key in element.keys():
|
||||
element[key] = value
|
||||
for k in element.keys():
|
||||
chdict = element[k]
|
||||
Order.UpdateAllvalues(self,chdict, key, value)
|
||||
element[k] = chdict
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
datas = {"url":['https://www.baidu.com'],
|
||||
"Certificate":"Tango Secure Gateway CA",
|
||||
# "Content_Type":"text/html",
|
||||
'log':'Security Event Logs',
|
||||
"sni":['baidu'],
|
||||
"intercept_code":"200",
|
||||
"log_code":"200",
|
||||
"certifucate":"1",
|
||||
"log_content":"true"
|
||||
}
|
||||
# data= {"url":['https://www.baidu.com'],
|
||||
# "Certificate":"Tango Secure Gateway CA"
|
||||
# datas = {"url":['https://www.baidu.com'],
|
||||
# "Certificate":"Tango Secure Gateway CA",
|
||||
# # "Content_Type":"text/html",
|
||||
# 'log':'Security Event Logs',
|
||||
# "sni":['baidu'],
|
||||
# "intercept_code":"200",
|
||||
# "log_code":"200",
|
||||
# "certifucate":"1",
|
||||
# "log_content":"true"
|
||||
# }
|
||||
# url = ['https://www.baidu.com']
|
||||
# url = ['https://www.baidu.com']
|
||||
# url = ['https://www.baidu.com']
|
||||
# # Certificate1 = "Tango Secure Gateway CA"
|
||||
# Certificate = "baidu"
|
||||
# a='Tango Secure Gateway CA'
|
||||
# s = Order()
|
||||
# b = s.manu(url,Certificate)
|
||||
# print(b[1])
|
||||
# FTP下载 传入ftp的路径和文件大小
|
||||
ftp_url = 'ftp://202.38.97.230/pub/iso/linux/knoppix/KNOPPIX_V7.7.1DVD-2016-10-22-EN/dpkg-l-dvd-771.txt -u"anonymous:chrome@example.com" '
|
||||
ftp_size = 435814
|
||||
ftp_issue = s.FTP_down(ftp_url,ftp_size)
|
||||
# FTP登录 传入ftp的路径和文件内容
|
||||
ftp_url ='ftp://202.38.97.230/pub/iso/linux/knoppix/KNOPPIX_V7.7.1DVD-2016-10-22-EN/dpkg-l-dvd-771.txt -u"anonymous:chrome@example.com" '
|
||||
file_content = "Graphical (Xorg) program starter for ADRIANE"
|
||||
ftp_issue = s.FTP_login(ftp_url,file_content)
|
||||
# # data= {"url":['https://www.baidu.com'],
|
||||
# # "Certificate":"Tango Secure Gateway CA"
|
||||
# # }
|
||||
# # url = ['https://www.baidu.com']
|
||||
# # url = ['https://www.baidu.com']
|
||||
# # url = ['https://www.baidu.com']
|
||||
# # # Certificate1 = "Tango Secure Gateway CA"
|
||||
# # Certificate = "baidu"
|
||||
# # a='Tango Secure Gateway CA'
|
||||
# # s = Order()
|
||||
# # b = s.manu(url,Certificate)
|
||||
# # print(b[1])
|
||||
# # FTP下载 传入ftp的路径和文件大小
|
||||
# ftp_url = 'ftp://202.38.97.230/pub/iso/linux/knoppix/KNOPPIX_V7.7.1DVD-2016-10-22-EN/dpkg-l-dvd-771.txt -u"anonymous:chrome@example.com" '
|
||||
# ftp_size = 435814
|
||||
# ftp_issue = s.FTP_down(ftp_url,ftp_size)
|
||||
# # FTP登录 传入ftp的路径和文件内容
|
||||
# ftp_url ='ftp://202.38.97.230/pub/iso/linux/knoppix/KNOPPIX_V7.7.1DVD-2016-10-22-EN/dpkg-l-dvd-771.txt -u"anonymous:chrome@example.com" '
|
||||
# file_content = "Graphical (Xorg) program starter for ADRIANE"
|
||||
# ftp_issue = s.FTP_login(ftp_url,file_content)
|
||||
# for i in b:
|
||||
# print(i)
|
||||
# dd = s.CMD('curl -I https://www.baidu.com')
|
||||
@@ -174,3 +222,16 @@ if __name__ == '__main__':
|
||||
# if "private, no-cache, no-store, proxy-revalidate, no-transform"in dd:
|
||||
# print("ok")
|
||||
# a ='curl -kv -1 --trace certificate.yaml https://www.baidu.com | iconv -f utf-8 -t gbk'
|
||||
|
||||
|
||||
# 自己写一个字典测试一下上面的方法好用不好用
|
||||
jsons = {"opAction":"add","policyList":{"policyId":"","policyName":"2324242423","policyType":"tsg_security","action":"intercept","userTags":"","doBlacklist":0,"doLog":1,"policyDesc":"","effectiveRange":{"tag_sets":[[]]},"userRegion":{"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}},"referenceObject":[{"objectId":28054,"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]}],"isValid":0,"scheduleId":[],"appObjectIdArray":[3]}}
|
||||
datas = {"protocol":"edit","opAction":"edit","policyId":123,'protocolFields':1}
|
||||
|
||||
print("替换前:\n %s" % jsons)
|
||||
|
||||
|
||||
a = Order()
|
||||
b = a.Jsoneditmanu(jsons,datas)
|
||||
# print("替换前:\n %s" % jsons)
|
||||
print("替换后:\n %s" % b)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user