Compare commits
313 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
009cee44c2 | ||
|
|
75c2a38c01 | ||
|
|
b29fdf0b29 | ||
|
|
3ad59e41de | ||
|
|
9a6f33a22d | ||
|
|
6f13eb5e3c | ||
|
|
6adb137468 | ||
|
|
9b3d88178d | ||
|
|
3df6e275af | ||
|
|
7f5caeef81 | ||
|
|
2c9aee7dbd | ||
|
|
3df5c2f490 | ||
|
|
4521e6d3d1 | ||
|
|
b5e18f6584 | ||
|
|
1f3013a5cd | ||
|
|
98805f5688 | ||
|
|
660cac41de | ||
|
|
2205378992 | ||
|
|
cbda2f4247 | ||
|
|
0ddb38d37a | ||
|
|
24e8c56184 | ||
|
|
b26fe07caf | ||
|
|
513d0ce671 | ||
|
|
98a37f5ee1 | ||
|
|
79eee3754d | ||
|
|
0704cd2172 | ||
|
|
a5d909ff29 | ||
|
|
fc79ac3782 | ||
|
|
a3f9d64293 | ||
|
|
b439b79e90 | ||
|
|
e49dc6ae44 | ||
|
|
578115e865 | ||
|
|
0c697853fc | ||
|
|
969dc7bf1c | ||
|
|
34c02dec90 | ||
|
|
bbc604f568 | ||
|
|
d6daa601f0 | ||
|
|
a567786cd7 | ||
|
|
2d673f6711 | ||
|
|
a7d05c205c | ||
|
|
f1161f84c9 | ||
|
|
7418b65cf2 | ||
|
|
ab51260399 | ||
|
|
a4c9e2bbcd | ||
|
|
82a3fb4945 | ||
|
|
20c0e70a39 | ||
|
|
e675444a62 | ||
|
|
1864e8b3cd | ||
|
|
c3e18a4586 | ||
|
|
707268f0aa | ||
|
|
ca22cc7ba7 | ||
|
|
e9893ac45d | ||
|
|
8a41c0112b | ||
|
|
b6cd16e91c | ||
|
|
a2b1f8e435 | ||
|
|
d49bacc3ac | ||
|
|
c090a8e543 | ||
|
|
e968f84c0c | ||
|
|
75c5a4c6e5 | ||
|
|
d8827dfb8f | ||
|
|
3b0fbc9477 | ||
|
|
543ea25db2 | ||
|
|
99d3d9b64f | ||
|
|
07a90e9334 | ||
|
|
6a373444a7 | ||
|
|
8fad174fc0 | ||
|
|
ea85769fa8 | ||
|
|
4185f1b2ea | ||
|
|
b36f413d16 | ||
|
|
2b35194cdd | ||
|
|
5c454fec1c | ||
|
|
adc3e5abef | ||
|
|
c6c166891f | ||
|
|
afb1e1a8dd | ||
|
|
d604fb65e2 | ||
|
|
ad53bddc3a | ||
|
|
5cfbf79c04 | ||
|
|
580f9d231d | ||
|
|
78f1139faf | ||
|
|
6f245c88ff | ||
|
|
d02ce7623d | ||
|
|
382ee10779 | ||
|
|
44ab2e5c37 | ||
|
|
cf9d6bd18e | ||
|
|
671651a625 | ||
|
|
208b3cf504 | ||
|
|
ff0652739c | ||
|
|
c03a7c9358 | ||
|
|
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 |
64
.gitlab-ci.yml
Normal file
64
.gitlab-ci.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
stages:
|
||||
- deploy #运行的类型,有
|
||||
- deployagain
|
||||
|
||||
api: #随意填写,起标示作用
|
||||
stage: deploy #和上述的类型对应
|
||||
|
||||
only:
|
||||
- deploy #指定触发分支
|
||||
tags:
|
||||
- "155auto"
|
||||
|
||||
script:
|
||||
- pwd
|
||||
- docker stop auto-custom-clibrary-api || true && docker rm auto-custom-clibrary-api || true
|
||||
- cd docker/api
|
||||
- docker-compose build
|
||||
- time=`date +%m%d` docker-compose up -d
|
||||
|
||||
|
||||
cli: #随意填写,起标示作用
|
||||
stage: deploy #和上述的类型对应
|
||||
|
||||
only:
|
||||
- deploy #指定触发分支
|
||||
tags:
|
||||
- "155auto"
|
||||
|
||||
script:
|
||||
- pwd
|
||||
- docker stop auto-custom-clibrary-cli || true && docker rm auto-custom-clibrary-cli || true
|
||||
- cd docker/cli
|
||||
- docker-compose build
|
||||
- time=`date +%m%d` docker-compose up -d
|
||||
|
||||
|
||||
156api: #随意填写,起标示作用
|
||||
stage: deployagain #和上述的类型对应
|
||||
|
||||
only:
|
||||
- deploy #指定触发分支
|
||||
tags:
|
||||
- "156auto"
|
||||
script:
|
||||
- pwd
|
||||
- docker stop auto-custom-clibrary-api || true && docker rm auto-custom-clibrary-api || true
|
||||
- cd docker/api
|
||||
- docker-compose build
|
||||
- time=`date +%m%d` docker-compose up -d
|
||||
|
||||
|
||||
156cli: #随意填写,起标示作用
|
||||
stage: deployagain #和上述的类型对应
|
||||
|
||||
only:
|
||||
- deploy #指定触发分支
|
||||
tags:
|
||||
- "156auto"
|
||||
script:
|
||||
- pwd
|
||||
- docker stop auto-custom-clibrary-cli || true && docker rm auto-custom-clibrary-cli || true
|
||||
- cd docker/cli
|
||||
- docker-compose build
|
||||
- time=`date +%m%d` docker-compose up -d
|
||||
@@ -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} /v1/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
|
||||
@@ -1,5 +1,4 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Force Tags tsg_adc proxy_policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
@@ -11,12 +10,12 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/responsepages
|
||||
${url} /v1/policy/profile/responsepages
|
||||
${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}
|
||||
@@ -46,9 +45,10 @@ ProxyPolicy-Deny-Http-00001
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -78,9 +78,10 @@ ProxyPolicy-Deny-Http-00002
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -110,9 +111,10 @@ ProxyPolicy-Deny-Http-00003
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -144,9 +146,10 @@ ProxyPolicy-Deny-Http-00004
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}
|
||||
@@ -178,9 +181,10 @@ ProxyPolicy-Deny-Http-00005
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}
|
||||
@@ -210,9 +214,10 @@ ProxyPolicy-Deny-Http-00006
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -245,9 +250,10 @@ ProxyPolicy-Deny-Http-00007
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}
|
||||
@@ -279,9 +285,10 @@ ProxyPolicy-Deny-Http-00008
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}
|
||||
@@ -313,9 +320,10 @@ ProxyPolicy-Deny-Http-00009
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}
|
||||
@@ -345,9 +353,10 @@ ProxyPolicy-Deny-Http-00010
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -380,9 +389,10 @@ ProxyPolicy-Deny-Http-00011
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}
|
||||
@@ -412,9 +422,10 @@ ProxyPolicy-Deny-Http-00012
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -444,9 +455,10 @@ ProxyPolicy-Deny-Http-00013
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -478,9 +490,10 @@ ProxyPolicy-Deny-Http-00014
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}
|
||||
@@ -510,9 +523,10 @@ ProxyPolicy-Deny-Http-00015
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -542,9 +556,10 @@ ProxyPolicy-Deny-Http-00016
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -574,9 +589,10 @@ ProxyPolicy-Deny-Http-00017
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -608,9 +624,10 @@ ProxyPolicy-Deny-Http-00018
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}
|
||||
@@ -640,9 +657,10 @@ ProxyPolicy-Deny-Http-00019
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -672,9 +690,10 @@ ProxyPolicy-Deny-Http-00020
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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 +705,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 +713,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}
|
||||
@@ -704,9 +723,10 @@ ProxyPolicy-Deny-Http-00021
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}
|
||||
@@ -736,9 +756,10 @@ ProxyPolicy-Deny-Http-00022
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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 +805,187 @@ ProxyPolicy-Deny-Http-00023
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
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
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
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
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Force Tags tsg_adc proxy_policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
@@ -11,18 +10,18 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/responsepages
|
||||
${url} /v1/policy/profile/responsepages
|
||||
${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}]}
|
||||
@@ -46,15 +45,16 @@ ProxyPolicy-Deny-Ssl-00001
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -78,15 +78,16 @@ ProxyPolicy-Deny-Ssl-00002
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -110,15 +111,16 @@ ProxyPolicy-Deny-Ssl-00003
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -144,15 +146,16 @@ ProxyPolicy-Deny-Ssl-00004
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}]}
|
||||
@@ -178,15 +181,16 @@ ProxyPolicy-Deny-Ssl-00005
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}]}
|
||||
@@ -210,15 +214,16 @@ ProxyPolicy-Deny-Ssl-00006
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -245,15 +250,16 @@ ProxyPolicy-Deny-Ssl-00007
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}]}
|
||||
@@ -279,15 +285,16 @@ ProxyPolicy-Deny-Ssl-00008
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}]}
|
||||
@@ -313,15 +320,16 @@ ProxyPolicy-Deny-Ssl-00009
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}]}
|
||||
@@ -345,15 +353,16 @@ ProxyPolicy-Deny-Ssl-00010
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -380,15 +389,16 @@ ProxyPolicy-Deny-Ssl-00011
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}]}
|
||||
@@ -412,15 +422,16 @@ ProxyPolicy-Deny-Ssl-00012
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -444,15 +455,16 @@ ProxyPolicy-Deny-Ssl-00013
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -478,15 +490,16 @@ ProxyPolicy-Deny-Ssl-00014
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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}]}
|
||||
@@ -510,15 +523,16 @@ ProxyPolicy-Deny-Ssl-00015
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -542,15 +556,16 @@ ProxyPolicy-Deny-Ssl-00016
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -574,15 +589,16 @@ ProxyPolicy-Deny-Ssl-00017
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -608,15 +624,16 @@ ProxyPolicy-Deny-Ssl-00018
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
|
||||
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 +646,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
|
||||
@@ -640,15 +657,16 @@ ProxyPolicy-Deny-Ssl-00019
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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}]}
|
||||
@@ -672,21 +690,22 @@ ProxyPolicy-Deny-Ssl-00020
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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 +713,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}
|
||||
@@ -704,15 +723,16 @@ ProxyPolicy-Deny-Ssl-00021
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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 +746,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}
|
||||
@@ -736,9 +756,10 @@ ProxyPolicy-Deny-Ssl-00022
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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 +781,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 +795,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 +805,186 @@ ProxyPolicy-Deny-Ssl-00023
|
||||
#日志验证
|
||||
${s} Convert to String ${policyId3}
|
||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
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
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
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
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
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
|
||||
[Teardown] DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${EMPTY}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Test Teardown DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
Force Tags tsg_adc proxy_policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
@@ -11,12 +11,12 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/hijackfiles
|
||||
${url} /v1/policy/profile/hijackfiles
|
||||
${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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Test Teardown DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
Force Tags tsg_adc proxy_policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
@@ -11,12 +11,12 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/hijackfiles
|
||||
${url} /v1/policy/profile/hijackfiles
|
||||
${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
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Test Teardown DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
Force Tags tsg_adc proxy_policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
@@ -11,14 +11,14 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/insertscripts
|
||||
${url} /v1/policy/profile/insertscripts
|
||||
${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
|
||||
@@ -1,5 +1,5 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
Test Teardown DeletePolicyAndObject1 ${policyIds} ${objectids} ${url} ${profiledId}
|
||||
Force Tags tsg_adc proxy_policy
|
||||
Library OperatingSystem
|
||||
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||
@@ -11,21 +11,21 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/insertscripts
|
||||
${url} /v1/policy/profile/insertscripts
|
||||
${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
|
||||
|
||||
@@ -11,12 +11,12 @@ Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||
*** Variables ***
|
||||
${policyIds} ${EMPTY}
|
||||
${objectids} ${EMPTY}
|
||||
${url} /policy/profile/responsepages
|
||||
${url} /v1/policy/profile/responsepages
|
||||
${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,13 +16,13 @@ ${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}
|
||||
${objectids} set Variable ${object_Subject_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00001 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"rst"} referenceObject=${object_Subject_Id}|TSG_FIELD_MAIL_SUBJECT isValid=${1} appObjectIdArray=5
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00001 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"block","code":550} referenceObject=${object_Subject_Id}|TSG_FIELD_MAIL_SUBJECT isValid=${1} appObjectIdArray=5
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -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,13 +152,13 @@ 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}
|
||||
${objectids} set Variable ${object_Content_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00005 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"rst"} referenceObject=${object_Content_Id}|TSG_FIELD_MAIL_CONTENT isValid=${1} appObjectIdArray=5
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00005 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"block","code":551} referenceObject=${object_Content_Id}|TSG_FIELD_MAIL_CONTENT isValid=${1} appObjectIdArray=5
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -186,13 +186,13 @@ 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}
|
||||
${objectids} set Variable ${object_ATT_CONT_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Mail-00006 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"drop"} referenceObject=${object_ATT_CONT_Id}|TSG_FIELD_MAIL_ATT_CONTENT isValid=${1} appObjectIdArray=5
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00006 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"drop"} referenceObject=${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}]}
|
||||
@@ -220,13 +220,13 @@ 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}
|
||||
${objectids} set Variable ${object_From_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Mail-00007 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"rst"} referenceObject=${object_From_Id}|TSG_FIELD_MAIL_FROM isValid=${1} appObjectIdArray=5
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00007 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"rst"} referenceObject=${object_From_Id}|TSG_FIELD_MAIL_FROM isValid=${1} appObjectIdArray=5
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -254,13 +254,13 @@ 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}
|
||||
${objectids} set Variable ${object_From_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Mail-00008 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"rst"} referenceObject=${object_From_Id}|TSG_FIELD_MAIL_FROM isValid=${1} appObjectIdArray=5
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00008 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"rst"} referenceObject=${object_From_Id}|TSG_FIELD_MAIL_FROM isValid=${1} appObjectIdArray=5
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -288,13 +288,13 @@ 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}
|
||||
${objectids} set Variable ${object_From_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Mail-00009 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"drop"} referenceObject=${object_From_Id}|TSG_FIELD_MAIL_FROM isValid=${1} appObjectIdArray=5
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00009 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"drop"} referenceObject=${object_From_Id}|TSG_FIELD_MAIL_FROM isValid=${1} appObjectIdArray=5
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -322,13 +322,13 @@ 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}
|
||||
${objectids} set Variable ${object_From_Id}
|
||||
Comment 创建安全策略
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Monitor-Mail-00010 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"drop"} referenceObject=${object_From_Id}|TSG_FIELD_MAIL_FROM isValid=${1} appObjectIdArray=5
|
||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Deny-Mail-00010 policyType=tsg_security policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"protocol":"MAIL","method":"drop"} referenceObject=${object_From_Id}|TSG_FIELD_MAIL_FROM isValid=${1} appObjectIdArray=5
|
||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
@@ -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} /v1/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 root
|
||||
${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 root
|
||||
${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 root
|
||||
${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 intermediate
|
||||
${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 intermediate
|
||||
${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 end-entity
|
||||
${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 end-entity
|
||||
${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/Filter/.gitkeep
Normal file
0
01-TestCase/tsg_bfapi/Filter/.gitkeep
Normal file
24
01-TestCase/tsg_bfapi/Filter/file_integrity_rate.robot
Normal file
24
01-TestCase/tsg_bfapi/Filter/file_integrity_rate.robot
Normal file
@@ -0,0 +1,24 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Filter.robot
|
||||
|
||||
*** Test Cases ***
|
||||
File_integrity_rate-1
|
||||
[Tags] 正向
|
||||
Filter file_integrity_rate jwc-1 10 12
|
||||
|
||||
File_integrity_rate-2
|
||||
[Tags] 最大值
|
||||
Filter file_integrity_rate jwc-2 1 100
|
||||
|
||||
File_integrity_rate-3
|
||||
[Tags] 超过最大值
|
||||
Filter file_integrity_rate jwc-3 1 101
|
||||
|
||||
File_integrity_rate-4
|
||||
[Tags] 小于最小值
|
||||
Filter file_integrity_rate jwc-4 0 100
|
||||
|
||||
File_integrity_rate-5
|
||||
[Tags] 下界大于上界
|
||||
Filter file_integrity_rate jwc-5 15 10
|
||||
24
01-TestCase/tsg_bfapi/Filter/file_size.robot
Normal file
24
01-TestCase/tsg_bfapi/Filter/file_size.robot
Normal file
@@ -0,0 +1,24 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Filter.robot
|
||||
|
||||
*** Test Cases ***
|
||||
File_size-1
|
||||
[Tags] 正向
|
||||
Filter file_size jwc-1 10 12
|
||||
|
||||
File_size-2
|
||||
[Tags] 最大值
|
||||
Filter file_size jwc-2 0 2147483647
|
||||
|
||||
File_size-3
|
||||
[Tags] 超过最大值
|
||||
Filter file_size jwc-3 0 2147483648
|
||||
|
||||
File_size-4
|
||||
[Tags] 小于最小值
|
||||
Filter file_size jwc-4 -1 2147483647
|
||||
|
||||
File_size-5
|
||||
[Tags] 下界大于上界
|
||||
Filter file_size jwc-4 100 99
|
||||
@@ -7,7 +7,6 @@ Library Selenium2Library
|
||||
Library RequestsLibrary
|
||||
Library Collections
|
||||
Library string
|
||||
Library REST http://${host}:${port}/${version}
|
||||
Library json
|
||||
|
||||
*** Test Cases ***
|
||||
@@ -19,7 +18,7 @@ CountLog-001
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -33,7 +32,7 @@ CountLog-002
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -47,7 +46,7 @@ CountLog-003
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -61,7 +60,7 @@ CountLog-004
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -75,7 +74,7 @@ CountLog-005
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -89,7 +88,7 @@ CountLog-006
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -103,7 +102,7 @@ CountLog-007
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","condaiapi-logaa tions":[${condition}]}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -117,7 +116,7 @@ CountLog-008
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -131,7 +130,7 @@ CountLog-009
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -145,7 +144,7 @@ CountLog-010
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -159,7 +158,7 @@ CountLog-011
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -173,7 +172,7 @@ CountLog-012
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -187,7 +186,7 @@ CountLog-013
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -201,7 +200,7 @@ CountLog-014
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -215,7 +214,7 @@ CountLog-015
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -229,7 +228,7 @@ CountLog-016
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -243,7 +242,7 @@ CountLog-017
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -257,7 +256,7 @@ CountLog-018
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -271,7 +270,7 @@ CountLog-019
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -285,7 +284,7 @@ CountLog-020
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -299,7 +298,7 @@ CountLog-021
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -313,7 +312,7 @@ CountLog-022
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -327,7 +326,7 @@ CountLog-023
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -341,7 +340,7 @@ CountLog-024
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
@@ -355,7 +354,7 @@ CountLog-025
|
||||
${endtime} Set Variable 2020-04-27 13:27:03
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
|
||||
${url} Set Variable log/count
|
||||
${url} Set Variable /${version}/log/count
|
||||
${response} Post-Request ${url} ${logCondition}
|
||||
${responsejson} Evaluate type($response)
|
||||
Should Be Equal As Strings ${response}[code] 200
|
||||
|
||||
@@ -2,283 +2,333 @@
|
||||
Force Tags api api-log api-log-active_defence_event_log api-log-active_defence_event_log-batch
|
||||
Library downloadexcel.py
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Log_keyword.robot
|
||||
|
||||
Resource ../../../02-Keyword/tsg_bfapi/CommonUtil.robot
|
||||
*** Variables ***
|
||||
@{logType} security_event_log proxy_event_log connection_record_log radius_record_log
|
||||
|
||||
${apipath} http://${host}:${port}/${version}
|
||||
*** Test Cases ***
|
||||
ExportLog-001
|
||||
${conditions} Set Variable {"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-002
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"=", "value":["2020-04-27 12:48:33"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-003
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"=", "value":["774"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-004
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"=", "value":["774"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-005
|
||||
${conditions} Set Variable { "field":"ad_cc_target_url", "type":"string", "symbol":"sub", "value":["www.jianshu.com"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-006
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"sub", "value":["22"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-007
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"exactly", "value":["10.3.22.222"] },{"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] },{ "field":"common_recv_time", "type":"timestamp", "symbol":"=", "value":["2020-04-27 13:27:02"] },{ "field":"common_policy_id", "type":"int", "symbol":"=", "value":["95"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... [${conditions}]
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-008
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"prefix", "value":["10"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-009
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"suffix", "value":["222"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-010
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"exactly", "value":["10.3.22.222"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-011
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "value":["10"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-012
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "value":["774"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-013
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"!=", "value":["774"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-014
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":">", "value":["774"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-015
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"<", "value":["774"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-016
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"<=", "value":["774"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-017
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":">=", "value":["774"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-018
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"in", "value":["774","95"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-019
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33"] }
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["${starttime}"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-020
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">", "value":["2020-04-27 12:48:33"] }
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">", "value":["${starttime}"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-021
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<", "value":["2020-04-27 12:48:33"] }
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<", "value":["${endtime}"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-022
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<=", "value":["2020-04-27 12:48:33"] }
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<=", "value":["${endtime}"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-023
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">=", "value":["2020-04-27 12:48:33"] }
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">=", "value":["${starttime}"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-024
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"between", "value":["2020-04-27 12:48:33","2020-04-27 13:27:03"] }
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"between", "value":["${starttime}","${endtime}"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
ExportLog-025
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33","2020-04-27 13:27:03"] }
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["${starttime}","${endtime}"] }
|
||||
${logname} Set Variable active_defence_event_log
|
||||
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
|
||||
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
log ${logCondition}
|
||||
${header} Create Dictionary Content-Type=application/json Authorization=${token}
|
||||
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
|
||||
${success} downloadexcel ${header} ${logCondition} ${apipath}/log/batch
|
||||
log ${success}
|
||||
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
|
||||
|
||||
|
||||
@@ -7,8 +7,9 @@ Library Collections
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Log_schema.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Log_search.robot
|
||||
Library string
|
||||
Library REST http://${host}:${port}/${version}
|
||||
Library REST http://${host}:${port}
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Log_keyword.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/CommonUtil.robot
|
||||
|
||||
*** Test Cases ***
|
||||
log-schema-001
|
||||
@@ -17,18 +18,21 @@ log-schema-001
|
||||
|
||||
log-search-002
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} []
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
#date_format=%Y-%m-%d %H:%M:%S
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} []
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-003
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable {"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} [${conditions}]
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -39,10 +43,11 @@ log-search-003
|
||||
|
||||
log-search-004
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"=", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"=", "value":["${starttime}"] }
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} [${conditions}]
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -53,10 +58,11 @@ log-search-004
|
||||
|
||||
log-search-005
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"=", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -67,10 +73,11 @@ log-search-005
|
||||
|
||||
log-search-006
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"ad_cc_target_url", "type":"string", "symbol":"sub", "value":["www.jianshu.com"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -81,10 +88,11 @@ log-search-006
|
||||
|
||||
log-search-007
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"sub", "value":["22"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -95,10 +103,11 @@ log-search-007
|
||||
|
||||
log-search-008
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"prefix", "value":["10"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -109,10 +118,11 @@ log-search-008
|
||||
|
||||
log-search-009
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"suffix", "value":["222"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -123,10 +133,11 @@ log-search-009
|
||||
|
||||
log-search-010
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"exactly", "value":["10.3.22.222"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -137,10 +148,11 @@ log-search-010
|
||||
|
||||
log-search-011
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"exactly", "value":["10.3.22.222"] },{"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] },{ "field":"common_recv_time", "type":"timestamp", "symbol":"=", "value":["2020-04-27 13:27:02"] },{ "field":"common_policy_id", "type":"int", "symbol":"=", "value":["95"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} [${conditions}]
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -158,9 +170,10 @@ log-search-011
|
||||
log-search-012
|
||||
${conditions} Set Variable {"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] }
|
||||
${simpleCondition} Set Variable "common_server_ips": "40"
|
||||
${logCondition} GetLogCondition active_defence_event_log 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${logCondition} GetLogCondition active_defence_event_log ${starttime} ${endtime} 30 1
|
||||
... ${conditions}
|
||||
${response} BasePostRequest v1/log/list ${logCondition}
|
||||
${response} BasePostRequest /${version}/log/list ${logCondition}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
log ${responsedata}
|
||||
@@ -170,10 +183,11 @@ log-search-012
|
||||
|
||||
log-search-013
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -184,96 +198,106 @@ log-search-013
|
||||
|
||||
log-search-014
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"!=", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-015
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":">", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-016
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"<", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-017
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"<=", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-018
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":">=", "value":["774"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-019
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"in", "value":["774","95"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} ${conditions}
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-020
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["${starttime}"] }
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} [${conditions}]
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
log ${responsedata}
|
||||
${responselist} Get From Dictionary ${responsedata} list
|
||||
${time} Set Variable ${responselist}[0][common_recv_time]
|
||||
Should Be Equal As Strings ${time} 2020-04-27 12:48:33
|
||||
Should Be Equal As Strings ${time} ${starttime}
|
||||
|
||||
log-search-021
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">", "value":["${starttime}"] }
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} [${conditions}]
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-022
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} [${conditions}]
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-023
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<=", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<=", "value":["${starttime}"] }
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} [${conditions}]
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
${responsedata} Get From Dictionary ${response} data
|
||||
@@ -284,27 +308,29 @@ log-search-023
|
||||
|
||||
log-search-024
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">=", "value":["2020-04-27 12:48:33"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">=", "value":["${starttime}"] }
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} [${conditions}]
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-025
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"between", "value":["2020-04-27 12:48:33","2020-04-27 13:27:03"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
${starttime} ${endtime} GetLast24HoursStartAndEndTime
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"between", "value":["${starttime}","${endtime}"] }
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} [${conditions}]
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
log-search-026
|
||||
#${filds} schema
|
||||
${responsedata} Get-Request log/schema?logType=active_defence_event_log
|
||||
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
|
||||
${filds} Set Variable ${responsedata['data']['fields']}
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33","2020-04-27 13:27:03"] }
|
||||
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
|
||||
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33","${endtime}"] }
|
||||
${response} log_search ${starttime} ${endtime} active_defence_event_log ${filds} [${conditions}]
|
||||
log ${response}
|
||||
Should Be Equal As Strings ${response.code} 200
|
||||
|
||||
Binary file not shown.
@@ -1,17 +1,18 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library DateTime
|
||||
|
||||
*** Test Cases ***
|
||||
Statistics-Country-00001
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable country
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/country/sourceipnum
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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}
|
||||
@@ -20,8 +21,8 @@ Statistics-Country-00002
|
||||
#最近一小时
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable country
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/country/sourceipnum
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/country/sourceipnum
|
||||
#开始时间
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
@@ -36,8 +37,8 @@ Statistics-Country-00003
|
||||
#最近一天
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable country
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/country/sourceipnum
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/country/sourceipnum
|
||||
#开始时间
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
@@ -54,8 +55,8 @@ Statistics-Country-00004
|
||||
#最近一周
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable country
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/country/sourceipnum
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/country/sourceipnum
|
||||
#开始时间
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
@@ -72,8 +73,8 @@ Statistics-Country-00005
|
||||
#最近一个月(30天)
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable country
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/country/sourceipnum
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/country/sourceipnum
|
||||
#开始时间
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
@@ -90,8 +91,8 @@ Statistics-Country-00006
|
||||
#最近一年(365天)
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable country
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/country/sourceipnum
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/country/sourceipnum
|
||||
#开始时间
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Test Cases ***
|
||||
Statistics-domain-00001
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable domain
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/domain/recommend
|
||||
${url} set variable /${version}/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,20 @@
|
||||
*** Settings ***
|
||||
Library DateTime
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-domain_resource-00001
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable domain_resource
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /${version}/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}
|
||||
@@ -1,17 +1,18 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library DateTime
|
||||
|
||||
*** Test Cases ***
|
||||
Statistics-hijack_srcip_location-00001
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_location
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_location
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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}
|
||||
@@ -20,8 +21,8 @@ Statistics-hijack_srcip_location-00002
|
||||
#最近一小时
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_location
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_location
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/hijack_srcip_location
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
@@ -37,8 +38,8 @@ Statistics-hijack_srcip_location-00003
|
||||
#最近一天
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_location
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_location
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/hijack_srcip_location
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
@@ -54,8 +55,8 @@ Statistics-hijack_srcip_location-00004
|
||||
#最近一周
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_location
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_location
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/hijack_srcip_location
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
@@ -71,8 +72,8 @@ Statistics-hijack_srcip_location-00005
|
||||
#最近一个月(30天)
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_location
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_location
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/hijack_srcip_location
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
@@ -88,8 +89,8 @@ Statistics-hijack_srcip_location-00006
|
||||
#最近一年(365天)
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_location
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/hijack_srcip_location
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/hijack_srcip_location
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library DateTime
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-hijack_scrip_num-00001
|
||||
#120未更新
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable hijack_srcip_num
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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,112 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library DateTime
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-injectionstatistics-00001
|
||||
#120未更新
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable injectionstatistics
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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}
|
||||
@@ -1,13 +1,14 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library DateTime
|
||||
|
||||
*** Test Cases ***
|
||||
Statistics-ip_correlation_domain-00001
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable ip_correlation_domain
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/ip_correlation_domain
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/ip_correlation_domain
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime} set variable 2020-04-01 16:05:04
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
@@ -19,8 +20,8 @@ Statistics-ip_correlation_domain-00001
|
||||
Statistics-ip_correlation_domain-00002
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable ip_correlation_domain
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/ip_correlation_domain
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/ip_correlation_domain
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime} set variable 2020-04-01 16:05:04
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
@@ -31,8 +32,8 @@ Statistics-ip_correlation_domain-00003
|
||||
#最近一小时
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable ip_correlation_domain
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/ip_correlation_domain
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/ip_correlation_domain
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
@@ -48,8 +49,8 @@ Statistics-ip_correlation_domain-00004
|
||||
#最近一天
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable ip_correlation_domain
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/ip_correlation_domain
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/ip_correlation_domain
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
@@ -65,8 +66,8 @@ Statistics-ip_correlation_domain-00005
|
||||
#最近一周(7天)
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable ip_correlation_domain
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/ip_correlation_domain
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/ip_correlation_domain
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
@@ -82,8 +83,8 @@ Statistics-ip_correlation_domain-00006
|
||||
#最近一个月(30天)
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable ip_correlation_domain
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/ip_correlation_domain
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/ip_correlation_domain
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
@@ -99,8 +100,8 @@ Statistics-ip_correlation_domain-00007
|
||||
#最近一年
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable ip_correlation_domain
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/ip_correlation_domain
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/ip_correlation_domain
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
${Time} get current date
|
||||
${endTime}= add time to date ${Time} -00:05:00
|
||||
|
||||
20
01-TestCase/tsg_bfapi/api_log/LogStatistics-topn.robot
Normal file
20
01-TestCase/tsg_bfapi/api_log/LogStatistics-topn.robot
Normal file
@@ -0,0 +1,20 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Test Cases ***
|
||||
LogStatistics-topn-00001
|
||||
#131已通过
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable topn
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/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}
|
||||
@@ -1,13 +1,14 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library DateTime
|
||||
|
||||
*** Test Cases ***
|
||||
Statistics-traffic-00001
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable traffic
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/statisticsbyunit
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/traffic/statisticsbyunit
|
||||
#统计类型: bytes:字节数 packets:包数 sessions:连接数 如不指定,则统计全部 statisticsUnit=${statisticUnit}
|
||||
${statisticUnit} set variable bytes
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
@@ -22,8 +23,8 @@ Statistics-traffic-00001
|
||||
Statistics-traffic-00002
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable traffic
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/statisticsbyunit
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/traffic/statisticsbyunit
|
||||
#开始时间格式Y-M-D h:i:s
|
||||
${startTime} set variable 2020-04-26 13:36:35
|
||||
${endTime} set variable 2020-04-26 23:04:56
|
||||
@@ -33,8 +34,8 @@ Statistics-traffic-00003
|
||||
#最近一小时
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable traffic
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/statisticsbyunit
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/traffic/statisticsbyunit
|
||||
#统计类型: bytes:字节数 packets:包数 sessions:连接数 如不指定,则统计全部 statisticsUnit=${statisticUnit}
|
||||
${statisticUnit} set variable bytes
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
@@ -53,8 +54,8 @@ Statistics-traffic-00004
|
||||
#最近一天
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable traffic
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/statisticsbyunit
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/traffic/statisticsbyunit
|
||||
#统计类型: bytes:字节数 packets:包数 sessions:连接数 如不指定,则统计全部 statisticsUnit=${statisticUnit}
|
||||
${statisticUnit} set variable bytes
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
@@ -73,8 +74,8 @@ Statistics-traffic-00005
|
||||
#最近一周(7天)
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable traffic
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/statisticsbyunit
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/traffic/statisticsbyunit
|
||||
#统计类型: bytes:字节数 packets:包数 sessions:连接数 如不指定,则统计全部 statisticsUnit=${statisticUnit}
|
||||
${statisticUnit} set variable bytes
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
@@ -93,8 +94,8 @@ Statistics-traffic-00006
|
||||
#最近一个月(30天)
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable traffic
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/statisticsbyunit
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/traffic/statisticsbyunit
|
||||
#统计类型: bytes:字节数 packets:包数 sessions:连接数 如不指定,则统计全部 statisticsUnit=${statisticUnit}
|
||||
${statisticUnit} set variable bytes
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
@@ -113,8 +114,8 @@ Statistics-traffic-00007
|
||||
#最近一年(365天)
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable traffic
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/traffic/statisticsbyunit
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/traffic/statisticsbyunit
|
||||
#统计类型: bytes:字节数 packets:包数 sessions:连接数 如不指定,则统计全部 statisticsUnit=${statisticUnit}
|
||||
${statisticUnit} set variable bytes
|
||||
#结束时间格式Y-M-D h:i:s
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Test Cases ***
|
||||
Statistics-url-00001
|
||||
#apiName,请求大数据时,用于区分每个接口的sql
|
||||
${apiName} set variable url
|
||||
#请求地址 例如:/report/domain/recommend
|
||||
${url} set variable /report/url/recommend
|
||||
#请求地址 例如:/${version}/report/domain/recommend
|
||||
${url} set variable /${version}/report/url/recommend
|
||||
#统计时间, \ 查询最近24小时数据;例如当前时间为2020-03-26 15:14:00, 查询时间应设为推前1小时的整点,实际传入参数为 "2020-03-26 14:00:00" \ 响应参数说明
|
||||
${statisticTime} set variable 2020-04-27 14:00:00
|
||||
GetApi ${apiName} ${url} statisticTime=${statisticTime}
|
||||
|
||||
15
01-TestCase/tsg_bfapi/api_log/LogStatistics_Recommend.robot
Normal file
15
01-TestCase/tsg_bfapi/api_log/LogStatistics_Recommend.robot
Normal file
@@ -0,0 +1,15 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library DateTime
|
||||
|
||||
*** Variables ***
|
||||
${url} /${version}/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,31 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url} /${version}/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
|
||||
27
01-TestCase/tsg_bfapi/api_log/LogStatistics_Trend.robot
Normal file
27
01-TestCase/tsg_bfapi/api_log/LogStatistics_Trend.robot
Normal file
@@ -0,0 +1,27 @@
|
||||
*** Settings ***
|
||||
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
*** Variables ***
|
||||
${url} /${version}/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
01-TestCase/tsg_bfapi/offline_stat_report/.gitkeep
Normal file
0
01-TestCase/tsg_bfapi/offline_stat_report/.gitkeep
Normal file
@@ -0,0 +1,87 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${reportId} ${report_url} ${chartId} ${chart_url} ${datasetId} ${dataset_url} ${resultId} ${result_url}
|
||||
Force Tags tsg_bf_api chartlibrary_create report
|
||||
Library OperatingSystem
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/ApiRequest1.robot
|
||||
|
||||
*** Variables ***
|
||||
${dataset_url} /report/dataset
|
||||
${datasetId} ${EMPTY}
|
||||
${reportId} ${EMPTY}
|
||||
${report_url} /report/offlinejob
|
||||
${chartId} ${EMPTY}
|
||||
${chart_url} /report/chart
|
||||
${result_url} /report/offlinejob/result
|
||||
${resultId} ${EMPTY}
|
||||
*** Test Cases ***
|
||||
Chart_Library_Lien-001
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Lien-001
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_client_ip","expression":"count","label":"Client IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"count","label":"Server IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Lien图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Client IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
Chart_Library_Area-002
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Area-002
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_server_ip","expression":"count","label":"Server IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_client_ip","expression":"count","label":"Client IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Area图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"area","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Client IP","type":"Line Down","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
Chart_Library_Pie-003
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Pie-003
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Pie图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"pie","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
Chart_Library_Bra-004
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Bra-004
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Bra图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"bar","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
Chart_Library_Table-005
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Table-005
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,普通
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
Chart_Library_Table-006
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Table-006
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,下钻
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
|
||||
|
||||
|
||||
102
01-TestCase/tsg_bfapi/offline_stat_report/ChartLibraryEdit.robot
Normal file
102
01-TestCase/tsg_bfapi/offline_stat_report/ChartLibraryEdit.robot
Normal file
@@ -0,0 +1,102 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${reportId} ${report_url} ${chartId} ${chart_url} ${datasetId} ${dataset_url} ${resultId} ${result_url}
|
||||
Force Tags tsg_bf_api chartlibrary_create report
|
||||
Library OperatingSystem
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/ApiRequest1.robot
|
||||
|
||||
*** Variables ***
|
||||
${dataset_url} /report/dataset
|
||||
${datasetId} ${EMPTY}
|
||||
${reportId} ${EMPTY}
|
||||
${report_url} /report/offlinejob
|
||||
${chartId} ${EMPTY}
|
||||
${chart_url} /report/chart
|
||||
${result_url} /report/offlinejob/result
|
||||
${resultId} ${EMPTY}
|
||||
*** Test Cases ***
|
||||
Chart_Library_Lien-001
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Lien-001
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_client_ip","expression":"count","label":"Client IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"count","label":"Server IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Lien图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Client IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#根据id进行对该Dataset的修改
|
||||
Put-Request ${chart_url} {"list":{"id":${chartId},"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Client IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
|
||||
Chart_Library_Area-002
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Area-002
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_server_ip","expression":"count","label":"Server IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_client_ip","expression":"count","label":"Client IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Area图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"area","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Client IP","type":"Line Down","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#根据id进行对该Dataset的修改
|
||||
Put-Request ${chart_url} {"list":{"id":${chartId},"name":"${name}","description":"","datasetId":${datasetId},"chartType":"area","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Client IP","type":"Line Down","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
|
||||
Chart_Library_Pie-003
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Pie-003
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Pie图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"pie","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#根据id进行对该Dataset的修改
|
||||
Put-Request ${chart_url} {"list":{"id":${chartId},"name":"${name}","description":"","datasetId":${datasetId},"chartType":"pie","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
|
||||
Chart_Library_Bra-004
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Bra-004
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Bra图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"bar","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#根据id进行对该Dataset的修改
|
||||
Put-Request ${chart_url} {"list":{"id":${chartId},"name":"${name}","description":"","datasetId":${datasetId},"chartType":"bar","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
|
||||
Chart_Library_Table-005
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Table-005
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,普通
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#根据id进行对该Dataset的修改
|
||||
Put-Request ${chart_url} {"list":{"id":${chartId},"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
|
||||
Chart_Library_Table-006
|
||||
#新建DataSet
|
||||
${name} Set Variable Chart_Library_Table-005
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,下钻
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#根据id进行对该Dataset的修改
|
||||
Put-Request ${chart_url} {"list":{"id":${chartId},"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
@@ -0,0 +1,70 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${reportId} ${report_url} ${chartId} ${chart_url} ${datasetId} ${dataset_url} ${resultId} ${result_url}
|
||||
Force Tags tsg_bf_api dataset_edit report
|
||||
Library OperatingSystem
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/ApiRequest1.robot
|
||||
|
||||
*** Variables ***
|
||||
${dataset_url} /report/dataset
|
||||
${datasetId} ${EMPTY}
|
||||
${reportId} ${EMPTY}
|
||||
${report_url} /report/offlinejob
|
||||
${chartId} ${EMPTY}
|
||||
${chart_url} /report/chart
|
||||
${result_url} /report/offlinejob/result
|
||||
${resultId} ${EMPTY}
|
||||
*** Test Cases ***
|
||||
Security_Event_Dataset-001
|
||||
#新建Security_Even_Logs_DataSet(所有可以选择的项都添加到dataset中,Filter选择All)
|
||||
${name} Set Variable Security Event-DataSet-001
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_policy_id"},{"name":"common_action"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"ssl_sni"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_policy_id","expression":"","label":"Policy ID"},{"name":"common_action","expression":"","label":"Action"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"ssl_sni","expression":"","label":"SNI"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_policy_id","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_c2s_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_c2s_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_content_type","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"ssl_sni","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_pinningst","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"ssl_intercept_state","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
|
||||
Security_Event_Dataset-002
|
||||
#新建Security_Even_Logs_DataSet(所有可以选择的项都添加到dataset中,Filter选择Any of the Following Conditions)
|
||||
${name} Set Variable Security Event-DataSet-002
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"or","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_policy_id"},{"name":"common_action"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"ssl_sni"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_policy_id","expression":"","label":"Policy ID"},{"name":"common_action","expression":"","label":"Action"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"ssl_sni","expression":"","label":"SNI"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_policy_id","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_c2s_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_c2s_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_content_type","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"ssl_sni","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_pinningst","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"ssl_intercept_state","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
Proxy_Event_Dataset-003
|
||||
#新建Proxy_Event_Dataset(所有可以选择的项都添加到dataset中,Filter选择All)
|
||||
${name} Set Variable Proxy_Event_Dataset-003
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_policy_id"},{"name":"common_sub_action"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"http_url"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_policy_id","expression":"","label":"Policy ID"},{"name":"common_sub_action","expression":"","label":"Sub Action"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"http_url","expression":"","label":"URL"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_policy_id","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_sub_action","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_url","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_content_type","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"}]}} #根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
Proxy_Event_Dataset-004
|
||||
#新建Proxy_Event_Dataset(所有可以选择的项都添加到dataset中,Filter选择Any of the Following Conditions)
|
||||
${name} Set Variable Proxy_Event_Dataset-004
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"or","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_policy_id"},{"name":"common_sub_action"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"http_url"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_policy_id","expression":"","label":"Policy ID"},{"name":"common_sub_action","expression":"","label":"Sub Action"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"http_url","expression":"","label":"URL"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_policy_id","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_sub_action","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_url","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_content_type","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"}]}} #根据name查询出该Dataset的id
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
Session_Records_Dataset-005
|
||||
#新建Session_Records_Dataset(所有可以选择的项都添加到dataset中,Filter选择All)
|
||||
${name} Set Variable Session_Records_Dataset-005
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_c2s_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_c2s_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_sni","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_pinningst","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"ssl_intercept_state","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}} #根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
Session_Records_Dataset-006
|
||||
#新建Session_Records_Dataset(所有可以选择的项都添加到dataset中,Filter选择Any of the Following Conditions)
|
||||
${name} Set Variable Session_Records_Dataset-006
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"or","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_c2s_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_c2s_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_sni","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_pinningst","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"ssl_intercept_state","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}} #根据name查询出该Dataset的id
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
Radius_Dataset-007
|
||||
#新建Radius_Dataset(所有可以选择的项都添加到dataset中,Filter选择All)
|
||||
${name} Set Variable Radius_Dataset-007
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"radius_record_log","filterConnector":"and","groupColumnList":[{"name":"radius_nas_ip"},{"name":"radius_framed_ip"},{"name":"common_subscriber_id"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"radius_event_timestamp","expression":"min","label":"Event Timestamp","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"radius_nas_ip","expression":"","label":"Nas IP"},{"name":"radius_framed_ip","expression":"","label":"Framed IP"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"radius_framed_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"radius_packet_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"radius_acct_session_id","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"radius_acct_multi_session_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"radius_acct_status_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}} #根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
Radius_Dataset-008
|
||||
#新建Radius_Dataset(所有可以选择的项都添加到dataset中,Filter选择Any of the Following Conditions)
|
||||
${name} Set Variable Radius_Dataset-008
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"radius_record_log","filterConnector":"or","groupColumnList":[{"name":"radius_nas_ip"},{"name":"radius_framed_ip"},{"name":"common_subscriber_id"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"radius_event_timestamp","expression":"min","label":"Event Timestamp","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"radius_nas_ip","expression":"","label":"Nas IP"},{"name":"radius_framed_ip","expression":"","label":"Framed IP"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"radius_framed_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"radius_packet_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"radius_acct_session_id","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"radius_acct_multi_session_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"radius_acct_status_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}} #根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
54
01-TestCase/tsg_bfapi/offline_stat_report/DataSetEdit.robot
Normal file
54
01-TestCase/tsg_bfapi/offline_stat_report/DataSetEdit.robot
Normal file
@@ -0,0 +1,54 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${reportId} ${report_url} ${chartId} ${chart_url} ${datasetId} ${dataset_url} ${resultId} ${result_url}
|
||||
Force Tags tsg_bf_api dataset_create report
|
||||
Library OperatingSystem
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/ApiRequest1.robot
|
||||
|
||||
*** Variables ***
|
||||
${dataset_url} /report/dataset
|
||||
${datasetId} ${EMPTY}
|
||||
${reportId} ${EMPTY}
|
||||
${report_url} /report/offlinejob
|
||||
${chartId} ${EMPTY}
|
||||
${chart_url} /report/chart
|
||||
${result_url} /report/offlinejob/result
|
||||
${resultId} ${EMPTY}
|
||||
*** Test Cases ***
|
||||
Security _Event_Dataset_Edit-001
|
||||
#新建Security_Even_Logs_DataSet(所有可以选择的项都添加到dataset中,Filter选择Any of the Following Conditions)
|
||||
${name} Set Variable Security _Event_Dataset_Edit-001
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"or","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_policy_id"},{"name":"common_action"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"ssl_sni"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_policy_id","expression":"","label":"Policy ID"},{"name":"common_action","expression":"","label":"Action"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"ssl_sni","expression":"","label":"SNI"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_policy_id","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_c2s_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_c2s_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_content_type","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"ssl_sni","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_pinningst","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"ssl_intercept_state","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据id进行对该Dataset的修改
|
||||
Put-Request ${dataset_url} {"list":{"id":${datasetId},"isInitialize":0,"name":"${name}","logType":"security_event_log","filterConnector":"or","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_policy_id"},{"name":"common_action"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"ssl_sni"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_policy_id","expression":"","label":"Policy ID"},{"name":"common_action","expression":"","label":"Action"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"ssl_sni","expression":"","label":"SNI"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_policy_id","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_c2s_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_c2s_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_content_type","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"ssl_sni","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_pinningst","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"ssl_intercept_state","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}}
|
||||
Proxy_Event_Dataset_Edit-002
|
||||
#新建Proxy_Event_Dataset(所有可以选择的项都添加到dataset中,Filter选择Any of the Following Conditions)
|
||||
${name} Set Variable Proxy_Event_Dataset_Edit-002
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"or","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_policy_id"},{"name":"common_sub_action"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"http_url"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_policy_id","expression":"","label":"Policy ID"},{"name":"common_sub_action","expression":"","label":"Sub Action"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"http_url","expression":"","label":"URL"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_policy_id","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_sub_action","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_url","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_content_type","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"}]}} #根据name查询出该Dataset的id
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据id进行对该Dataset的修改
|
||||
Put-Request ${dataset_url} {"list":{"id":${datasetId},"isInitialize":0,"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_policy_id"},{"name":"common_sub_action"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"http_url"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_policy_id","expression":"","label":"Policy ID"},{"name":"common_sub_action","expression":"","label":"Sub Action"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"http_url","expression":"","label":"URL"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_policy_id","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_sub_action","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_url","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"http_content_type","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"}]}}
|
||||
Session_Records_Dataset-003
|
||||
#新建Session_Records_Dataset(所有可以选择的项都添加到dataset中,Filter选择Any of the Following Conditions)
|
||||
${name} Set Variable Session_Records_Dataset-Edit-003
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"or","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_c2s_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_c2s_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_sni","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_pinningst","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"ssl_intercept_state","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据id进行对该Dataset的修改
|
||||
Put-Request ${dataset_url} {"list":{"id":${datasetId},"isInitialize":0,"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_server_ip"},{"name":"common_client_ip"},{"name":"common_sled_ip"},{"name":"common_server_location"},{"name":"common_subscriber_id"},{"name":"http_domain"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"},{"name":"common_client_ip","expression":"","label":"Client IP"},{"name":"common_sled_ip","expression":"","label":"Sled IP"},{"name":"common_server_location","expression":"","label":"Server Location"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"http_domain","expression":"","label":"Domain"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"},{"name":"common_server_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_client_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_server_port","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_server_location","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_c2s_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_pkt_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_c2s_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"common_s2c_byte_num","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"http_domain","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_sni","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"ssl_pinningst","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"ssl_intercept_state","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}} #根据name查询出该Dataset的id
|
||||
Radius_Dataset-004
|
||||
#新建Radius_Dataset(所有可以选择的项都添加到dataset中,Filter选择Any of the Following Conditions)
|
||||
${name} Set Variable Radius_Dataset-Edit-003
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"radius_record_log","filterConnector":"or","groupColumnList":[{"name":"radius_nas_ip"},{"name":"radius_framed_ip"},{"name":"common_subscriber_id"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"radius_event_timestamp","expression":"min","label":"Event Timestamp","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"radius_nas_ip","expression":"","label":"Nas IP"},{"name":"radius_framed_ip","expression":"","label":"Framed IP"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"radius_framed_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"radius_packet_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"radius_acct_session_id","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"radius_acct_multi_session_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"radius_acct_status_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据id进行对该Dataset的修改
|
||||
Put-Request ${dataset_url} {"list":{"id":${datasetId},"isInitialize":0,"name":"${name}","logType":"radius_record_log","filterConnector":"and","groupColumnList":[{"name":"radius_nas_ip"},{"name":"radius_framed_ip"},{"name":"common_subscriber_id"},{"name":"common_recv_time"}],"queryColumnList":[{"name":"radius_event_timestamp","expression":"min","label":"Event Timestamp","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"radius_nas_ip","expression":"","label":"Nas IP"},{"name":"radius_framed_ip","expression":"","label":"Framed IP"},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"radius_framed_ip","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"common_subscriber_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"radius_packet_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"},{"name":"radius_acct_session_id","expression":"notEmpty","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":[],"type":"string"},{"name":"radius_acct_multi_session_id","expression":"!=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["0"],"type":"string"},{"name":"radius_acct_status_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[0],"type":"int"}]}}
|
||||
|
||||
136
01-TestCase/tsg_bfapi/offline_stat_report/ReportCreate.robot
Normal file
136
01-TestCase/tsg_bfapi/offline_stat_report/ReportCreate.robot
Normal file
@@ -0,0 +1,136 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${reportId} ${report_url} ${chartId} ${chart_url} ${datasetId} ${dataset_url} ${resultId} ${result_url}
|
||||
Force Tags tsg_bf_api chartlibrary_create report
|
||||
Library OperatingSystem
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/ApiRequest1.robot
|
||||
|
||||
*** Variables ***
|
||||
${dataset_url} /report/dataset
|
||||
${datasetId} ${EMPTY}
|
||||
${reportId} ${EMPTY}
|
||||
${report_url} /report/offlinejob
|
||||
${chartId} ${EMPTY}
|
||||
${chart_url} /report/chart
|
||||
${result_url} /report/offlinejob/result
|
||||
${resultId} ${EMPTY}
|
||||
*** Test Cases ***
|
||||
Report_Create_Today_Line-001
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Create_Today_Line-001
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_client_ip","expression":"count","label":"Client IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"count","label":"Server IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Lien图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Client IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为Today,图表引用Line。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"last","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"minute"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
Report_Create_Yesterday_Area-002
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Create_Yesterday_Area-002
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_server_ip","expression":"count","label":"Server IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_client_ip","expression":"count","label":"Client IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Area图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"area","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Client IP","type":"Line Down","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为yesterday,图表引用Area。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"hour","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
|
||||
Report_Create_This_Pie-003
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Create_This_Pie-003
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Pie图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"pie","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为This,图表引用Pie。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"this","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"week"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
|
||||
Report_Create_Last_Bra-004
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Create_Last_Bra-004
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Bra图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"bar","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为last,图表引用Bra。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"last","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"day"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
|
||||
Report_Create_Customize_Table-005
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Create_Customize_Table-005
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,普通
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为customize,图表引用Table。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"customize","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"2020-06-15 00:00:00","endTime":"2020-06-17 00:00:00","filterConnector":"and","filterCondition":[]}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
|
||||
Report_Create_Mail-006
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Create_Mail-006
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,下钻
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为this,图表引用Table。发送邮件
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"this","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":1,"noticeMethod":1,"receiver":"check@test.com","startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"day"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
|
||||
Report_Create_Ftp-007
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Create_Ftp-007
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,下钻
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为this,图表引用Table。发送邮件
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":1,"noticeMethod":2,"receiver":[{"server":"192.168.40.204","port":"21","user":"wxs","password":"111111","directory":"/"}],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
|
||||
154
01-TestCase/tsg_bfapi/offline_stat_report/ReportEdit.robot
Normal file
154
01-TestCase/tsg_bfapi/offline_stat_report/ReportEdit.robot
Normal file
@@ -0,0 +1,154 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${reportId} ${report_url} ${chartId} ${chart_url} ${datasetId} ${dataset_url} ${resultId} ${result_url}
|
||||
Force Tags tsg_bf_api chartlibrary_create report
|
||||
Library OperatingSystem
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/ApiRequest1.robot
|
||||
|
||||
*** Variables ***
|
||||
${dataset_url} /report/dataset
|
||||
${datasetId} ${EMPTY}
|
||||
${reportId} ${EMPTY}
|
||||
${report_url} /report/offlinejob
|
||||
${chartId} ${EMPTY}
|
||||
${chart_url} /report/chart
|
||||
${result_url} /report/offlinejob/result
|
||||
${resultId} ${EMPTY}
|
||||
*** Test Cases ***
|
||||
Report_Edit_Today_Line-001
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Edit_Today_Line-001
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_client_ip","expression":"count","label":"Client IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"count","label":"Server IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Lien图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Client IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为Today,图表引用Line。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"last","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"minute"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#根据查询出的Report的id对该report进行修改
|
||||
Post-Request ${report_url} {"reportJobList":{"jobId":${reportId},"rangeType":"last","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"minute"}}
|
||||
|
||||
|
||||
|
||||
Report_Edit_Yesterday_Area-002
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Edit_Yesterday_Area-002
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_server_ip","expression":"count","label":"Server IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_client_ip","expression":"count","label":"Client IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Area图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"area","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Client IP","type":"Line Down","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为yesterday,图表引用Area。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"hour","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#根据查询出的Report的id对该report进行修改
|
||||
Post-Request ${report_url} {"reportJobList":{"jobId":${reportId},"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"hour","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
||||
|
||||
Report_Edit_This_Pie-003
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Edit_This_Pie-003
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Pie图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"pie","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为This,图表引用Pie。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"this","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"week"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#根据查询出的Report的id对该report进行修改
|
||||
Post-Request ${report_url} {"reportJobList":{"jobId":${reportId},"rangeType":"this","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"week"}}
|
||||
|
||||
Report_Edit_Last_Bra-004
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Edit_Last_Bra-004
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Bra图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"bar","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为last,图表引用Bra。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"last","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"day"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#根据查询出的Report的id对该report进行修改
|
||||
Post-Request ${report_url} {"reportJobList":{"jobId":${reportId},"rangeType":"last","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"day"}}
|
||||
|
||||
|
||||
|
||||
Report_Edit_Customize_Table-005
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Edit_Customize_Table-005
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,普通
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为customize,图表引用Table。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"customize","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"2020-06-15 00:00:00","endTime":"2020-06-17 00:00:00","filterConnector":"and","filterCondition":[]}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#根据查询出的Report的id对该report进行修改
|
||||
Post-Request ${report_url} {"reportJobList":{"jobId":${reportId},"rangeType":"customize","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"2020-06-15 00:00:00","endTime":"2020-06-17 00:00:00","filterConnector":"and","filterCondition":[]}}
|
||||
|
||||
Report_Edit_Mail-006
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Edit_Mail-006
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,下钻
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为this,图表引用Table。发送邮件
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"this","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":1,"noticeMethod":1,"receiver":"check@test.com","startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"day"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#根据查询出的Report的id对该report进行修改
|
||||
Post-Request ${report_url} {"reportJobList":{"jobId":${reportId},"rangeType":"this","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":1,"noticeMethod":1,"receiver":"check@test.com","startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"day"}}
|
||||
|
||||
Report_Edit_Ftp-007
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Edit_Ftp-007
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,下钻
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为this,图表引用Table。发送邮件
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":1,"noticeMethod":2,"receiver":[{"server":"192.168.40.204","port":"21","user":"wxs","password":"111111","directory":"/"}],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#根据查询出的Report的id对该report进行修改
|
||||
Post-Request ${report_url} {"reportJobList":{"jobId":${reportId},"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":1,"noticeMethod":2,"receiver":[{"server":"192.168.40.204","port":"21","user":"wxs","password":"111111","directory":"/"}],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
||||
235
01-TestCase/tsg_bfapi/offline_stat_report/ReportResult.robot
Normal file
235
01-TestCase/tsg_bfapi/offline_stat_report/ReportResult.robot
Normal file
@@ -0,0 +1,235 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${reportId} ${report_url} ${chartId} ${chart_url} ${datasetId} ${dataset_url} ${resultId} ${result_url}
|
||||
Force Tags tsg_bf_api chartlibrary_create report
|
||||
Library OperatingSystem
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/ApiRequest1.robot
|
||||
|
||||
*** Variables ***
|
||||
${dataset_url} /report/dataset
|
||||
${datasetId} ${EMPTY}
|
||||
${reportId} ${EMPTY}
|
||||
${report_url} /report/offlinejob
|
||||
${chartId} ${EMPTY}
|
||||
${chart_url} /report/chart
|
||||
${result_url} /report/offlinejob/result
|
||||
${resultId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Report_Result-001
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Result-001
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_client_ip","expression":"count","label":"Client IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"count","label":"Server IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Lien图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Client IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为Today,图表引用Line。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"last","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"minute"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
||||
FOR ${i} IN RANGE 50
|
||||
sleep 10
|
||||
#report执行状态查询
|
||||
${response1} Get-Request ${result_url}?jobId=${reportId}
|
||||
${status} Set Variable ${response1}[data][list][0][status]
|
||||
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
||||
run keyword if "${status}"=="0" log non-execution
|
||||
... ELSE IF "${status}"=="1" log executing
|
||||
... ELSE IF "${status}"=="2" Exit For Loop
|
||||
... ELSE log Exec failure
|
||||
END
|
||||
#Report报表详情查询
|
||||
${response1} Get-Request ${result_url}?resultId=${resultId}&jobId=${reportId}
|
||||
|
||||
Report_Result-002
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Result-002
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_server_ip","expression":"count","label":"Server IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_client_ip","expression":"count","label":"Client IP","expressionList":[{"label":"count","value":"count"},{"label":"Count Distinct","value":"count_distinct"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
||||
#根据name查询出该Dataset的id
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Area图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"area","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Server IP","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Client IP","type":"Line Down","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为yesterday,图表引用Area。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"hour","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
||||
FOR ${i} IN RANGE 50
|
||||
sleep 10
|
||||
#report执行状态查询
|
||||
${response1} Get-Request ${result_url}?jobId=${reportId}
|
||||
${status} Set Variable ${response1}[data][list][0][status]
|
||||
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
||||
run keyword if "${status}"=="0" log non-execution
|
||||
... ELSE IF "${status}"=="1" log executing
|
||||
... ELSE IF "${status}"=="2" Exit For Loop
|
||||
... ELSE log Exec failure
|
||||
END
|
||||
#Report报表详情查询
|
||||
${response1} Get-Request ${result_url}?resultId=${resultId}&jobId=${reportId}
|
||||
|
||||
Report_Result-003
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Result-003
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Pie图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"pie","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为This,图表引用Pie。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"week"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
||||
FOR ${i} IN RANGE 50
|
||||
sleep 10
|
||||
#report执行状态查询
|
||||
${response1} Get-Request ${result_url}?jobId=${reportId}
|
||||
${status} Set Variable ${response1}[data][list][0][status]
|
||||
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
||||
run keyword if "${status}"=="0" log non-execution
|
||||
... ELSE IF "${status}"=="1" log executing
|
||||
... ELSE IF "${status}"=="2" Exit For Loop
|
||||
... ELSE log Exec failure
|
||||
END
|
||||
#Report报表详情查询
|
||||
${response1} Get-Request ${result_url}?resultId=${resultId}&jobId=${reportId}
|
||||
|
||||
Report_Result-004
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Result-004
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,Bra图形表
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"bar","dataTop":0,"orderBy":"","orderDesc":"","includeOther":true,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":5,"dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":""}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为last,图表引用Bra。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"last","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"day"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
||||
FOR ${i} IN RANGE 50
|
||||
sleep 10
|
||||
#report执行状态查询
|
||||
${response1} Get-Request ${result_url}?jobId=${reportId}
|
||||
${status} Set Variable ${response1}[data][list][0][status]
|
||||
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
||||
run keyword if "${status}"=="0" log non-execution
|
||||
... ELSE IF "${status}"=="1" log executing
|
||||
... ELSE IF "${status}"=="2" Exit For Loop
|
||||
... ELSE log Exec failure
|
||||
END
|
||||
#Report报表详情查询
|
||||
${response1} Get-Request ${result_url}?resultId=${resultId}&jobId=${reportId}
|
||||
|
||||
Report_Result-005
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Result-005
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,普通
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为customize,图表引用Table。
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"customize","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"2020-06-15 00:00:00","endTime":"2020-06-17 00:00:00","filterConnector":"and","filterCondition":[]}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
||||
FOR ${i} IN RANGE 50
|
||||
sleep 10
|
||||
#report执行状态查询
|
||||
${response1} Get-Request ${result_url}?jobId=${reportId}
|
||||
${status} Set Variable ${response1}[data][list][0][status]
|
||||
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
||||
run keyword if "${status}"=="0" log non-execution
|
||||
... ELSE IF "${status}"=="1" log executing
|
||||
... ELSE IF "${status}"=="2" Exit For Loop
|
||||
... ELSE log Exec failure
|
||||
END
|
||||
#Report报表详情查询
|
||||
${response1} Get-Request ${result_url}?resultId=${resultId}&jobId=${reportId}
|
||||
|
||||
Report_Result-006
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Result-006
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,下钻
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为this,图表引用Table。发送邮件
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":1,"noticeMethod":1,"receiver":"check@test.com","startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"day"}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
||||
FOR ${i} IN RANGE 50
|
||||
sleep 10
|
||||
#report执行状态查询
|
||||
${response1} Get-Request ${result_url}?jobId=${reportId}
|
||||
${status} Set Variable ${response1}[data][list][0][status]
|
||||
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
||||
run keyword if "${status}"=="0" log non-execution
|
||||
... ELSE IF "${status}"=="1" log executing
|
||||
... ELSE IF "${status}"=="2" Exit For Loop
|
||||
... ELSE log Exec failure
|
||||
END
|
||||
#Report报表详情查询
|
||||
${response1} Get-Request ${result_url}?resultId=${resultId}&jobId=${reportId}
|
||||
|
||||
Report_Result-007
|
||||
#新建DataSet
|
||||
${name} Set Variable Report_Result-007
|
||||
Post-Request ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[{"name":"common_address_type","expression":"!=","expressionList":["=","!=",">","<",">=","<="],"value":[6],"type":"int"}]}}
|
||||
${response} Get-Request ${dataset_url}?pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
#根据DataSet的id,新建Chart,tableb表,下钻
|
||||
Post-Request ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Client IP","width":20,"dataBindings":[{"dataType":false,"dataBinding":"Client IP","format":"Default","legend":"","name":"common_client_ip"}]},{"title":"sessions","width":20,"dataBindings":[{"dataType":false,"dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
||||
#根据name查询出该Chart的id
|
||||
${response1} Get-Request ${chart_url}?pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
||||
${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
#新建Report,时间计划为this,图表引用Table。发送邮件
|
||||
Post-Request ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":1,"noticeMethod":2,"receiver":[{"server":"192.168.40.204","port":"21","user":"wxs","password":"111111","directory":"/"}],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
||||
#查询Report的id
|
||||
${response1} Get-Request ${report_url}?pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
||||
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
||||
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
||||
FOR ${i} IN RANGE 50
|
||||
sleep 10
|
||||
#report执行状态查询
|
||||
${response1} Get-Request ${result_url}?jobId=${reportId}
|
||||
${status} Set Variable ${response1}[data][list][0][status]
|
||||
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
||||
run keyword if "${status}"=="0" log non-execution
|
||||
... ELSE IF "${status}"=="1" log executing
|
||||
... ELSE IF "${status}"=="2" Exit For Loop
|
||||
... ELSE log Exec failure
|
||||
END
|
||||
#Report报表详情查询
|
||||
${response1} Get-Request ${result_url}?resultId=${resultId}&jobId=${reportId}
|
||||
@@ -1,50 +0,0 @@
|
||||
*** 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}
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
*** 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
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/decryption
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Decryption_ADD_001
|
||||
|
||||
Comment 全串{"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_add","decryption":{"dynamic_bypass":{"ev_cert":1,"cert_transparency":1,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1},"protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1},"certificate_checks":{"approach":{"cn":1,"issuer":1,"self-signed":1,"expiration":1},"fail_action":"fail-close"}},"isValid":1,"isInitialize":0,"profileDesc":""}]}
|
||||
Comment "dynamic_bypass":{"ev_cert":1,"cert_transparency":1,"mutual_authentication":1,"cert_pinning":1,"protocol_errors":1}
|
||||
Comment "protocol_version":{"min":"ssl3","max":"tls13","mirror_client":1,"allow_http2":1}
|
||||
Comment dynamic_bypass
|
||||
Comment 拦截排除参数对象
|
||||
Comment ev_cert Integer 是 ON/OFF,缺省OFF,1表示ON,0表示OFF
|
||||
Comment cert_transparency Integer 是 ON/OFF,缺省OFF,1表示ON,0表示OFF
|
||||
Comment mutual_authentication Integer 是 ON/OFF,缺省ON,1表示ON,0表示OFF
|
||||
Comment cert_pinning Integer 是 Blocl/Bypass,缺省Block,1表示Block,0表示Bypass
|
||||
Comment protocol_errors Integer 是 ON/OFF,缺省ON,1表示ON,0表示OFF
|
||||
Comment protocol_version Object 是 协议版本对象
|
||||
Comment min Integer 否 如果mirror_client=1,则此参数可为空
|
||||
Comment max Integer 否 如果mirror_client=1,则此参数可为空
|
||||
Comment mirror_client Integer 是 ON/OFF,缺省ON,1表示ON,0表示OFF
|
||||
Comment allow_http2 Integer 是 1表示ON,0表示OFF
|
||||
Comment certificate_checks Object 是 证书检查参数对象
|
||||
Comment approachObject 是 certificateChecksObj对象参数
|
||||
Comment cn Integer 是 approach对象参数,ON/OFF,缺省ON, 1表示ON,0表示OFF
|
||||
Comment issuer Integer 是 approach对象参数,ON/OFF,缺省ON, 1表示ON,0表示OFF
|
||||
Comment self-signed Integer 是 approach对象参数, ON/OFF,缺省ON, 1表示ON,0表示OFF
|
||||
Comment expiration Integer 是 approach对象参数,ON/OFF,缺省ON, 1表示ON,0表示OFF
|
||||
Comment fail_action String 是 certificateChecksObj对象参数,值为: fail-close pass-through
|
||||
Comment isValid Integer 是 是否有效
|
||||
Comment isInitialize Integer 否 0:非内置,缺省 1:内置
|
||||
|
||||
${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}
|
||||
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
${profileName} Get From Dictionary ${response} profileName
|
||||
QueryPolicyFile ${url} profileId=${profileId}&profileName=${profileName}
|
||||
|
||||
|
||||
# 修改
|
||||
${dynamic_bypass}="dynamic_bypass":{"ev_cert":0,"cert_transparency":0,"mutual_authentication":0,"cert_pinning":0,"protocol_errors":0}
|
||||
${protocol_version}="protocol_version":{"min":"ssl3","max":"tls13","mirror_client":0,"allow_http2":0}
|
||||
${certificate_checks}="certificate_checks":{"approach":{"cn":0,"issuer":0,"self-signed":0,"expiration":0},"fail_action":"pass-through"}
|
||||
${requestbody}={"opAction":"add","returnData":1,"list":[{"profileName":"autotest_decryption_edit","decryption":{${dynamic_bypass},${protocol_version},${certificate_checks}},"isValid":0,"isInitialize":0,"profileDesc":""}]}
|
||||
@{data} set variable ${requestbody}
|
||||
UpdatePolicyFile2 ${url} ${reqData_edit} @{data}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_bf_api Hijack_Files
|
||||
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/hijackfiles
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Hijack Files Policy CRUD case
|
||||
|
||||
# 新增
|
||||
${response} CreatePolicyFile2 ${url} hijack_files/ Create-Hijack Files-test-3.html hijack
|
||||
|
||||
# 查询
|
||||
${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-files/ Create-Hijack Files-test-5.png ${header_edit}
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
*** Settings ***
|
||||
Test Teardown TeardownDelete ${url} profileIds ${profileId}
|
||||
Force Tags tsg_bf_api Insert_Scripts
|
||||
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/insertscripts
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Insert Scripts Policy CRUD case
|
||||
|
||||
# 新增
|
||||
${response} CreatePolicyFile2 ${url} insert_files/ Create-Insert Scripts-test-1.js insert
|
||||
|
||||
# 查询
|
||||
${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","opAction":"update","profileName":"test_edit","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} Insert Scripts-files/ Create-Insert Scripts-test.css ${reqHeader_edit}
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
*** 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}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
*** 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 ***
|
||||
Keyring Policy File case
|
||||
|
||||
# 新增
|
||||
${response} CreatePolicyMutipartFile ${url} keyrings/root/ mesalab-ca-cert.pem mesalab-ca-key.pem
|
||||
|
||||
# 查询
|
||||
${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}
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
*** 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
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/responsepages
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Response Pages Policy CRUD case
|
||||
|
||||
# 新增
|
||||
${response} CreatePolicyFile2 ${url} response_pages_files/ Create-Response Pages-test-1.html resPages
|
||||
|
||||
# 查询
|
||||
${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}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
*** 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
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/trafficmirror
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Traffic Mirror Policy CRUD case
|
||||
|
||||
# 新增
|
||||
${response} CreatePolicyFile3 ${url}
|
||||
|
||||
# 查询
|
||||
${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}
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
*** 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
|
||||
|
||||
*** Variables ***
|
||||
${url} /policy/profile/trustedcacertobj
|
||||
${certId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Trusted Cert Policy CRUD case
|
||||
|
||||
# 新增
|
||||
${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/Intermediate/ tang-ca-v3-intermediate-01-cer.pem ${header_edit}
|
||||
|
||||
255
01-TestCase/tsg_bfapi/policy_object/PolicyObjectTests.robot
Normal file
255
01-TestCase/tsg_bfapi/policy_object/PolicyObjectTests.robot
Normal file
@@ -0,0 +1,255 @@
|
||||
*** Settings ***
|
||||
Test Teardown DeletePolicyAndObjectAndProfile ${policyIds} ${objectIds} ${profiles}
|
||||
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||
*** Variables ***
|
||||
@{profiles}
|
||||
*** Test Cases ***
|
||||
Policy-Get-v1-00001
|
||||
${policy} Create Dictionary policyType=tsg_security action=deny
|
||||
... pageNo=1 pageSize=10
|
||||
${rescode} ${response} QueryPolicies ${policy} v1
|
||||
${policyIds} Create List
|
||||
${objectIds} Set Variable ${EMPTY}
|
||||
Log ${rescode} ${response}
|
||||
Policy-Get-v2-00001
|
||||
${policy} Create Dictionary policyType=tsg_security action=deny
|
||||
... pageNo=1 pageSize=10
|
||||
${rescode} ${response} QueryPolicies ${policy} v2
|
||||
${policyIds} Create List
|
||||
${objectIds} Set Variable ${EMPTY}
|
||||
Log ${rescode} ${response}
|
||||
Policy-Post-v1-00001
|
||||
${policy} Create Dictionary policyId=1 policyType=tsg_security
|
||||
... policyName=wx-policyName1 action=allow doBlacklist=0
|
||||
... doLog=0 isValid=1 effectiveRange={}
|
||||
... userRegion={"protocol":"HTTP","traffic_forward":{"enable":1}}
|
||||
${objectIds} Set Variable ${EMPTY}
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policy} v1
|
||||
Log ${rescode} ${policyIds} ${objectIds}
|
||||
Policy-Post-v2-00001
|
||||
${policy} Create Dictionary policyId=1 policyType=tsg_security
|
||||
... policyName=wx-policyName1 action=allow doBlacklist=0
|
||||
... doLog=0 isValid=1 effectiveRange={}
|
||||
... userRegion={"protocol":"HTTP","traffic_forward":{"enable":1}}
|
||||
${objectIds} Set Variable ${EMPTY}
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policy} v2
|
||||
Log ${rescode} ${policyIds} ${objectIds}
|
||||
Policy-Post-v1-00002
|
||||
${policy} Create Dictionary policyId=1 policyType=tsg_security
|
||||
... policyName=wx-policyName1 action=allow doBlacklist=0
|
||||
... doLog=0 isValid=1 effectiveRange={}
|
||||
... userRegion={"protocol":"HTTP","traffic_forward":{"enable":1}}
|
||||
|
||||
${policy1} Create Dictionary policyId=2 policyType=tsg_security
|
||||
... policyName=wx-policyName2 action=allow doBlacklist=0
|
||||
... doLog=0 isValid=1
|
||||
... userRegion={"protocol":"HTTP","traffic_forward":{"enable":1}}
|
||||
|
||||
${policy2} Create Dictionary policyId=3 policyType=tsg_security
|
||||
... policyName=wx-policyName3 action=allow doBlacklist=0
|
||||
... doLog=0 isValid=0
|
||||
... userRegion={"protocol":"HTTP","traffic_forward":{"enable":1}}
|
||||
${objectIds} Set Variable ${EMPTY}
|
||||
@{policyList} Create List ${policy} ${policy1} ${policy2}
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policyList} v1
|
||||
Log ${rescode} ${policyIds} ${objectIds}
|
||||
Policy-Post-v2-00002
|
||||
${policy} Create Dictionary policyId=1 policyType=tsg_security
|
||||
... policyName=wx-policyName1 action=allow doBlacklist=0
|
||||
... doLog=0 isValid=1 effectiveRange={}
|
||||
... userRegion={"protocol":"HTTP","traffic_forward":{"enable":1}}
|
||||
|
||||
${policy1} Create Dictionary policyId=2 policyType=tsg_security
|
||||
... policyName=wx-policyName2 action=allow doBlacklist=0
|
||||
... doLog=0 isValid=1
|
||||
... userRegion={"protocol":"HTTP","traffic_forward":{"enable":1}}
|
||||
|
||||
${policy2} Create Dictionary policyId=3 policyType=tsg_security
|
||||
... policyName=wx-policyName3 action=allow doBlacklist=0
|
||||
... doLog=0 isValid=0
|
||||
... userRegion={"protocol":"HTTP","traffic_forward":{"enable":1}}
|
||||
${objectIds} Set Variable ${EMPTY}
|
||||
@{policyList} Create List ${policy} ${policy1} ${policy2}
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policyList} v2
|
||||
Log ${rescode} ${policyIds} ${objectIds}
|
||||
Policy-Post-v1-00003
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*baidu.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policy} Create Dictionary policyName=WX_SecurityPolicy-v1-00003 policyType=tsg_security
|
||||
... policyDesc=autotest userTags=
|
||||
... action=deny effectiveRange={}
|
||||
... userRegion={"protocol":"SSL","method":"drop"}
|
||||
... referenceObject=${objectId}|TSG_FIELD_SSL_CN&TSG_FIELD_SSL_SAN
|
||||
... isValid=${1} appObjectIdArray=3
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policy} v1
|
||||
Log ${rescode} ${policyIds} ${objectIds}
|
||||
Policy-Post-v2-00004
|
||||
#${testClentID} ${testClentSubID}
|
||||
Comment 创建fqdn
|
||||
${objectDict} Create Dictionary objectType=fqdn isValid=${1} addItemList=*baidu.com
|
||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId}
|
||||
Comment 创建安全策略
|
||||
${policy} Create Dictionary policyName=WX_SecurityPolicy-v2-00004 policyType=tsg_security
|
||||
... policyDesc=autotest
|
||||
... action=deny #effectiveRange={}
|
||||
... userRegion={"protocol":"SSL","method":"drop"}
|
||||
... filterList=${objectId}:TSG_FIELD_SSL_CN
|
||||
... isValid=${1} appIdObjects=3
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policy} v2
|
||||
Log ${rescode} ${policyIds} ${objectIds}
|
||||
Policy-Post-v2-00005
|
||||
Comment 创建IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1}
|
||||
... isInitialize=0
|
||||
... addItemList=range|192.168.41.68|192.168.41.68|0/0
|
||||
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId1}
|
||||
Log To Console Create IP Object
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*baidu.com
|
||||
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId2},${objectIds}
|
||||
Log To Console Create url Object
|
||||
Comment 创建安全策略
|
||||
${policy} Create Dictionary policyName=WX_SecurityPolicy-v2-00005 policyType=tsg_security
|
||||
... policyDesc=wx-autotest
|
||||
... action=deny effectiveRange={}
|
||||
... userRegion={"protocol":"HTTP","method":"drop"}
|
||||
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
|
||||
... destination=${objectId2}|TSG_FIELD_HTTP_URL
|
||||
... isValid=${1} appIdObjects=2
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policy} v2
|
||||
Log ${rescode} ${policyIds} ${objectIds}
|
||||
Policy-Post-v2-00006
|
||||
[Tags] reflection
|
||||
${caseName} set variable WX_ActiveDefencePolicy-Reflection-V2-00006
|
||||
${target_ip} set variable 10.3.22.139
|
||||
Comment claimed_src_ip_profile_id
|
||||
${response} BasePostRequest /v1/policy/profile/reflector body={"opAction":"add","returnData":1,"reflectorList":[{"profileName":"autotest","addrType":4,"ipList":["10.3.22.11"],"reflectorType":"dns","isValid":1,"profileDesc":"autotest"}]}
|
||||
${reflector_profile_id} Set Variable ${response['data']['list'][0]['profileId']}
|
||||
${response} BasePostRequest /v1/policy/profile/reflector/payload body={"opAction":"add","returnData":1,"reflectorList":[{"profileName":"autotest","reflectorType":"dns","payload":"zasBAAABAAAAAAAABHRlc3QDY29tAAD/AAE=","isValid":1,"profileDesc":""}]}
|
||||
#${response} BasePostRequest /policy/profile/reflector/payload body={"opAction":"add","returnData":1,"reflectorList":[{"profileName":"autotest","reflectorPayload":"dns","payload":"zasBAAABAAAAAAAABHRlc3QDY29tAAD/AAE=","isValid":1,"profileDesc":""}]}
|
||||
${payload_profile_id} Set Variable ${response['data']['list'][0]['profileId']}
|
||||
Comment 创建策略reflection
|
||||
${policyDict} Create Dictionary
|
||||
... policyName=${caseName}
|
||||
... policyType=active_defence
|
||||
... policyDesc=${caseName}
|
||||
... action=activeDefence
|
||||
... userRegion={"method":"reflection","reflector_type":"DNS","target_ip":"${target_ip}","target_port":1234,"rate_pps":1,"payload_profile_id":${payload_profile_id},"reflector_profile_id":${reflector_profile_id}}
|
||||
... isValid=1
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policyDict} v2
|
||||
${profile} Create Dictionary typeUrl=reflector profileIds=${reflector_profile_id}
|
||||
${profile1} Create Dictionary typeUrl=reflector/payload profileIds=${payload_profile_id}
|
||||
Append To List ${profiles} ${profile} ${profile1}
|
||||
${objectIds} Set Variable ${EMPTY}
|
||||
Log ${rescode} ${policyIds} ${objectIds}
|
||||
Policy-Post-v2-00007
|
||||
Comment 创建IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1}
|
||||
... isInitialize=0
|
||||
... addItemList=range|192.168.41.68|192.168.41.68|0/0
|
||||
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId1}
|
||||
Log To Console Create IP Object1
|
||||
Comment 创建IP1
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1}
|
||||
... isInitialize=0
|
||||
... addItemList=range|192.168.41.67|192.168.41.67|0/0
|
||||
${rescode} ${objectId2} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId2}
|
||||
Log To Console Create IP Object2
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*baidu.com
|
||||
${rescode} ${objectId3} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId3},${objectIds}
|
||||
Log To Console Create url Object3
|
||||
Comment 创建url1
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*google.com.com
|
||||
${rescode} ${objectId4} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId4},${objectIds}
|
||||
Log To Console Create url Object4
|
||||
Comment 创建安全策略
|
||||
${policy} Create Dictionary policyName=WX_AddPolicy-v2-00007 policyType=tsg_security
|
||||
... policyDesc=wx-autotest
|
||||
... action=deny effectiveRange={}
|
||||
... userRegion={"protocol":"HTTP","method":"drop"}
|
||||
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
|
||||
... destination=${objectId3}|TSG_FIELD_HTTP_URL
|
||||
... isValid=${1} appIdObjects=2
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policy} v2
|
||||
Log ${rescode}
|
||||
${updatePolicyId} Set Variable ${policyIds}[0][policyIds][0]
|
||||
Comment 更新安全策略
|
||||
${policy} Create Dictionary policyName=WX_UpdatePolicy-v2-00007 policyType=tsg_security
|
||||
... policyDesc=wx-autotest policyId=${updatePolicyId}
|
||||
... action=monitor
|
||||
... userRegion={"protocol":"HTTP","traffic_forward":{"enable":1}}
|
||||
... source=${objectId2}|TSG_SECURITY_SOURCE_ADDR
|
||||
... destination=${objectId4}|TSG_FIELD_HTTP_URL
|
||||
... isValid=${1} appIdObjects=2
|
||||
${rescode} UpdatePolicies 1 ${policy} v2 update
|
||||
Policy-Post-v2-00008
|
||||
Comment 创建IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1}
|
||||
... isInitialize=0
|
||||
... addItemList=range|192.168.41.68|192.168.41.68|0/0
|
||||
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId1}
|
||||
Log To Console Create IP Object1
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*baidu.com
|
||||
${rescode} ${objectId3} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId3},${objectIds}
|
||||
Log To Console Create url Object3
|
||||
|
||||
Comment 创建安全策略
|
||||
${policy} Create Dictionary policyName=WX_AddPolicy-v2-00008 policyType=tsg_security
|
||||
... policyDesc=wx-autotest
|
||||
... action=deny effectiveRange={}
|
||||
... userRegion={"protocol":"HTTP","method":"drop"}
|
||||
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
|
||||
... destination=${objectId3}|TSG_FIELD_HTTP_URL
|
||||
... isValid=${1} appIdObjects=2
|
||||
${policy1} Copy Dictionary ${policy} true
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policy} v2
|
||||
Log ${rescode}
|
||||
${updatePolicyId} Set Variable ${policyIds}[0][policyIds][0]
|
||||
Comment 更新安全策略
|
||||
Set To Dictionary ${policy1} policyId=${updatePolicyId}
|
||||
${rescode} UpdatePolicies 1 ${policy1} v2 disable
|
||||
Policy-Post-v2-00009
|
||||
Comment 创建IP
|
||||
${objectDict} Create Dictionary objectType=ip isValid=${1}
|
||||
... isInitialize=0
|
||||
... addItemList=range|192.168.41.68|192.168.41.68|0/0
|
||||
${rescode} ${objectId1} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId1}
|
||||
Log To Console Create IP Object1
|
||||
Comment 创建url
|
||||
${objectDict} Create Dictionary objectType=url isValid=${1} addItemList=*baidu.com
|
||||
${rescode} ${objectId3} AddObject2 ${1} ${objectDict}
|
||||
${objectIds} Set Variable ${objectId3},${objectIds}
|
||||
Log To Console Create url Object3
|
||||
|
||||
Comment 创建安全策略
|
||||
${policy} Create Dictionary policyName=WX_AddPolicy-v2-00009 policyType=tsg_security
|
||||
... policyDesc=wx-autotest
|
||||
... action=deny effectiveRange={}
|
||||
... userRegion={"protocol":"HTTP","method":"drop"}
|
||||
... source=${objectId1}|TSG_SECURITY_SOURCE_ADDR
|
||||
... destination=${objectId3}|TSG_FIELD_HTTP_URL
|
||||
... isValid=${0} appIdObjects=2
|
||||
${policy1} Copy Dictionary ${policy} true
|
||||
${rescode} ${policyIds} AddPolicies 1 ${policy} v2
|
||||
Log ${rescode}
|
||||
${updatePolicyId} Set Variable ${policyIds}[0][policyIds][0]
|
||||
Comment 更新安全策略
|
||||
Set To Dictionary ${policy1} policyId=${updatePolicyId}
|
||||
${rescode} UpdatePolicies 1 ${policy1} v2 enable
|
||||
67
01-TestCase/tsg_bfapi/setting/Claimedsrcip.robot
Normal file
67
01-TestCase/tsg_bfapi/setting/Claimedsrcip.robot
Normal file
@@ -0,0 +1,67 @@
|
||||
*** 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} /v1/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}
|
||||
|
||||
claimedsrcip-00002
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 192.168.0.1/16 192.168.0.2/16 192.168.0.3/24
|
||||
${objectedit} Create Dictionary profileName=朱brightясный 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}
|
||||
|
||||
claimedsrcip-00003
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 192.168.0.1/16 192.168.0.2/16 192.168.0.3/24
|
||||
${objectedit} Create Dictionary profileName=朱brightясный 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}
|
||||
264
01-TestCase/tsg_bfapi/setting/DecryptionProfile.robot
Normal file
264
01-TestCase/tsg_bfapi/setting/DecryptionProfile.robot
Normal file
@@ -0,0 +1,264 @@
|
||||
*** 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} /v1/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}
|
||||
|
||||
Decryption_Profile-00015
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=朱brightясный
|
||||
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}
|
||||
184
01-TestCase/tsg_bfapi/setting/Dnsrecords.robot
Normal file
184
01-TestCase/tsg_bfapi/setting/Dnsrecords.robot
Normal file
@@ -0,0 +1,184 @@
|
||||
*** 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} /v1/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=TXT 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=NS 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=PTR 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_Chinase_English_Russian_-00008
|
||||
#Hijack 需要修改的内容
|
||||
${Dict1} Create Dictionary value=abc.com
|
||||
${Dict2} Create Dictionary value=edf.com
|
||||
${list} Create List ${Dict1} ${Dict2}
|
||||
${objectedit} Create Dictionary recordName=朱brightясный recordType=PTR 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}
|
||||
517
01-TestCase/tsg_bfapi/setting/HijackFile24Type.robot
Normal file
517
01-TestCase/tsg_bfapi/setting/HijackFile24Type.robot
Normal file
@@ -0,0 +1,517 @@
|
||||
*** 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} /v1/policy/profile/hijackfiles
|
||||
${profileId} ${EMPTY}
|
||||
*** Keywords ***
|
||||
ProfileComman
|
||||
[Arguments] ${objectedit} ${type} ${fileName}
|
||||
${default_json} ${default_files} ${default_url} Run Keyword If "${type}"=="hijack" Set Variable ${setting_proxy_profiles_hijack} hijack_files/ /v1/policy/profile/hijackfiles
|
||||
... ELSE IF Run Keyword If "${type}"=="insert" Set Variable ${setting_proxy_profiles_insert} insert_files/ /v1/policy/profile/insertfiles
|
||||
... ELSE Set Variable a b c
|
||||
|
||||
${objectDict} Jsoneditmanu ${default_json} ${objectedit}
|
||||
log ${objectDict}
|
||||
${response} CreatePolicyFile4 ${default_url} ${default_files} ${fileName} ${objectDict}
|
||||
#${url} ${filePath} ${fileName} ${objectDict}
|
||||
[Return] ${response}
|
||||
*** Test Cases ***
|
||||
Hijack_file_24_type-apk
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=Hijack_file_24_type-apk contentName=Create-Hijack Files-test-0.apk contentType=application/vnd.android.package-archive
|
||||
${response} ProfileComman ${objectedit} hijack Create-Hijack Files-test-0.apk
|
||||
# 查询
|
||||
${profileId} Get From Dictionary ${response} profileId
|
||||
##########################以上为封装示例###################################
|
||||
|
||||
|
||||
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":"text/plain","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack_Files-test-24.txt","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack_Files-test-24.txt ${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":"text/plain","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-24.plain","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-24.plain ${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":"text/comma-separated-values","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-23.csv","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-23.csv ${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":"text/css","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-22.css","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-22.css ${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":"application/vnd.oasis.opendocument.text","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-21.odt","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-21.odt ${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":"application/vnd.openxmlformats-officedocument.presentationml.presentation","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-20.pptx","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-20.pptx ${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":"application/x-ppt","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-19.ppt","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-19.ppt ${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":"application/vnd.ms-powerpoint","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-19.ppt","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-19.ppt ${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":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-18.xlsx","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-18.xlsx ${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":"application/x-xls","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-17.xls","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-17.xls ${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":"application/vnd.ms-excel","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-17.xls","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-17.xls ${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":"application/pdf","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-16.pdf","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-16.pdf ${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":"text/xml","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-15.xml","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-15.xml ${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":"application/json","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-14.json","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-14.json ${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":"application/vnd.openxmlformats-officedocument.wordprocessingml.document","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-13.docx","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-13.docx ${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":"application/msword","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-12.doc","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-12.doc ${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":"application/x-zip-compressed","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-11.zip","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-11.zip ${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":"application/octet-stream","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-10.rar","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-10.rar ${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":"application/x-javascript","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-9.js","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-9.js ${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":"application/x-apple-diskimage","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-8.dmg","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-8.dmg ${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":"audio/x-pn-realaudio-plugin","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-7.rpm","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-7.rpm ${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/svg%2Bxml","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-6.svg","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-6.svg ${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":"application/x-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/jpeg","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-4.jpeg","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-4.jpeg ${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":"text/html","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-3.html","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-3.html ${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/gif","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-2.gif","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-2.gif ${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":"application/x-msdos-program","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-1.exe","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-1.exe ${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":"application/vnd.android.package-archive","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-0.apk","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-0.apk ${header_edit}
|
||||
|
||||
Hijack_file_24_type_Chinase_English_Russian-00026
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=Zhuming%E6%98%8E!%40%23%40%24%25%5E%26(())__%2B%2B%2B%2B%2B(*%26%25%24%5E%25%23%24!~!%40%5E%25%26*()((_%E2%96%89%E2%96%88%E2%96%87%E2%96%86%E2%96%8B%E2%96%8D%E2%96%8E%E2%88%9A%E2%98%9A%E2%98%9A%E3%8F%98%E2%98%9B%E2%88%9A%E2%80%A6%E3%89%BF%E3%80%93%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0 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":"application/vnd.android.package-archive","opAction":"update","profileName":"test_edit","contentName":"Create-Hijack Files-test-0.apk","profileId":"${profileId}","returnData":1}
|
||||
UpdatePolicyFile ${url} hijack_files/ Create-Hijack Files-test-0.apk ${header_edit}
|
||||
98
01-TestCase/tsg_bfapi/setting/InsertScriptsPolicy.robot
Normal file
98
01-TestCase/tsg_bfapi/setting/InsertScriptsPolicy.robot
Normal file
@@ -0,0 +1,98 @@
|
||||
*** 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} /v1/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}
|
||||
|
||||
Insert_Scripts_css_after-00005
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=%E6%9C%B1bright%D1%8F%D1%81%D0%BD%D1%8B%D0%B9 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}
|
||||
41
01-TestCase/tsg_bfapi/setting/IntermediaCert.robot
Normal file
41
01-TestCase/tsg_bfapi/setting/IntermediaCert.robot
Normal file
@@ -0,0 +1,41 @@
|
||||
*** 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} /v1/policy/exch/intermediacert
|
||||
|
||||
*** Test Cases ***
|
||||
IntermediaCertPolicy-00001
|
||||
# 查询1
|
||||
QueryPolicyFile ${url} pageNo=1
|
||||
# 查询2
|
||||
${suffix_quary} Catenate SEPARATOR=& pageNo=1 pageSize=20
|
||||
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}
|
||||
|
||||
IntermediaCertPolicy-00002
|
||||
# 查询1
|
||||
QueryPolicyFile ${url} pageNo=1
|
||||
# 查询2
|
||||
${suffix_quary} Catenate SEPARATOR=& pageNo=2 pageSize=30
|
||||
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}
|
||||
51
01-TestCase/tsg_bfapi/setting/KeyringPolicyFile.robot
Normal file
51
01-TestCase/tsg_bfapi/setting/KeyringPolicyFile.robot
Normal file
@@ -0,0 +1,51 @@
|
||||
*** 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} /v1/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}
|
||||
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}
|
||||
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-02-cer.pem tang-ca-v3-intermediate-02-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}
|
||||
UpdatePolicyMutipartFile ${url} keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem tang-ca-v3-www.amazon.cn-key.pem ${header_edit}
|
||||
50
01-TestCase/tsg_bfapi/setting/Reflector.robot
Normal file
50
01-TestCase/tsg_bfapi/setting/Reflector.robot
Normal file
@@ -0,0 +1,50 @@
|
||||
*** 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} /v1/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}
|
||||
|
||||
reflector-00002
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 192.168.0.1 192.168.0.2 192.168.0.3
|
||||
${objectedit} Create Dictionary profileName=%E6%9C%B1bright%D1%8F%D1%81%D0%BD%D1%8B%D0%B9 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}
|
||||
48
01-TestCase/tsg_bfapi/setting/ReflectorPayload.robot
Normal file
48
01-TestCase/tsg_bfapi/setting/ReflectorPayload.robot
Normal file
@@ -0,0 +1,48 @@
|
||||
*** 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} /v1/policy/profile/reflector/payload
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
ReflectorPayload-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}
|
||||
|
||||
ReflectorPayload-00002
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=朱brightясный 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}
|
||||
54
01-TestCase/tsg_bfapi/setting/ResponsePagesPolicy.robot
Normal file
54
01-TestCase/tsg_bfapi/setting/ResponsePagesPolicy.robot
Normal file
@@ -0,0 +1,54 @@
|
||||
*** 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} /v1/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}
|
||||
|
||||
Response_page_html-00002
|
||||
#Hijack 需要修改的内容
|
||||
${objectedit} Create Dictionary profileName=%E6%9C%B1bright%D1%8F%D1%81%D0%BD%D1%8B%D0%B9 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}
|
||||
117
01-TestCase/tsg_bfapi/setting/TrafficMirrorPolicy.robot
Normal file
117
01-TestCase/tsg_bfapi/setting/TrafficMirrorPolicy.robot
Normal file
@@ -0,0 +1,117 @@
|
||||
*** 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} /v1/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}
|
||||
|
||||
TrafficMirrorPolicy_mac_Multi_object-00005
|
||||
#Hijack 需要修改的内容
|
||||
${list} Create List 13:13:13:13:13:13 13:13:13:13:13:13
|
||||
${objectedit} Create Dictionary profileName=%E6%9C%B1bright%D1%8F%D1%81%D0%BD%D1%8B%D0%B9 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} /v1/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}
|
||||
82
01-TestCase/tsg_bfapi/setting/test.robot
Normal file
82
01-TestCase/tsg_bfapi/setting/test.robot
Normal file
@@ -0,0 +1,82 @@
|
||||
*** 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} /v1/policy/profile/hijackfiles
|
||||
${profileId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
Hijack_file_24_type-hijack
|
||||
#Hijack
|
||||
${objectedit} Create Dictionary profileName=Hijack_file_24_type-00000 contentName=Create-Hijack Files-test-0.apk contentType=application/vnd.android.package-archive
|
||||
${response} settings ${objectedit} hijack
|
||||
|
||||
Hijack_file_24_type-insert
|
||||
#insert
|
||||
${objectedit} Create Dictionary profileName=zmminserttest format=js insertOn=before_page_load contentName=Create-Insert Scripts-test-1.js
|
||||
${response} settings ${objectedit} insert
|
||||
|
||||
Hijack_file_24_type-response
|
||||
#insert
|
||||
${objectedit} Create Dictionary profileName=zmminserttest format=js insertOn=before_page_load
|
||||
${response} settings ${objectedit} response
|
||||
|
||||
*** Keywords ***
|
||||
ProfileComman1
|
||||
[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}
|
||||
|
||||
settings
|
||||
[Arguments] ${dict} ${type}
|
||||
#创建3个列表,代表不同的接口类型
|
||||
@{Interface_file} create list hijack insert
|
||||
@{Interface_post} create list claimedsrcip Reflector
|
||||
@{Interface_ceri} create list keyring TrustedCertPolicy
|
||||
#创建3个返回值用于接口参数
|
||||
${setting_json} catenate SEPARATOR= setting_proxy_profiles_ ${type}
|
||||
log ${setting_json}
|
||||
${setting_file} catenate SEPARATOR= ${type} _files /
|
||||
log ${setting_file}
|
||||
${setting_url} catenate SEPARATOR= /policy/profile/ ${type} files
|
||||
log ${setting_url}
|
||||
${response} Run Keyword If "${type}" in @{Interface_file} Interface_file ${setting_json} ${setting_url} ${setting_file} ${dict}
|
||||
... ELSE IF Run Keyword If ${type}in @{Interface_post} Interface_post ${setting_json} ${setting_url} ${dict}
|
||||
... ELSE IF Run Keyword If ${type}in @{Interface_ceri} Interface_Ceri ${setting_url} ${setting_file} ${dict}
|
||||
log ${response}
|
||||
|
||||
Interface_file
|
||||
[Arguments] ${setting_json} ${setting_url} ${setting_file} ${dict}
|
||||
${file_name} Set Variable ${dict}[contentName]
|
||||
${objectDict} Jsoneditmanu ${${setting_json}} ${dict}
|
||||
${response} CreatePolicyFile4 ${setting_url} ${setting_file} ${file_name} ${objectDict}
|
||||
[Return] ${response}
|
||||
|
||||
Interface_post
|
||||
[Arguments] ${setting_json} ${setting_url} ${dict}
|
||||
${objectDict} Jsoneditmanu ${setting_json} ${dict}
|
||||
${response} Post-Request ${setting_url} ${objectDict}
|
||||
[Return] ${response}
|
||||
|
||||
Interface_Ceri
|
||||
[Arguments] ${setting_url} ${setting_file} ${dict}
|
||||
${file_name} Set Variable ${dict}[0]
|
||||
${file1} Set Variable ${dict}[1]
|
||||
${file2} Set Variable ${dict}[2]
|
||||
${TypeCeri} Set Variable ${dict}[3]
|
||||
${response} CreatePolicyMutipartFile ${setting_url} ${setting_file} ${file1} ${file2} ${TypeCeri}
|
||||
[Return] ${response}
|
||||
@@ -1,5 +1,5 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-cli Policy EnDisable
|
||||
Force Tags tsg_cli tsg_device EnDisable
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/Interface.robot
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
*** Settings ***
|
||||
Test Teardown Clear_Test_Data
|
||||
Force Tags tsg-cli Object ExImport
|
||||
Force Tags tsg_cli tsg_device ExImport
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/Interface.robot
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg_cli tsg_device OtherCommand
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/Interface.robot
|
||||
|
||||
*** Test Cases ***
|
||||
Tsg_Help_TestCase
|
||||
[Tags] tsg-cli TsgHelp
|
||||
[Tags] tsg_cli TsgHelp
|
||||
Tsg_Help_Keyword
|
||||
Tsg_Command_Help tsg_policy
|
||||
Tsg_Command_Help tsg_policy_object
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-cli ManipulationPolicy Query
|
||||
Force Tags tsg_cli tsg_device ManipulationPolicy Query
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/Interface.robot
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-cli Object Query
|
||||
Resource ../../03-Variable/bifangapivariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/interface.robot
|
||||
Force Tags tsg_cli tsg_device Object Query
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/Interface.robot
|
||||
|
||||
*** Test Cases ***
|
||||
Objects_Query_TestCase
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-cli SecurityPolicy Query
|
||||
Force Tags tsg_cli tsg_device SecurityPolicy Query
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../02-Keyword/tsg_cli/Interface.robot
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-mib query
|
||||
Force Tags tsg_mib tsg_device query
|
||||
Test Setup OpenMibConnection
|
||||
Test Teardown CloseMibConnection
|
||||
Library json
|
||||
|
||||
315
01-TestCase/tsg_oam/OamApi.robot
Normal file
315
01-TestCase/tsg_oam/OamApi.robot
Normal file
@@ -0,0 +1,315 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg_oam tsg_device
|
||||
Library REST
|
||||
Resource ../../03-Variable/BifangApiVariable.txt
|
||||
Library OperatingSystem
|
||||
Library Selenium2Library
|
||||
Library RequestsLibrary
|
||||
Library Collections
|
||||
Library REST http://${oamHost}:${oamPort}/
|
||||
*** Variables ***
|
||||
${url} chassis-daji-00001
|
||||
${profileId} ${EMPTY}
|
||||
*** Keywords ***
|
||||
OamGetRequest
|
||||
[Arguments] ${requestUri} ${data}
|
||||
${headers} set variable {"Content-Type":"application/json"}
|
||||
create session api http://${oamHost}:${oamPort}/ ${headers}
|
||||
${response} Get Request api ${requestUri} data=${data}
|
||||
log return data =${response}
|
||||
Should Be Equal As Strings ${response.status_code} 200
|
||||
${response} to json ${response.content}
|
||||
${rescode} Set Variable ${response}[code]
|
||||
Should Be Equal As Strings ${rescode} 200
|
||||
[Return] ${response}
|
||||
OamPostRequest
|
||||
[Arguments] ${requestUri} ${data}
|
||||
${headers} set variable {"Content-Type":"application/json"}
|
||||
create session api http://${oamHost}:${oamPort}/ ${headers}
|
||||
${response}= Post Request api ${requestUri} data=${data}
|
||||
log return data =${response}
|
||||
Should Be Equal As Strings ${response.status_code} 200
|
||||
${response} to json ${response.content}
|
||||
${rescode} Set Variable ${response}[code]
|
||||
Should Be Equal As Strings ${rescode} 200
|
||||
[Return] ${response}
|
||||
OamDeleteRequest
|
||||
[Arguments] ${requestUri} ${data}
|
||||
${headers} set variable {"Content-Type":"application/json"}
|
||||
create session api http://${oamHost}:${oamPort}/ ${headers}
|
||||
${response}= Delete Request api ${requestUri} data=${data}
|
||||
log return data =${response}
|
||||
Should Be Equal As Strings ${response.status_code} 200
|
||||
${response} to json ${response.content}
|
||||
${rescode} Set Variable ${response}[code]
|
||||
Should Be Equal As Strings ${rescode} 200
|
||||
${datalist} Get From Dictionary ${response}[data] list
|
||||
${len} Get Length ${datalist}
|
||||
FOR ${var} IN RANGE ${len}
|
||||
Should Contain ${datalist}[${var}][result] success
|
||||
END
|
||||
[Return] ${response}
|
||||
*** Test Cases ***
|
||||
writestarttime
|
||||
${starttime} Get Time
|
||||
Append To File ${path}/OamApi_file.txt ${starttime}----------------------------------------------
|
||||
|
||||
chassis-danji-00165
|
||||
#获取单个板卡的信息
|
||||
#${caseName} set variable chassis-danji-00001
|
||||
Comment chassis-danji-00165
|
||||
${response} OamGetRequest /tsgoam/cm/chassis/192.168.40.165 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 165:${response}
|
||||
|
||||
chassis-danji-00170
|
||||
${response} OamGetRequest /tsgoam/cm/chassis/192.168.40.170 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 170:${response}
|
||||
chassis-danji-00175
|
||||
${response} OamGetRequest /tsgoam/cm/chassis/192.168.40.175 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 175:${response}
|
||||
chassis-danji-0025
|
||||
${response} OamGetRequest /tsgoam/cm/chassis/192.168.40.25 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
fru-sled-00001-165
|
||||
#获取单个板卡的FRU信息 获取单个板卡的FRU信息
|
||||
#${caseName} set variable chassis-danji-00001
|
||||
Comment fru-sled-00001
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.165/0 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 165:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.165/1 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 165:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.165/2 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 165:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.165/3 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 165:${response}
|
||||
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.165/100 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 165:${response}
|
||||
fru-sled-00002-170
|
||||
#获取单个板卡的FRU信息 获取单个板卡的FRU信息
|
||||
#${caseName} set variable chassis-danji-00001
|
||||
Comment fru-sled-00002
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.170/100 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 170:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.170/0 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 170:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.170/1 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 170:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.170/2 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 170:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.170/3 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 170:${response}
|
||||
|
||||
fru-sled-00003-175
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.175/100 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 175:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.175/0 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 175:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.175/1 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 175:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.175/2 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 175:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.175/3 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 175:${response}
|
||||
|
||||
fru-sled-00003-25
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.25/100 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.25/0 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.25/1 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.25/2 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
${response} OamGetRequest /tsgoam/cm/FRU/192.168.40.25/3 ${EMPTY}
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
|
||||
hostname-sled-00001可以在170xxg-adc03-mxn
|
||||
Comment ntpsrv-sled-00001更新hostname更新板卡CentOS的hostname,需要用户手动重启network service或reboot后才能生效
|
||||
${response} OamPostRequest /tsgoam/cm/hostname/ [{"chassis_ip":"192.168.40.170","sled_id":0,"hostname":"hy-adc03-mxn"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 170:${response}
|
||||
|
||||
${response} OamPostRequest /tsgoam/cm/hostname/ [{"chassis_ip":"192.168.40.170","sled_id":0,"hostname":"xxg-adc03-mxn"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
|
||||
ntpsrv-sled-00001
|
||||
Comment ntpsrv-sled-00001更新ntp server设置设置ntp server,注意调用此方法会同时更新TSG上所有板卡的ntp配置,即将计算板的ntp server指向交换板,将交换板的ntp server指向目标机器。
|
||||
${response} OamPostRequest /tsgoam/cm/ntpsrv/ [{"chassis_ip":"192.168.40.170","ntpsrv_ip":"192.168.40.1"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
softwarereboot-sled-00001
|
||||
Comment softwarereboot-sled-00001 重启板卡软件
|
||||
#${response} OamPostRequest /tsgoam/cm/softwarereboot/ [{"chassis_ip":"192.168.40.170","sled_id":0},{"chassis_ip":"192.168.40.170","sled_id":1},{"chassis_ip":"192.168.40.170","sled_id":2},{"chassis_ip":"192.168.40.170","sled_id":3},,{"chassis_ip":"192.168.40.170","sled_id":100}]
|
||||
#${response} OamPostRequest /tsgoam/cm/softreboot/ [{"chassis_ip":"192.168.40.170","sled_id":0},{"chassis_ip":"192.168.40.170","sled_id":1},{"chassis_ip":"192.168.40.170","sled_id":2},{"chassis_ip":"192.168.40.170","sled_id":3},{"chassis_ip":"192.168.40.170","sled_id":100}]
|
||||
${response} OamPostRequest /tsgoam/cm/softreboot/ [{"chassis_ip":"192.168.40.165","sled_id":3}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
######################################################################
|
||||
alarm-chassis-00001
|
||||
Comment alarm-chassis-00001 获取一个或多个设备的告警列表
|
||||
${response} OamPostRequest /tsgoam/fm/alarms/ [{"chassis_ip":"192.168.40.165","chassis_sn":"CBT2201925000001","where":"component = 'syslog'"},{"chassis_ip":"192.168.40.170","chassis_sn":"CBT2201925000003","where":"component = 'syslog'"},{"chassis_ip":"192.168.40.175","chassis_sn":"CBT2201925000004","where":"component = 'syslog'"},{"chassis_ip":"192.168.40.25","chassis_sn":"CBT2201925000200","where":"component = 'syslog'"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
|
||||
del-alarm-chassis-00001
|
||||
Comment del-alarm-chassis-00001 清除指定告警
|
||||
#${response} OamDeleteRequest /tsgoam/fm/alarms/ [{"alarm_id":"CBT22019250000030000000000255100","chassis_ip":"192.168.40.170","operator":"dongxiaoyan","notes":"auto"}]
|
||||
${response} OamDeleteRequest /tsgoam/fm/alarms/ [{"alarm_id":"CBT22019250000010000000003422719","chassis_ip":"192.168.40.165","operator":"dongxiaoyan","notes":"auto"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
|
||||
status-chassis-00001
|
||||
Comment status-chassis-00001 获取板卡的状态 根据chassis或者sled的alarm数量,计算板卡状态:green, yellow, red。返回改chassis下所有sled的状态和chassis的状态
|
||||
${response} OamPostRequest /tsgoam/fm/status/ [{"chassis_ip":"192.168.40.165","chassis_sn":"CBT2201925000001"},{"chassis_ip":"192.168.40.170","chassis_sn":"CBT2201925000003"},{"chassis_ip":"192.168.40.175","chassis_sn":"CBT2201925000004"},{"chassis_ip":"192.168.40.25","chassis_sn":"CBT2201925000200"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 4:${response}
|
||||
${response} OamPostRequest /tsgoam/fm/status/ [{"chassis_ip":"192.168.40.165","chassis_sn":"CBT2201925000001"},{"chassis_ip":"192.168.40.170","chassis_sn":"CBT2201925000003"},{"chassis_ip":"192.168.40.175","chassis_sn":"CBT2201925000004"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 3:${response}
|
||||
${response} OamPostRequest /tsgoam/fm/status/ [{"chassis_ip":"192.168.40.165","chassis_sn":"CBT2201925000001"},{"chassis_ip":"192.168.40.170","chassis_sn":"CBT2201925000003"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 2:${response}
|
||||
${response} OamPostRequest /tsgoam/fm/status/ [{"chassis_ip":"192.168.40.165","chassis_sn":"CBT2201925000001"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 1:${response}
|
||||
|
||||
threshold-chassis-00001
|
||||
Comment threshold-chassis-00001获取设备counter的threshold值
|
||||
${response} OamPostRequest /tsgoam/fm/threshold/ [{"chassis_ip":"192.168.40.165"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 165:${response}
|
||||
${response} OamPostRequest /tsgoam/fm/threshold/ [{"chassis_ip":"192.168.40.170"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 170:${response}
|
||||
${response} OamPostRequest /tsgoam/fm/threshold/ [{"chassis_ip":"192.168.40.25"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 25:${response}
|
||||
|
||||
${response} OamPostRequest /tsgoam/fm/threshold/ [{"chassis_ip":"192.168.40.165"},{"chassis_ip":"192.168.40.170"},{"chassis_ip":"192.168.40.175"},{"chassis_ip":"192.168.40.25"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log 4:${response}
|
||||
thresholds-chassis-00165
|
||||
Comment thresholds-chassis-00001 设置设备counter的threshold值,覆盖更新传入的值
|
||||
${response} OamPostRequest /tsgoam/fm/thresholds/ [{"chassis_ip":"192.168.40.165","Temp_XL710_82599@CBT2201925000001_mcn2_hardware":[ {"critical+":90.5,"critical-":-10.5}, { "major+":80.5,"major-":-5.5}, { "minor+":70.5, "minor-":0.5} ] }]
|
||||
${responseString} Convert To String ${response}
|
||||
${response} OamPostRequest /tsgoam/fm/threshold/ [{"chassis_ip":"192.168.40.165"}]
|
||||
${responseString} Convert To String ${response}
|
||||
${response} OamPostRequest /tsgoam/fm/thresholds/ [{"chassis_ip":"192.168.40.165","Temp_XL710_82599@CBT2201925000001_mcn2_hardware":[ {"critical+":90.0,"critical-":-10.0}, { "major+":80.0,"major-":-5.0}, { "minor+":70.0, "minor-":0.0} ] }]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log ${response}
|
||||
syn-chassis-00170
|
||||
Comment syn-chassis-00001告警强制同步接口
|
||||
${response} OamPostRequest /tsgoam/fm/syn/ [{"chassis_ip":"192.168.40.165","chassis_sn":"CBT2201925000001"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log ${response}
|
||||
######################################################################
|
||||
oamcore-chassis-00165
|
||||
Comment oamcore-chassis-00001 设置oam_core的运行参数
|
||||
#${response} OamPostRequest /tsgoam/settings/oam_core/ [{"chassis_ip":"192.168.40.165","oam.cluster.server.ip":"192.168.40.2110","datasource.second.username":"root1","datasource.second.password":"1111110","oam.writer.scheduler.interval":"600001","oam.writer.scheduler.ipmi.interval":"1800001","logging.level.com.tsg.oam":"DEBUG"}]
|
||||
#${responseString} Convert To String ${response}
|
||||
#Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
${response} OamPostRequest /tsgoam/settings/oam_core/ [{"chassis_ip":"192.168.40.165","oam.cluster.server.ip":"192.168.40.210","datasource.second.username":"root","datasource.second.password":"111111","oam.writer.scheduler.interval":"60000","oam.writer.scheduler.ipmi.interval":"180000","logging.level.com.tsg.oam":"ERROR"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log ${response}
|
||||
|
||||
oamsnmp-chassis-00165
|
||||
Comment oamsnmp-chassis-00001设置oam_snmp的运行参数
|
||||
${response} OamPostRequest /tsgoam/settings/oam_snmp/ [{"chassis_ip":"192.168.40.165","oam.influx.recentminutes":6,"logging.level.com.oam.snmp":"DEBUG"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
|
||||
${response} OamPostRequest /tsgoam/settings/oam_snmp/ [{"chassis_ip":"192.168.40.165","oam.influx.recentminutes":5,"logging.level.com.oam.snmp":"ERROR"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log ${response}
|
||||
|
||||
oamcliagent-chassis-00170
|
||||
Comment oamcliagent-chassis-00001设置cli_agent的运行参
|
||||
${response} OamPostRequest /tsgoam/settings/cli_agent/ [{"chassis_ip":"192.168.40.165","logging.level.com.oam.agent":"DEBUG"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
|
||||
${response} OamPostRequest /tsgoam/settings/cli_agent/ [{"chassis_ip":"192.168.40.165","logging.level.com.oam.agent":"ERROR"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log ${response}
|
||||
|
||||
oamcli-chassis-00001
|
||||
Comment oamcli-chassis-00001设置cli的运行参数
|
||||
${response} OamPostRequest /tsgoam/settings/cli/ [{"chassis_ip":"192.168.40.165","cli.rest.root":"http://192.168.40.4:80821/v1","logging.level.com.cs.oam.cli":"DEBUG"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
${response} OamPostRequest /tsgoam/settings/cli/ [{"chassis_ip":"192.168.40.165","cli.rest.root":"http://192.168.40.4:8082/v1","logging.level.com.cs.oam.cli":"ERROR"}]
|
||||
${responseString} Convert To String ${response}
|
||||
Append To File ${path}/OamApi_file.txt ${responseString}
|
||||
Log ${response}
|
||||
|
||||
writeENDtime
|
||||
${endtime} Get Time
|
||||
Append To File ${path}/OamApi_file.txt ${endtime}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
86
01-TestCase/tsg_ui/ui_accounts/Accountscase.robot
Normal file
86
01-TestCase/tsg_ui/ui_accounts/Accountscase.robot
Normal file
@@ -0,0 +1,86 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui accounts
|
||||
Resource ../../../02-Keyword/tsg_ui/accounts/Accountspages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/accounts/Accounts.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-user-001
|
||||
#新建Accounts
|
||||
CreatePage 0000 ssjjyy 111111
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name 0000
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span
|
||||
log ${name}
|
||||
Should Be Equal As Strings ${name} 0000
|
||||
#删除对象
|
||||
User-Delete
|
||||
|
||||
create-user-002
|
||||
#新建Accounts
|
||||
CreatePage-null ${EMPTY} ${EMPTY} ${EMPTY}
|
||||
|
||||
|
||||
create-user-003
|
||||
#新建Accounts
|
||||
CreatePage 111111111111111111111111111111111 ${EMPTY} ${EMPTY}
|
||||
|
||||
|
||||
create-user-004
|
||||
#新建Accounts
|
||||
CreatePage xiaohong kkkkkk aaaa
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name xiaohong
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span
|
||||
log ${name}
|
||||
Should Be Equal As Strings ${name} xiaohong
|
||||
#删除对象
|
||||
User-Delete
|
||||
|
||||
create-user-005
|
||||
#新建Accounts
|
||||
CreatePage 小红 小红 a1@й
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name 小红
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span
|
||||
log ${name}
|
||||
Should Be Equal As Strings ${name} 小红
|
||||
#删除对象
|
||||
User-Delete
|
||||
|
||||
create-user-006
|
||||
#新建Accounts
|
||||
CreatePage малый малый малый
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name малый
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span
|
||||
log ${name}
|
||||
Should Be Equal As Strings ${name} малый
|
||||
#删除对象
|
||||
User-Delete
|
||||
|
||||
edit-user-007
|
||||
#新建Accounts
|
||||
CreatePage 修改 edit 111111
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name 修改
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span
|
||||
log ${name}
|
||||
Should Be Equal As Strings ${name} 修改
|
||||
#修改对象
|
||||
User-Edit edit-1
|
||||
#查询修改对象
|
||||
Ui-User-Search-Name edit-1
|
||||
#删除对象
|
||||
User-Delete
|
||||
|
||||
create-user-008
|
||||
#新建Accounts
|
||||
CreatePage @#!&* *^%$ *^%$
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name @#!&*
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span
|
||||
log ${name}
|
||||
Should Be Equal As Strings ${name} @#!&*
|
||||
#删除对象
|
||||
User-Delete
|
||||
43
01-TestCase/tsg_ui/ui_audit/Auditcase.robot
Normal file
43
01-TestCase/tsg_ui/ui_audit/Auditcase.robot
Normal file
@@ -0,0 +1,43 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui audit
|
||||
Resource ../../../02-Keyword/tsg_ui/audit/Audit.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/Menu.robot
|
||||
|
||||
*** Test Cases ***
|
||||
search-user-001
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
Ui-User-Search-Name
|
||||
|
||||
search-user-002
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
Ui-User-Search
|
||||
|
||||
search-user-003
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
Ui-User-Search-Operator sunjiangyue
|
||||
|
||||
search-user-004
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
Ui-User-Search-Operator @*%&
|
||||
|
||||
search-user-005
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
Ui-User-Search-Operator a1@й
|
||||
|
||||
search-user-006
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
Ui-User-Search-Operator малый
|
||||
|
||||
19
01-TestCase/tsg_ui/ui_ldap/Ldapcase.robot
Normal file
19
01-TestCase/tsg_ui/ui_ldap/Ldapcase.robot
Normal file
@@ -0,0 +1,19 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui accounts
|
||||
Resource ../../../02-Keyword/tsg_ui/ldap/Ldappages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/ldap/Ldap.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-user-001
|
||||
#界面
|
||||
Ui-login
|
||||
#新建
|
||||
CreatePage test localhost 25 test ou=People,dc=bifang,dc=com uid 111111
|
||||
|
||||
create-user-002
|
||||
#界面
|
||||
Ui-login
|
||||
#新建
|
||||
CreatePage lucy 192.168.40.204 389 cn=root,dc=bifang,dc=com ou=People,dc=bifang,dc=com uid 11221
|
||||
|
||||
42
01-TestCase/tsg_ui/ui_login/Logincase.robot
Normal file
42
01-TestCase/tsg_ui/ui_login/Logincase.robot
Normal file
@@ -0,0 +1,42 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui login
|
||||
Resource ../../../02-Keyword/tsg_ui/login/Login.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/Menu.robot
|
||||
|
||||
*** Test Cases ***
|
||||
search-user-001
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
Ui-User-Search-Name
|
||||
|
||||
search-user-002
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
Ui-User-Search
|
||||
|
||||
search-user-003
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
User-Search-Name sunjiangyue
|
||||
|
||||
search-user-004
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
User-Search-Name @*%&
|
||||
|
||||
search-user-005
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
User-Search-Name a1@й
|
||||
|
||||
search-user-006
|
||||
#打开界面
|
||||
Ui-login
|
||||
#查找
|
||||
User-Search-Name малый
|
||||
26
01-TestCase/tsg_ui/ui_mail/Mailcase.robot
Normal file
26
01-TestCase/tsg_ui/ui_mail/Mailcase.robot
Normal file
@@ -0,0 +1,26 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui audit
|
||||
Resource ../../../02-Keyword/tsg_ui/mail/Mail.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/mail/Mailpages.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-001
|
||||
|
||||
#新建
|
||||
CreatePage 192.168.40.204 25 test yytest@mail.test.com 111111
|
||||
|
||||
create-002
|
||||
|
||||
#新建
|
||||
CreatePage 192.168.40.204 25 测试 test@mail.test.com test
|
||||
|
||||
create-003
|
||||
|
||||
#新建
|
||||
CreatePage 192.168.40.204 25 @*%& test1@mail.test.com @*%&
|
||||
|
||||
create-004
|
||||
|
||||
#新建
|
||||
CreatePage 192.168.40.204 25 малый ttest@mail.test.com малый
|
||||
@@ -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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user