2021-04-26 17:48:43 +00:00
|
|
|
*** Settings ***
|
|
|
|
Variables ../../../variables/common.py
|
2021-08-27 09:18:00 +00:00
|
|
|
Variables ../../../variables/acl.py
|
2021-04-26 17:48:43 +00:00
|
|
|
|
|
|
|
*** Variables ***
|
2021-02-08 05:05:17 +00:00
|
|
|
${FILE_USR_HEADER} = key1=1,key2=abc
|
|
|
|
${FILE_USR_HEADER_DEL} = key1=del,key2=del
|
|
|
|
${FILE_OTH_HEADER} = key1=oth,key2=oth
|
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
Create Container Public
|
2021-09-08 17:31:52 +00:00
|
|
|
[Arguments] ${USER_KEY}
|
2021-05-04 09:27:43 +00:00
|
|
|
${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x0FFFFFFF ${COMMON_PLACEMENT_RULE}
|
2021-08-31 15:16:19 +00:00
|
|
|
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
|
|
|
... Container Existing ${USER_KEY} ${PUBLIC_CID_GEN}
|
2021-04-26 17:48:43 +00:00
|
|
|
[Return] ${PUBLIC_CID_GEN}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
Create Container Inaccessible
|
2021-09-08 17:31:52 +00:00
|
|
|
[Arguments] ${USER_KEY}
|
2021-08-27 09:18:00 +00:00
|
|
|
${INACCESSIBLE_CID_GEN} = Create container ${USER_KEY} ${INACCESSIBLE_ACL} ${COMMON_PLACEMENT_RULE}
|
2021-08-31 15:16:19 +00:00
|
|
|
Wait Until Keyword Succeeds ${MORPH_BLOCK_TIME} ${CONTAINER_WAIT_INTERVAL}
|
|
|
|
... Container Existing ${USER_KEY} ${INACCESSIBLE_CID_GEN}
|
2021-08-27 09:18:00 +00:00
|
|
|
[Return] ${INACCESSIBLE_CID_GEN}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
Generate file
|
|
|
|
[Arguments] ${SIZE}
|
2021-04-26 17:48:43 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
${FILE_S_GEN} = Generate file of bytes ${SIZE}
|
2021-09-08 17:31:52 +00:00
|
|
|
[Return] ${FILE_S_GEN}
|
2021-04-26 17:48:43 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
Prepare eACL Role rules
|
|
|
|
Log Set eACL for different Role cases
|
|
|
|
|
|
|
|
# eACL rules for all operations and similar permissions
|
|
|
|
@{Roles} = Create List OTHERS USER SYSTEM
|
|
|
|
FOR ${role} IN @{Roles}
|
2021-04-26 17:48:43 +00:00
|
|
|
${rule1} = Create Dictionary Operation=GET Access=DENY Role=${role}
|
|
|
|
${rule2} = Create Dictionary Operation=HEAD Access=DENY Role=${role}
|
|
|
|
${rule3} = Create Dictionary Operation=PUT Access=DENY Role=${role}
|
|
|
|
${rule4} = Create Dictionary Operation=DELETE Access=DENY Role=${role}
|
2021-02-08 05:05:17 +00:00
|
|
|
${rule5} = Create Dictionary Operation=SEARCH Access=DENY Role=${role}
|
|
|
|
${rule6} = Create Dictionary Operation=GETRANGE Access=DENY Role=${role}
|
|
|
|
${rule7} = Create Dictionary Operation=GETRANGEHASH Access=DENY Role=${role}
|
|
|
|
|
|
|
|
${eACL_gen} = Create List ${rule1} ${rule2} ${rule3} ${rule4} ${rule5} ${rule6} ${rule7}
|
2021-09-23 10:48:47 +00:00
|
|
|
${EACL_FILE} = Form eACL JSON Common File ${eACL_gen}
|
|
|
|
Set Global Variable ${EACL_DENY_ALL_${role}} ${EACL_FILE}
|
2021-04-26 17:48:43 +00:00
|
|
|
END
|
2021-09-23 10:48:47 +00:00
|
|
|
[Return] gen_eacl_deny_all_${role}
|