添加引用不可删除与默认不可删除case
This commit is contained in:
@@ -348,8 +348,15 @@ Decryption_Profile_Policy_references-000018
|
||||
${response_code} Get From Dictionary ${response} code
|
||||
#log aaaaaaaaaa:${response_code}
|
||||
Should Be Equal As Strings ${response_code} 200
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Decryption_Profile_Policy_references_default-000019
|
||||
#删除默认对象
|
||||
${response} BaseDeleteRequest /v1/policy/profile/decryption {"profileIds":[1]}
|
||||
${response_code} Get From Dictionary ${response} code
|
||||
#log aaaaaaaaaa:${response_code}
|
||||
Should Be Equal As Strings ${response_code} 40018017
|
||||
#Integer ${response_code} 200
|
||||
${response} Convert to String ${response}
|
||||
log ${response}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ 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_bfapi/PolicyObject.robot
|
||||
*** Variables ***
|
||||
${url} /v1/policy/profile/keyringobj
|
||||
${keyringId} ${EMPTY}
|
||||
@@ -81,3 +82,45 @@ Settings-ProxyProfiles-KeyringFile_Chinase_English_Russian-00006
|
||||
${header_edit} Set Variable {"isValid":1,"opAction":"update","returnData":1,"keyringName":"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","keyringType":"end-entity","reissueExpiryHour":0,"crl":"null","publicKeyAlgo":"rsa2048","keyringId":"${keyringId}","includeRoot":0}
|
||||
UpdatePolicyMutipartFile ${url} keyrings/end-entity/ tang-ca-v3-www.amazon.cn-cer.pem tang-ca-v3-www.amazon.cn-key.pem ${header_edit}
|
||||
|
||||
Settings-ProxyProfiles-KeyringFile_Policy_references-00007
|
||||
# 新增 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
|
||||
# 创建策略
|
||||
|
||||
Comment 创建源ip
|
||||
${rescodeip} ${object_Source_Id} AddObject {"opAction":"add","returnData":1,"objectList":{"objectType":"ip","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"source","objectDesc":"","subObjectIds":[],"addItemList":[{"ip":"192.168.50.25","ipIf":false,"portIf":false,"port":"80","itemId":"","clientIp1":"192.168.50.25","clientIp2":"192.168.50.25","clientPort1":"80","clientPort2":"80","clientIpFormat":"range","clientPortFormat":"range","addrType":4,"direction":0,"temporaryItemId":1595312834}],"updateItemList":[],"deleteItemIds":[],"objectId":"","iconColor":"","objectSubType":"endpoint"}}
|
||||
${objectids} set Variable ${object_Source_Id}
|
||||
|
||||
${rescode} ${policyId} AddPolicy {"opAction":"add","returnData":1,"policyList":{"policyId":"","policyName":"zmvksdanjfsda","policyType":"tsg_security","action":"intercept","userTags":"","doBlacklist":0,"doLog":1,"policyDesc":"","effectiveRange":{"tag_sets":[[]]},"userRegion":{"protocol":"SSL","keyring":${keyringId},"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}},"source":[{"objectId":${object_Source_Id},"protocolField":"TSG_SECURITY_SOURCE_ADDR"}],"destination":[],"filterList":[],"appIdObjects":[3],"isValid":0,"scheduleId":[]}}
|
||||
log ${policyId}
|
||||
#删除策略
|
||||
${policyIds} Create List {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||
# # 获取策略id
|
||||
|
||||
# 删除对象 失败
|
||||
${response} BaseDeleteRequest /${version}/policy//profile/keyringobj {"keyringIds":[${keyringId}]}
|
||||
${response_code} Get From Dictionary ${response} code
|
||||
#log aaaaaaaaaa:${response_code}
|
||||
Should Be Equal As Strings ${response_code} 40090030
|
||||
|
||||
# 删除策略
|
||||
DeletePolicyAndObject ${policyIds} ${objectids}
|
||||
|
||||
# 删除对象 成功
|
||||
${response} BaseDeleteRequest /${version}/policy//profile/keyringobj {"keyringIds":[${keyringId}]}
|
||||
${response_code} Get From Dictionary ${response} code
|
||||
#log aaaaaaaaaa:${response_code}
|
||||
Should Be Equal As Strings ${response_code} 200
|
||||
|
||||
|
||||
Settings-ProxyProfiles-KeyringFile_references_default-00008
|
||||
#删除默认对象
|
||||
${response} BaseDeleteRequest /v1/policy/profile/keyringobj {"keyringIds":[${keyringId}]}
|
||||
${response_code} Get From Dictionary ${response} code
|
||||
#log aaaaaaaaaa:${response_code}
|
||||
Should Be Equal As Strings ${response_code} 40090023
|
||||
#Integer ${response_code} 200
|
||||
${response} Convert to String ${response}
|
||||
log ${response}
|
||||
|
||||
@@ -76,3 +76,15 @@ TrustedCertPolicy_Namelong128-00005
|
||||
# 修改
|
||||
${header_edit} Set Variable {"isValid":1,"opAction":"update","certName":"12311233333333333333333333333333333qweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee3333333333333333333333131312312321313","certId":"${certId}","returnData":1}
|
||||
UpdatePolicyFile ${url} keyrings/root/ tango-ca-trust-ca-cer.pem ${header_edit}
|
||||
|
||||
TrustedCertPolicy_Policy_references_default-00006
|
||||
#删除默认对象
|
||||
${response} BaseDeleteRequest v1/policy/profile/trustedcacertobj {"certIds":[273]}
|
||||
${response_code} Get From Dictionary ${response} code
|
||||
#log aaaaaaaaaa:${response_code}
|
||||
Should Be Equal As Strings ${response_code} 40016027
|
||||
#Integer ${response_code} 200
|
||||
${response} Convert to String ${response}
|
||||
log ${response}
|
||||
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@ VerifyProxy-Security-00001
|
||||
${cn} Create Dictionary attributeType=string attributeName=cn protocol=ssl attributeValue={"string": "verifytest.com"}
|
||||
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "ssl."}
|
||||
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test25"}
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"192.168.50.25","port":"1","addrType":4,"protocol":"6"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6"}
|
||||
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"192.168.50.25","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||
# 合成attributes字典集
|
||||
${attributes} Create List ${sni} ${san} ${cn} ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||
${verifySession} Create Dictionary attributes=${attributes}
|
||||
|
||||
Reference in New Issue
Block a user