2021-02-08 08:05:17 +03:00
|
|
|
*** Settings ***
|
2021-12-09 13:58:51 +03:00
|
|
|
Variables common.py
|
2021-02-08 08:05:17 +03:00
|
|
|
|
2022-05-17 16:54:57 +03:00
|
|
|
Library acl.py
|
|
|
|
Library container.py
|
2022-03-15 14:58:59 +03:00
|
|
|
Library neofs_verbs.py
|
2022-05-19 17:07:27 +03:00
|
|
|
Library utility_keywords.py
|
2021-09-10 15:44:40 +03:00
|
|
|
|
2021-12-09 13:58:51 +03:00
|
|
|
Resource eacl_tables.robot
|
2021-02-08 08:05:17 +03:00
|
|
|
Resource common_steps_acl_bearer.robot
|
2021-12-09 13:58:51 +03:00
|
|
|
Resource payment_operations.robot
|
2021-02-08 08:05:17 +03:00
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
BearerToken Operations for Inaccessible Container
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with BearerToken for Inaccessible Container.
|
2022-03-15 14:58:59 +03:00
|
|
|
[Tags] ACL BearerToken
|
2021-02-08 08:05:17 +03:00
|
|
|
[Timeout] 20 min
|
|
|
|
|
2021-04-26 13:30:40 +03:00
|
|
|
|
2022-02-01 16:42:41 +03:00
|
|
|
${WALLET} ${_} ${_} = Prepare Wallet And Deposit
|
2021-04-26 13:30:40 +03:00
|
|
|
|
2021-02-08 08:05:17 +03:00
|
|
|
Log Check Bearer token with simple object
|
2022-05-19 17:07:27 +03:00
|
|
|
${FILE_S} ${_} = Generate file ${SIMPLE_OBJ_SIZE}
|
2022-02-01 16:42:41 +03:00
|
|
|
Check Container Inaccessible and Allow All Bearer ${WALLET} ${FILE_S}
|
2021-02-08 08:05:17 +03:00
|
|
|
|
|
|
|
Log Check Bearer token with complex object
|
2022-05-19 17:07:27 +03:00
|
|
|
${FILE_S} ${_} = Generate file ${COMPLEX_OBJ_SIZE}
|
2022-02-01 16:42:41 +03:00
|
|
|
Check Container Inaccessible and Allow All Bearer ${WALLET} ${FILE_S}
|
2021-02-08 08:05:17 +03:00
|
|
|
|
2021-04-26 13:30:40 +03:00
|
|
|
|
2021-02-08 08:05:17 +03:00
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
Check Container Inaccessible and Allow All Bearer
|
2022-02-01 16:42:41 +03:00
|
|
|
[Arguments] ${WALLET} ${FILE_S}
|
2021-09-08 20:31:52 +03:00
|
|
|
|
2022-05-17 16:54:57 +03:00
|
|
|
# 0x40000000 is inaccessible ACL
|
|
|
|
${CID} = Create Container ${WALLET} basic_acl=0x40000000
|
2022-02-17 12:52:48 +03:00
|
|
|
Prepare eACL Role rules ${CID}
|
2021-09-10 15:44:40 +03:00
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 16:42:41 +03:00
|
|
|
... Put object ${WALLET} ${FILE_S} ${CID} user_headers=${FILE_USR_HEADER}
|
2021-09-10 15:44:40 +03:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 16:42:41 +03:00
|
|
|
... Get object ${WALLET} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-09-10 15:44:40 +03:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 16:42:41 +03:00
|
|
|
... Search object ${WALLET} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER}
|
2021-09-10 15:44:40 +03:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 16:42:41 +03:00
|
|
|
... Head object ${WALLET} ${CID} ${S_OID_USER}
|
2021-09-10 15:44:40 +03:00
|
|
|
Run Keyword And Expect Error *
|
2022-08-02 18:47:10 +03:00
|
|
|
... Get Range ${WALLET} ${CID} ${S_OID_USER} 0:256
|
2021-09-10 15:44:40 +03:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 16:42:41 +03:00
|
|
|
... Delete object ${WALLET} ${CID} ${S_OID_USER}
|
2021-09-10 15:44:40 +03:00
|
|
|
|
|
|
|
${rule1} = Create Dictionary Operation=PUT Access=ALLOW Role=USER
|
|
|
|
${rule2} = Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
|
|
|
|
${eACL_gen} = Create List ${rule1} ${rule2}
|
|
|
|
|
2022-02-01 16:42:41 +03:00
|
|
|
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
2021-09-10 15:44:40 +03:00
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 16:42:41 +03:00
|
|
|
... Put object ${WALLET} ${FILE_S} ${CID} ${EACL_TOKEN} user_headers=${FILE_USR_HEADER}
|
2021-09-10 15:44:40 +03:00
|
|
|
Run Keyword And Expect Error *
|
2022-02-01 16:42:41 +03:00
|
|
|
... Search object ${WALLET} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER}
|