2021-02-08 05:05:17 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
2021-09-08 17:31:52 +00:00
|
|
|
|
2021-09-20 14:17:15 +00:00
|
|
|
Library Collections
|
|
|
|
Library neofs.py
|
|
|
|
Library payment_neogo.py
|
|
|
|
Library acl.py
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-06-24 13:51:59 +00:00
|
|
|
Resource common_steps_acl_extended.robot
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource payment_operations.robot
|
|
|
|
Resource setup_teardown.robot
|
|
|
|
Resource eacl_tables.robot
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-06-30 21:18:37 +00:00
|
|
|
*** Variables ***
|
|
|
|
${SYSTEM_KEY} = ${NEOFS_IR_WIF}
|
|
|
|
|
2021-02-08 05:05:17 +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-09-08 17:31:52 +00:00
|
|
|
${WALLET} ${ADDR} ${USER_KEY} = Prepare Wallet And Deposit
|
|
|
|
${WALLET_OTH} ${ADDR_OTH} ${OTHER_KEY} = Prepare Wallet And Deposit
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
Log Check extended ACL with simple object
|
2021-04-02 14:29:41 +00:00
|
|
|
Generate files ${SIMPLE_OBJ_SIZE}
|
2021-09-08 17:31:52 +00:00
|
|
|
Check Сompound Operations ${USER_KEY} ${OTHER_KEY}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Log Check extended ACL with complex object
|
2021-04-02 14:29:41 +00:00
|
|
|
Generate files ${COMPLEX_OBJ_SIZE}
|
2021-09-08 17:31:52 +00:00
|
|
|
Check Сompound Operations ${USER_KEY} ${OTHER_KEY}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Teardown] Teardown acl_extended_compound
|
2021-04-26 10:30:40 +00:00
|
|
|
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
Check Сompound Operations
|
2021-09-08 17:31:52 +00:00
|
|
|
[Arguments] ${USER_KEY} ${OTHER_KEY}
|
|
|
|
Check eACL Сompound Get ${OTHER_KEY} ${EACL_COMPOUND_GET_OTHERS} ${USER_KEY}
|
|
|
|
Check eACL Сompound Get ${USER_KEY} ${EACL_COMPOUND_GET_USER} ${USER_KEY}
|
|
|
|
Check eACL Сompound Get ${SYSTEM_KEY} ${EACL_COMPOUND_GET_SYSTEM} ${USER_KEY}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-09-08 17:31:52 +00:00
|
|
|
Check eACL Сompound Delete ${OTHER_KEY} ${EACL_COMPOUND_DELETE_OTHERS} ${USER_KEY}
|
|
|
|
Check eACL Сompound Delete ${USER_KEY} ${EACL_COMPOUND_DELETE_USER} ${USER_KEY}
|
|
|
|
Check eACL Сompound Delete ${SYSTEM_KEY} ${EACL_COMPOUND_DELETE_SYSTEM} ${USER_KEY}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-09-08 17:31:52 +00:00
|
|
|
Check eACL Сompound Get Range Hash ${OTHER_KEY} ${EACL_COMPOUND_GET_HASH_OTHERS} ${USER_KEY}
|
|
|
|
Check eACL Сompound Get Range Hash ${USER_KEY} ${EACL_COMPOUND_GET_HASH_USER} ${USER_KEY}
|
|
|
|
Check eACL Сompound Get Range Hash ${SYSTEM_KEY} ${EACL_COMPOUND_GET_HASH_SYSTEM} ${USER_KEY}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
Check eACL Сompound Get
|
2021-09-08 17:31:52 +00:00
|
|
|
[Arguments] ${KEY} ${DENY_EACL} ${USER_KEY}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-09-08 17:31:52 +00:00
|
|
|
${CID} = Create Container Public ${USER_KEY}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
|
|
|
|
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
|
2021-02-10 18:53:26 +00:00
|
|
|
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-06-24 13:51:59 +00:00
|
|
|
Set eACL ${USER_KEY} ${CID} ${DENY_EACL}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
|
|
|
|
2021-02-10 18:53:26 +00:00
|
|
|
Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-12-16 06:51:26 +00:00
|
|
|
IF "${KEY}" == "${NEOFS_IR_WIF}"
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
|
|
|
ELSE
|
|
|
|
Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
|
|
|
END
|
2021-02-08 05:05:17 +00:00
|
|
|
Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
|
|
|
|
|
|
|
|
Check eACL Сompound Delete
|
2021-09-08 17:31:52 +00:00
|
|
|
[Arguments] ${KEY} ${DENY_EACL} ${USER_KEY}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-09-08 17:31:52 +00:00
|
|
|
${CID} = Create Container Public ${USER_KEY}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-02-10 18:53:26 +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} ${EMPTY}
|
2021-04-26 10:30:40 +00:00
|
|
|
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
|
2021-12-16 06:51:26 +00:00
|
|
|
IF "${KEY}" == "${NEOFS_IR_WIF}"
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY}
|
|
|
|
ELSE
|
|
|
|
Delete object ${KEY} ${CID} ${D_OID_USER} ${EMPTY}
|
|
|
|
END
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-06-24 13:51:59 +00:00
|
|
|
Set eACL ${USER_KEY} ${CID} ${DENY_EACL}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Head object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
|
2021-12-16 06:51:26 +00:00
|
|
|
IF "${KEY}" == "${NEOFS_IR_WIF}"
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
|
|
|
ELSE
|
|
|
|
Delete object ${KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
|
|
|
END
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Check eACL Сompound Get Range Hash
|
2021-09-08 17:31:52 +00:00
|
|
|
[Arguments] ${KEY} ${DENY_EACL} ${USER_KEY}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-09-08 17:31:52 +00:00
|
|
|
${CID} = Create Container Public ${USER_KEY}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-02-10 18:53:26 +00:00
|
|
|
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
|
2021-04-26 10:30:40 +00:00
|
|
|
Put object ${KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_OTH_HEADER}
|
2021-09-08 17:31:52 +00:00
|
|
|
Get Range Hash ${NEOFS_SN_WIF} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-06-24 13:51:59 +00:00
|
|
|
Set eACL ${USER_KEY} ${CID} ${DENY_EACL}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get Range ${KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
|
|
|
Run Keyword And Expect Error *
|
2021-02-10 18:53:26 +00:00
|
|
|
... Get object ${KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-12-09 10:58:51 +00:00
|
|
|
Get Range Hash ${KEY} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|