2021-02-08 05:05:17 +00:00
|
|
|
*** Settings ***
|
|
|
|
|
|
|
|
Variables ../../../variables/common.py
|
|
|
|
Library ../${RESOURCES}/neofs.py
|
|
|
|
Library ../${RESOURCES}/payment_neogo.py
|
|
|
|
|
|
|
|
Library Collections
|
|
|
|
Resource common_steps_acl_bearer.robot
|
2021-06-01 12:07:31 +00:00
|
|
|
Resource ../${RESOURCES}/payment_operations.robot
|
2021-06-01 12:07:31 +00:00
|
|
|
Resource ../${RESOURCES}/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.
|
|
|
|
[Tags] ACL NeoFS NeoCLI BearerToken
|
|
|
|
[Timeout] 20 min
|
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Setup] Setup
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-02-08 05:05:17 +00:00
|
|
|
Generate Keys
|
2021-06-01 12:07:31 +00:00
|
|
|
Generate eACL Keys
|
2021-02-08 05:05:17 +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-04-02 14:29:41 +00:00
|
|
|
Generate file ${SIMPLE_OBJ_SIZE}
|
2021-02-08 05:05:17 +00:00
|
|
|
Check Container Inaccessible and Allow All Bearer
|
|
|
|
|
|
|
|
Log Check Bearer token with complex object
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
Generate file ${COMPLEX_OBJ_SIZE}
|
2021-02-08 05:05:17 +00:00
|
|
|
Check Container Inaccessible and Allow All Bearer
|
|
|
|
|
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
|
|
|
|
${CID} = Create Container Inaccessible
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Put object ${USER_KEY} ${FILE_S} ${CID} ${EMPTY} ${FILE_USR_HEADER}
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-02-10 18:53:26 +00:00
|
|
|
... Get object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY} local_file_eacl
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Search object ${USER_KEY} ${CID} ${EMPTY} ${EMPTY} ${FILE_USR_HEADER}
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Head object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
2021-02-08 05:05:17 +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 *
|
|
|
|
... Delete object ${USER_KEY} ${CID} ${S_OID_USER} ${EMPTY}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
|
|
|
${rule1}= Create Dictionary Operation=PUT Access=ALLOW Role=USER
|
|
|
|
${rule2}= Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
|
2021-02-08 05:05:17 +00:00
|
|
|
|
|
|
|
${eACL_gen}= Create List ${rule1} ${rule2}
|
|
|
|
|
|
|
|
Form BearerToken file ${USER_KEY} ${CID} bearer_allow_all_user ${eACL_gen} 100500
|
|
|
|
|
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Put object ${USER_KEY} ${FILE_S} ${CID} bearer_allow_all_user ${FILE_USR_HEADER}
|
2021-02-08 05:05:17 +00:00
|
|
|
Run Keyword And Expect Error *
|
2021-04-26 10:30:40 +00:00
|
|
|
... Search object ${USER_KEY} ${CID} ${EMPTY} bearer_allow_all_user ${FILE_USR_HEADER}
|