2021-04-02 14:29:41 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
2021-06-01 12:07:31 +00:00
|
|
|
|
2021-06-24 13:51:59 +00:00
|
|
|
Library Collections
|
2021-09-10 12:44:40 +00:00
|
|
|
Library acl.py
|
|
|
|
Library neofs.py
|
|
|
|
Library payment_neogo.py
|
2021-04-02 14:29:41 +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-04-26 10:30:40 +00:00
|
|
|
|
2021-06-30 21:18:37 +00:00
|
|
|
*** Variables ***
|
|
|
|
${EACL_KEY} = L1FGTLE6shum3EC7mNTPArUqSCKnmtEweRzyuawtYRZwGjpeRuw1
|
2022-03-15 11:58:59 +00:00
|
|
|
&{USER_HEADER} = key1=1 key2=abc
|
|
|
|
&{USER_HEADER_DEL} = key1=del key2=del
|
|
|
|
&{ANOTHER_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-03-15 11:58:59 +00:00
|
|
|
${_} ${_} ${USER_KEY} = Prepare Wallet And Deposit
|
|
|
|
${_} ${_} ${OTHER_KEY} = Prepare Wallet And Deposit
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
Log Check extended ACL with simple object
|
|
|
|
Generate files ${SIMPLE_OBJ_SIZE}
|
2021-09-08 17:31:52 +00:00
|
|
|
Check eACL Deny All Other and Allow All Pubkey ${USER_KEY} ${FILE_S} ${OTHER_KEY}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
Log Check extended ACL with complex object
|
|
|
|
Generate files ${COMPLEX_OBJ_SIZE}
|
2021-09-08 17:31:52 +00:00
|
|
|
Check eACL Deny All Other and Allow All Pubkey ${USER_KEY} ${FILE_S} ${OTHER_KEY}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
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
|
2021-09-08 17:31:52 +00:00
|
|
|
[Arguments] ${USER_KEY} ${FILE_S} ${OTHER_KEY}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
${CID} = Create Container Public ${USER_KEY}
|
|
|
|
${S_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER}
|
|
|
|
${D_OID_USER} = Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${USER_HEADER_DEL}
|
|
|
|
@{S_OBJ_H} = Create List ${S_OID_USER}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
Put object ${EACL_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
|
|
Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
|
|
Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
|
|
Head object ${EACL_KEY} ${CID} ${S_OID_USER}
|
|
|
|
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}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-03-15 11:58:59 +00:00
|
|
|
Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_Pubkey}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
# The current ACL cache lifetime is 30 sec
|
|
|
|
Sleep ${NEOFS_CONTRACT_CACHE_TIMEOUT}
|
|
|
|
|
|
|
|
Get eACL ${USER_KEY} ${CID}
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Put object ${OTHER_KEY} ${FILE_S} ${CID} user_headers=${USER_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 *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Search object ${OTHER_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
2021-04-02 14:29:41 +00:00
|
|
|
Run Keyword And Expect Error *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Head object ${OTHER_KEY} ${CID} ${S_OID_USER}
|
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 *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER}
|
|
|
|
|
|
|
|
Put object ${EACL_KEY} ${FILE_S} ${CID} user_headers=${ANOTHER_HEADER}
|
|
|
|
Get object ${EACL_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
|
|
Search object ${EACL_KEY} ${CID} ${EMPTY} ${EMPTY} ${USER_HEADER} ${S_OBJ_H}
|
|
|
|
Head object ${EACL_KEY} ${CID} ${S_OID_USER}
|
|
|
|
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}
|