2021-02-08 05:05:17 +00:00
|
|
|
*** Settings ***
|
2021-12-09 10:58:51 +00:00
|
|
|
Variables common.py
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
Library Collections
|
2021-09-10 12:44:40 +00:00
|
|
|
Library neofs.py
|
|
|
|
Library acl.py
|
|
|
|
Library payment_neogo.py
|
|
|
|
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource eacl_tables.robot
|
2021-02-08 05:05:17 +00:00
|
|
|
Resource common_steps_acl_bearer.robot
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource payment_operations.robot
|
|
|
|
Resource setup_teardown.robot
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
BearerToken Operations for Inaccessible Container
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with BearerToken for Inaccessible Container.
|
2022-03-15 11:58:59 +00:00
|
|
|
[Tags] ACL BearerToken
|
2021-02-08 05:05:17 +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
|
2021-09-08 17:31:52 +00:00
|
|
|
Prepare eACL Role rules
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Log Check Bearer token with simple object
|
2021-09-08 17:31:52 +00:00
|
|
|
${FILE_S} = Generate file ${SIMPLE_OBJ_SIZE}
|
|
|
|
Check Container Inaccessible and Allow All Bearer ${USER_KEY} ${FILE_S}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
Log Check Bearer token with complex object
|
2021-09-08 17:31:52 +00:00
|
|
|
${FILE_S} = Generate file ${COMPLEX_OBJ_SIZE}
|
|
|
|
Check Container Inaccessible and Allow All Bearer ${USER_KEY} ${FILE_S}
|
2021-02-08 05:05:17 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Teardown] Teardown acl_bearer_inaccessible
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
*** Keywords ***
|
|
|
|
|
|
|
|
Check Container Inaccessible and Allow All Bearer
|
2021-09-08 17:31:52 +00:00
|
|
|
[Arguments] ${USER_KEY} ${FILE_S}
|
|
|
|
|
|
|
|
${CID} = Create Container Inaccessible ${USER_KEY}
|
2021-09-10 12:44:40 +00:00
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Put object ${USER_KEY} ${FILE_S} ${CID} user_headers=${FILE_USR_HEADER}
|
2021-09-10 12:44:40 +00:00
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER}
|
|
|
|
Run Keyword And Expect Error *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Head object ${USER_KEY} ${CID} ${S_OID_USER}
|
2021-09-10 12:44:40 +00:00
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Get Range ${USER_KEY} ${CID} ${S_OID_USER} s_get_range ${EMPTY} 0:256
|
|
|
|
Run Keyword And Expect Error *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Delete object ${USER_KEY} ${CID} ${S_OID_USER}
|
2021-09-10 12:44:40 +00: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}
|
|
|
|
|
|
|
|
${EACL_TOKEN} = Form BearerToken File ${USER_KEY} ${CID} ${eACL_gen}
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2022-03-15 11:58:59 +00:00
|
|
|
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer=${EACL_TOKEN} user_headers=${FILE_USR_HEADER}
|
2021-09-10 12:44:40 +00:00
|
|
|
Run Keyword And Expect Error *
|
|
|
|
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EACL_TOKEN} ${FILE_USR_HEADER}
|