2021-04-02 14:29:41 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-09-20 14:17:15 +00:00
|
|
|
Library Collections
|
|
|
|
Library neofs.py
|
2022-03-15 11:58:59 +00:00
|
|
|
Library neofs_verbs.py
|
2021-09-20 14:17:15 +00:00
|
|
|
Library payment_neogo.py
|
|
|
|
Library acl.py
|
2021-06-24 13:51:59 +00:00
|
|
|
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource common_steps_acl_extended.robot
|
|
|
|
Resource payment_operations.robot
|
|
|
|
Resource setup_teardown.robot
|
|
|
|
Resource eacl_tables.robot
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
*** Variables ***
|
|
|
|
&{USER_HEADER} = key1=1 key2=abc
|
|
|
|
&{USER_HEADER_DEL} = key1=del key2=del
|
|
|
|
&{ANOTHER_USER_HEADER} = key1=oth key2=oth
|
2021-06-30 21:18:37 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
*** Test cases ***
|
|
|
|
Extended ACL Operations
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with extended ACL.
|
2022-03-15 11:58:59 +00:00
|
|
|
[Tags] ACL eACL
|
2021-04-02 14:29:41 +00:00
|
|
|
[Timeout] 20 min
|
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Setup] Setup
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
Log Check extended ACL with simple object
|
2022-02-01 13:42:41 +00:00
|
|
|
${FILE_S} = Generate file of bytes ${SIMPLE_OBJ_SIZE}
|
|
|
|
Check eACL Deny and Allow All System ${WALLET} ${FILE_S}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
Log Check extended ACL with complex object
|
2022-02-01 13:42:41 +00:00
|
|
|
${FILE_S} = Generate file of bytes ${COMPLEX_OBJ_SIZE}
|
|
|
|
Check eACL Deny and Allow All System ${WALLET} ${FILE_S}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Teardown] Teardown acl_extended_actions_system
|
2021-04-26 10:30:40 +00:00
|
|
|
|
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
Check eACL Deny and Allow All System
|
2022-02-01 13:42:41 +00:00
|
|
|
[Arguments] ${WALLET} ${FILE_S}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${WALLET_SN} ${_} = Prepare Wallet with WIF And Deposit ${NEOFS_SN_WIF}
|
|
|
|
${WALLET_IR} ${_} = Prepare Wallet with WIF And Deposit ${NEOFS_IR_WIF}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${CID} = Create Container Public ${WALLET}
|
|
|
|
|
|
|
|
${S_OID_USER} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
|
|
${D_OID_USER_S} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
|
|
${D_OID_USER_SN} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
@{S_OBJ_H} = Create List ${S_OID_USER}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Put object ${WALLET_IR} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
|
|
|
|
Put object ${WALLET_SN} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Get object ${WALLET_IR} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
|
|
Get object ${WALLET_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Search object ${WALLET_IR} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
|
|
Search object ${WALLET_SN} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
2022-03-15 11:58:59 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Head object ${WALLET_IR} ${CID} ${S_OID_USER}
|
|
|
|
Head object ${WALLET_SN} ${CID} ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Range ${WALLET_IR} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Range ${WALLET_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Range Hash ${WALLET_IR} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
Get Range Hash ${WALLET_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete object ${WALLET_IR} ${CID} ${D_OID_USER_S}
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete object ${WALLET_SN} ${CID} ${D_OID_USER_SN}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_SYSTEM}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-09-23 10:48:47 +00:00
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Put object ${WALLET_IR} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Put object ${WALLET_SN} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get object ${WALLET_IR} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get object ${WALLET_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Search object ${WALLET_IR} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Search object ${WALLET_SN} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Head object ${WALLET_IR} ${CID} ${S_OID_USER}
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Head object ${WALLET_SN} ${CID} ${S_OID_USER}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Range ${WALLET_IR} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Range ${WALLET_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Range Hash ${WALLET_IR} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Range Hash ${WALLET_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete object ${WALLET_IR} ${CID} ${S_OID_USER}
|
2021-09-23 10:48:47 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete object ${WALLET_SN} ${CID} ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Set eACL ${WALLET} ${CID} ${EACL_ALLOW_ALL_SYSTEM}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-09-23 10:48:47 +00:00
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Delete object ${WALLET} ${CID} ${D_OID_USER_S}
|
|
|
|
Delete object ${WALLET} ${CID} ${D_OID_USER_SN}
|
2021-12-16 06:51:26 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
${D_OID_USER_S} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
|
|
${D_OID_USER_SN} = Put object ${WALLET} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Put object ${WALLET_IR} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
|
|
|
|
Put object ${WALLET_SN} ${FILE_S} ${CID} user_headers=${ANOTHER_USER_HEADER}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Get object ${WALLET_IR} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
|
|
Get object ${WALLET_SN} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Search object ${WALLET_IR} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
|
|
Search object ${WALLET_SN} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Head object ${WALLET_IR} ${CID} ${S_OID_USER}
|
|
|
|
Head object ${WALLET_SN} ${CID} ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Range ${WALLET_IR} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Get Range ${WALLET_SN} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-02-01 13:42:41 +00:00
|
|
|
Get Range Hash ${WALLET_IR} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
|
|
|
Get Range Hash ${WALLET_SN} ${CID} ${S_OID_USER} ${EMPTY} 0:256
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete object ${WALLET_IR} ${CID} ${D_OID_USER_S}
|
2021-12-16 06:51:26 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 13:42:41 +00:00
|
|
|
... Delete object ${WALLET_SN} ${CID} ${D_OID_USER_SN}
|