2021-03-15 18:12:38 +08:00
|
|
|
|
*** Settings ***
|
|
|
|
|
|
Force Tags tsg-ui Policies Security
|
|
|
|
|
|
Library Selenium2Library
|
|
|
|
|
|
Resource ../../../02-Keyword/tsg_ui/objects/NewObjectPages.robot
|
|
|
|
|
|
Resource ../../../02-Keyword/tsg_ui/objects/NewObject.robot
|
|
|
|
|
|
Resource ../../../02-Keyword/tsg_ui/Menu.robot
|
|
|
|
|
|
Resource ../../../03-Variable/PolicyObjectDefault.txt
|
|
|
|
|
|
Resource ../../../02-Keyword/tsg_ui/policy/UIPolicy.robot
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*** Test Cases ***
|
2021-03-19 18:16:00 +08:00
|
|
|
|
################################################################################################################################
|
2021-03-15 18:12:38 +08:00
|
|
|
|
SecurityAllowHTTP001
|
|
|
|
|
|
[Tags] Allow Http FQDN
|
|
|
|
|
|
#新建对象fqdn
|
|
|
|
|
|
Comment 新建对象fqdn
|
2021-03-22 18:24:26 +08:00
|
|
|
|
CreatePage FQDN single ${TEST NAME}${tag}_FQDN keywordtext=$poplar.ru
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${sourceAddIpList} Create List ${sip1}
|
|
|
|
|
|
|
|
|
|
|
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${hostname} create list ${TEST NAME}${tag}_FQDN
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${filter} create list Host
|
|
|
|
|
|
|
|
|
|
|
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
|
|
|
|
|
|
|
|
|
|
|
|
PoliciesDelete
|
|
|
|
|
|
|
|
|
|
|
|
SecurityAllowHTTP002
|
|
|
|
|
|
[Tags] Allow Http FQDN
|
|
|
|
|
|
#新建对象fqdn
|
|
|
|
|
|
Comment 新建对象fqdn
|
2021-03-22 18:24:26 +08:00
|
|
|
|
CreatePage FQDN single ${TEST NAME}${tag}_FQDN keywordtext=*environment.com
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${sourceAddIpList} Create List ${sip1}
|
|
|
|
|
|
|
|
|
|
|
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${hostname} create list ${TEST NAME}${tag}_FQDN
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${filter} create list Host
|
|
|
|
|
|
|
|
|
|
|
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
|
|
|
|
|
|
|
|
|
|
|
|
PoliciesDelete
|
|
|
|
|
|
|
|
|
|
|
|
SecurityAllowHTTP003
|
|
|
|
|
|
[Tags] Allow Http FQDN
|
|
|
|
|
|
#新建对象fqdn
|
|
|
|
|
|
Comment 新建对象fqdn
|
2021-03-22 18:24:26 +08:00
|
|
|
|
CreatePage FQDN single ${TEST NAME}${tag}_FQDN1 keywordtext=$mil.qianlong.com
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
#新建对象fqdn
|
|
|
|
|
|
Comment 新建对象fqdn
|
2021-03-22 18:24:26 +08:00
|
|
|
|
CreatePage FQDN single ${TEST NAME}${tag}_FQDN2 keywordtext=*.com
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${sourceAddIpList} Create List ${sip1}
|
|
|
|
|
|
|
|
|
|
|
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${hostname} create list ${TEST NAME}${tag}_FQDN1 ${TEST NAME}${tag}_FQDN2
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${filter} create list Host
|
|
|
|
|
|
|
|
|
|
|
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
|
|
|
|
|
|
|
|
|
|
|
|
PoliciesDelete
|
|
|
|
|
|
|
|
|
|
|
|
SecurityAllowHTTP004
|
|
|
|
|
|
[Tags] Allow Http FQDN
|
|
|
|
|
|
#新建对象fqdn
|
|
|
|
|
|
Comment 新建对象fqdn
|
2021-03-22 18:24:26 +08:00
|
|
|
|
CreatePage FQDN single ${TEST NAME}${tag}_FQDN1 keywordtext=$mil.qianlong.com
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
#新建对象fqdn
|
|
|
|
|
|
Comment 新建对象fqdn
|
2021-03-22 18:24:26 +08:00
|
|
|
|
CreatePage FQDN single ${TEST NAME}${tag}_FQDN2 keywordtext=*.com
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${sourceAddIpList} Create List ${sip1}
|
|
|
|
|
|
|
|
|
|
|
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${hostname} create list ${TEST NAME}${tag}_FQDN1 ${TEST NAME}${tag}_FQDN2
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${filter} create list Host
|
|
|
|
|
|
|
|
|
|
|
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=close PolicyEnabled=1
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
|
|
|
|
|
|
|
|
|
|
|
|
SecurityAllowHTTP006
|
|
|
|
|
|
[Tags] Allow Http Category
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${sourceAddIpList} Create List ${sip1}
|
|
|
|
|
|
|
|
|
|
|
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
|
|
|
|
|
|
|
|
|
|
|
${hostname} create list recreation
|
|
|
|
|
|
|
|
|
|
|
|
${filter} create list Host
|
|
|
|
|
|
|
|
|
|
|
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname} Hosttype=Category
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
|
|
|
|
|
|
|
|
|
|
|
|
#007和008自动化创建不了,需要手工测试
|
|
|
|
|
|
SecurityAllowHTTP009
|
|
|
|
|
|
[Tags] Allow Http FQDN
|
|
|
|
|
|
#新建对象fqdn
|
|
|
|
|
|
Comment 新建对象fqdn
|
2021-03-22 18:24:26 +08:00
|
|
|
|
CreatePage FQDN single ${TEST NAME}${tag}_FQDN keywordtext=$poplar.ru
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${hostname} create list ${TEST NAME}${tag}_FQDN
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${filter} create list Host
|
|
|
|
|
|
|
|
|
|
|
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
UIPolicies ${policyInfo} FilterInfo=${filterInfo}
|
|
|
|
|
|
|
|
|
|
|
|
PoliciesDelete
|
|
|
|
|
|
|
|
|
|
|
|
SecurityAllowHTTP010
|
|
|
|
|
|
[Tags] Allow Http Category
|
|
|
|
|
|
|
2021-04-01 17:36:19 +08:00
|
|
|
|
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=163.171.198.89 Port=1-65535
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${destinationAddIpList} Create List ${dip1}
|
|
|
|
|
|
|
|
|
|
|
|
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
UIPolicies ${policyInfo} DestinationInfo=${destinationInfo}
|
|
|
|
|
|
|
|
|
|
|
|
SecurityAllowHTTP011
|
|
|
|
|
|
[Tags] Allow Http URL
|
|
|
|
|
|
Comment 新建对象url
|
2021-03-22 18:24:26 +08:00
|
|
|
|
CreatePage URL single ${TEST NAME}${tag}_URL keywordtext=poplar.ru
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${sourceAddIpList} Create List ${sip1}
|
|
|
|
|
|
|
|
|
|
|
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${urlname} create list ${TEST NAME}${tag}_URL
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${filter} create list URL
|
|
|
|
|
|
|
|
|
|
|
|
${filterInfo} Create Dictionary Filter=${filter} URLname=${urlname}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
|
|
|
|
|
|
|
|
|
|
|
|
PoliciesDelete
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SecurityAllowHTTP012
|
|
|
|
|
|
[Tags] Allow Http Host+URL
|
|
|
|
|
|
|
|
|
|
|
|
#新建对象fqdn
|
|
|
|
|
|
Comment 新建对象fqdn
|
2021-03-22 18:24:26 +08:00
|
|
|
|
CreatePage FQDN single ${TEST NAME}${tag}_FQDN keywordtext=$poplar.ru
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
Comment 新建对象url
|
2021-03-22 18:24:26 +08:00
|
|
|
|
CreatePage URL single ${TEST NAME}${tag}_URL keywordtext=poplar.ru
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${sip1} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=${TEST NAME}${tag}_IP1 Ipclienttext1=192.168.50.17 Port=1-65535
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${sourceAddIpList} Create List ${sip1}
|
|
|
|
|
|
|
|
|
|
|
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${hostname} create list ${TEST NAME}${tag}_FQDN
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${urlname} create list ${TEST NAME}${tag}_URL
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
${filter} create list Host URL
|
|
|
|
|
|
|
|
|
|
|
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${hostname} URLname=${urlname}
|
|
|
|
|
|
|
2021-03-22 18:24:26 +08:00
|
|
|
|
${policyInfo} Create Dictionary PolicyType=Security Policy CreateorEdit=Create PolicyName=${TEST NAME}${tag} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
2021-03-15 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
UIPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
|
|
|
|
|
|
|
|
|
|
|
|
PoliciesDelete
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-19 18:16:00 +08:00
|
|
|
|
################################################################################################################################
|