2021-04-02 14:29:41 +00:00
|
|
|
*** Settings ***
|
|
|
|
Variables ../../../variables/common.py
|
|
|
|
Library ../${RESOURCES}/neofs.py
|
|
|
|
Library ../${RESOURCES}/payment_neogo.py
|
2021-06-01 12:07:31 +00:00
|
|
|
|
|
|
|
Library Collections
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
Resource common_steps_acl_extended.robot
|
2021-06-01 12:07:31 +00:00
|
|
|
Resource ../${RESOURCES}/payment_operations.robot
|
2021-06-01 12:07:31 +00:00
|
|
|
Resource ../${RESOURCES}/setup_teardown.robot
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
*** Test cases ***
|
|
|
|
Extended ACL Operations
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with extended ACL.
|
|
|
|
[Tags] ACL eACL NeoFS NeoCLI
|
|
|
|
[Timeout] 20 min
|
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Setup] Setup
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
Generate Keys
|
2021-06-01 12:07:31 +00:00
|
|
|
Generate eACL Keys
|
2021-04-02 14:29:41 +00:00
|
|
|
Prepare eACL Role rules
|
|
|
|
|
|
|
|
Log Check extended ACL with simple object
|
|
|
|
Generate files ${SIMPLE_OBJ_SIZE}
|
|
|
|
Check eACL Deny All Other and Allow All Pubkey
|
|
|
|
|
|
|
|
Log Check extended ACL with complex object
|
|
|
|
Generate files ${COMPLEX_OBJ_SIZE}
|
|
|
|
Check eACL Deny All Other and Allow All Pubkey
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Teardown] Teardown acl_extended_actions_pubkey
|
2021-04-26 10:30:40 +00:00
|
|
|
|
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
Check eACL Deny All Other and Allow All Pubkey
|
|
|
|
|
|
|
|
${CID} = Create Container Public
|
2021-04-26 10:30:40 +00:00
|
|
|
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
|
|
|
|
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER_DEL}
|
2021-04-02 14:29:41 +00:00
|
|
|
@{S_OBJ_H} = Create List ${S_OID_USER}
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
Put object ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
|
2021-04-02 14:29:41 +00:00
|
|
|
Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-04-26 10:30:40 +00:00
|
|
|
Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
|
|
|
|
Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
2021-04-02 14:29:41 +00:00
|
|
|
Get Range ${EACL_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
|
|
|
Get Range Hash ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
Delete object ${EACL_KEY} ${CID} ${D_OID_USER} ${EMPTY}
|
|
|
|
|
|
|
|
Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_Pubkey} --await
|
|
|
|
|
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
|
|
|
|
|
|
Get eACL ${USER_KEY} ${CID}
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Put object ${OTHER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
|
2021-04-02 14:29:41 +00:00
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
|
2021-04-02 14:29:41 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Head object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
2021-04-02 14:29:41 +00:00
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get Range ${OTHER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get Range Hash ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
Put object ${EACL_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
|
2021-04-02 14:29:41 +00:00
|
|
|
Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
|
|
Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER} ${S_OBJ_H}
|
2021-04-26 10:30:40 +00:00
|
|
|
Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
2021-04-02 14:29:41 +00:00
|
|
|
Get Range ${EACL_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
|
|
|
Get Range Hash ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
Delete object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY}
|