Denyssl:删除多次引用ip
Interface:调整适应cli调整 PolicyObjectdefault调整适应subid和localip不同时默认
This commit is contained in:
@@ -140,7 +140,7 @@ ProxyPolicy-deny-ssl-00005
|
||||
#创建管控策略
|
||||
#${addPolicyStr} set variable { \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "policyList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "policyId":"", \ \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ \ \ "policyName":"ProxyPolicy-deny-Https-00005", \ \ \ \ \ \ \ \ \ \ \ \ "policyType":"pxy_manipulation", \ \ \ \ \ \ \ \ \ \ \ \ "action":"deny", \ \ \ \ \ \ \ \ \ \ \ \ "userTags":"", \ \ \ \ \ \ \ \ \ \ \ \ "doBlacklist":0, \ \ \ \ \ \ \ \ \ \ \ \ "doLog":1, \ \ \ \ \ \ \ \ \ \ \ \ "userRegion":{ "method": "block", "html_profile": ${profiledId}, "code": 404,\ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":"HTTP" \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ "referenceObject":[ \ \ \ \ \ \ \ \ {"objectId":${object_url_Id},"protocolFields": ["TSG_FIELD_HTTP_URL"]},{"objectId":${testClentID},"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]}], \ \ \ \ \ \ \ \ \ \ \ \ "scheduleId":[],"appObjectIdArray":[2] \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
|
||||
${addPolicyStr} run keyword if '${addTestClentIPFlag}'=='1' set variable { \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "policyList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "policyId":"", \ \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ \ \ "policyName":"ProxyPolicy-deny-Https-00005", \ \ \ \ \ \ \ \ \ \ \ \ "policyType":"pxy_manipulation", \ \ \ \ \ \ \ \ \ \ \ \ "action":"deny", \ \ \ \ \ \ \ \ \ \ \ \ "userTags":"", \ \ \ \ \ \ \ \ \ \ \ \ "doBlacklist":0, \ \ \ \ \ \ \ \ \ \ \ \ "doLog":1, \ \ \ \ \ \ \ \ \ \ \ \ "userRegion":{ "method": "block", "html_profile": ${profiledId}, "code": 404,\ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":"HTTP" \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ "referenceObject":[{"objectId":${testClentID},"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]},{"objectId":${object_url_Id},"protocolFields": ["TSG_FIELD_HTTP_URL"]},{"objectId":${testClentID},"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]}], \ \ \ \ \ \ \ \ \ \ \ \ "scheduleId":[],"appObjectIdArray":[2] \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
${addPolicyStr} run keyword if '${addTestClentIPFlag}'=='1' set variable { \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "policyList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "policyId":"", \ \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ \ \ "policyName":"ProxyPolicy-deny-Https-00005", \ \ \ \ \ \ \ \ \ \ \ \ "policyType":"pxy_manipulation", \ \ \ \ \ \ \ \ \ \ \ \ "action":"deny", \ \ \ \ \ \ \ \ \ \ \ \ "userTags":"", \ \ \ \ \ \ \ \ \ \ \ \ "doBlacklist":0, \ \ \ \ \ \ \ \ \ \ \ \ "doLog":1, \ \ \ \ \ \ \ \ \ \ \ \ "userRegion":{ "method": "block", "html_profile": ${profiledId}, "code": 404,\ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":"HTTP" \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ "referenceObject":[{"objectId":${testClentID},"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]},{"objectId":${object_url_Id},"protocolFields": ["TSG_FIELD_HTTP_URL"]}], \ \ \ \ \ \ \ \ \ \ \ \ "scheduleId":[],"appObjectIdArray":[2] \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
... ELSE set variable { \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "policyList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "policyId":"", \ \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ \ \ "policyName":"ProxyPolicy-deny-Https-00005", \ \ \ \ \ \ \ \ \ \ \ \ "policyType":"pxy_manipulation", \ \ \ \ \ \ \ \ \ \ \ \ "action":"deny", \ \ \ \ \ \ \ \ \ \ \ \ "userTags":"", \ \ \ \ \ \ \ \ \ \ \ \ "doBlacklist":0, \ \ \ \ \ \ \ \ \ \ \ \ "doLog":1, \ \ \ \ \ \ \ \ \ \ \ \ "userRegion":{ "method": "block", "html_profile": ${profiledId}, "code": 404,\ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":"HTTP" \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ "referenceObject":[ \ \ \ \ \ \ \ \ {"objectId":${object_url_Id},"protocolFields": ["TSG_FIELD_HTTP_URL"]},{"objectId":${testClentID},"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]}], \ \ \ \ \ \ \ \ \ \ \ \ "scheduleId":[],"appObjectIdArray":[2] \ \ \ \ \ \ \ \ } \ \ \ \ ] }
|
||||
${rescode} ${policyId3} AddPolicy ${addPolicyStr}
|
||||
log ${policyId3}
|
||||
@@ -301,11 +301,11 @@ ProxyPolicy-deny-ssl-00010
|
||||
${policyId2} set variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||
#删除所有策略
|
||||
${policyIds} Create List ${policyId1} ${policyId2}
|
||||
#功能端验证
|
||||
#功能端验证证书问题
|
||||
#${commandstr} set variable ${curlbatpath}/ProxyPolicy_Redirect_ssl00010.bat
|
||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/ProxyPolicy_Redirect_ssl00010.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://www.twitch.tv/directory
|
||||
${stringlist} Create List Tango Secure Gateway CA 404 X-TG-Construct-By: tfe 404 sorry! The page you visited does not exist
|
||||
${stringlist} Create List Tango Secure Gateway CA 404 X-TG-Construct-By: tfe The page you visited does not exist
|
||||
${starttime} Get Time
|
||||
Sleep ${policyVerificationSleepSeconds}s
|
||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||
|
||||
@@ -18,7 +18,8 @@ ${Tsg_Passwd} tsg_passwd
|
||||
# tsg_help指令返回值对比文件路径
|
||||
${Tsg_Help_file_Path} cli_files/tsg_help.txt
|
||||
# tsg_show指令查询时附加sql条件
|
||||
${Tsg_Show_Added_Sql} "order by time desc limit 20 " --querey
|
||||
${Tsg_Show_Added_Sql} "order by time desc limit 20 "
|
||||
${Tsg_Show_Added_Sql_Query} --query
|
||||
# tsg_show指令返回数据flowType和sled参数值
|
||||
${Tsg_Show_FlowType_Values} inline|intercomm|mirror
|
||||
${Tsg_Show_Sled_Values} mcn0|mcn1|mcn2|mcn3
|
||||
@@ -273,7 +274,7 @@ Tsg_Show_Interface
|
||||
... 描述:执行'tsg_show --interface'指令,并验证返回值
|
||||
... 参数:无
|
||||
... 返回:无
|
||||
${str} Set Variable ${Tsg_Show} --interface -- ${Tsg_Show_Added_Sql}
|
||||
${str} Set Variable ${Tsg_Show} --interface -- ${Tsg_Show_Added_Sql} ${Tsg_Show_Added_Sql_Query}
|
||||
${stime} Get Time
|
||||
@{list} Run5 ${str}
|
||||
${etime} Get Time
|
||||
@@ -288,7 +289,7 @@ Tsg_Show_APP
|
||||
... 描述:执行'tsg_show --app'指令,并验证返回值
|
||||
... 参数:无
|
||||
... 返回:无
|
||||
${str} Set Variable ${Tsg_Show} --app -- ${Tsg_Show_Added_Sql}
|
||||
${str} Set Variable ${Tsg_Show} --app -- ${Tsg_Show_Added_Sql} ${Tsg_Show_Added_Sql_Query}
|
||||
${stime} Get Time
|
||||
@{list} Run5 ${str}
|
||||
${etime} Get Time
|
||||
@@ -303,7 +304,7 @@ Tsg_Show_Protocol
|
||||
... 描述:执行'tsg_show --protocol'指令,并验证返回值
|
||||
... 参数:无
|
||||
... 返回:无
|
||||
${str} Set Variable ${Tsg_Show} --protocol -- ${Tsg_Show_Added_Sql}
|
||||
${str} Set Variable ${Tsg_Show} --protocol -- ${Tsg_Show_Added_Sql} ${Tsg_Show_Added_Sql_Query}
|
||||
${stime} Get Time
|
||||
@{list} Run5 ${str}
|
||||
${etime} Get Time
|
||||
@@ -318,7 +319,7 @@ Tsg_Show_Stream
|
||||
... 描述:执行'tsg_show --stream'指令,并验证返回值
|
||||
... 参数:无
|
||||
... 返回:无
|
||||
${str} Set Variable ${Tsg_Show} --stream -- ${Tsg_Show_Added_Sql}
|
||||
${str} Set Variable ${Tsg_Show} --stream -- ${Tsg_Show_Added_Sql} ${Tsg_Show_Added_Sql_Query}
|
||||
${stime} Get Time
|
||||
@{list} Run5 ${str}
|
||||
${etime} Get Time
|
||||
@@ -333,7 +334,7 @@ Tsg_Show_Intercept
|
||||
... 描述:执行'tsg_show --intercept'指令,并验证返回值
|
||||
... 参数:无
|
||||
... 返回:无
|
||||
${str} Set Variable ${Tsg_Show} --intercept -- ${Tsg_Show_Added_Sql}
|
||||
${str} Set Variable ${Tsg_Show} --intercept -- ${Tsg_Show_Added_Sql} ${Tsg_Show_Added_Sql_Query}
|
||||
${stime} Get Time
|
||||
@{list} Run5 ${str}
|
||||
${etime} Get Time
|
||||
|
||||
@@ -17,7 +17,7 @@ ${Default_ScheduleId} 7
|
||||
|
||||
# 对象
|
||||
${Default_ObjectType} ip
|
||||
${Default_ObjectSubType} endpoint
|
||||
${Default_ObjectSubType} ${EMPTY}
|
||||
${Default_IsInitialize} ${0}
|
||||
${Default_IsExclusion} ${0}
|
||||
${Default_ObjectName} autotestobj
|
||||
|
||||
Reference in New Issue
Block a user