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
|
|
|
|
|
|
|
Library Collections
|
2021-09-10 12:44:40 +00:00
|
|
|
Library acl.py
|
|
|
|
Library neofs.py
|
2022-03-15 11:58:59 +00:00
|
|
|
Library neofs_verbs.py
|
2021-09-10 12:44:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
Resource common_steps_acl_bearer.robot
|
2022-05-06 09:53:02 +00:00
|
|
|
Resource eacl_tables.robot
|
2021-12-09 10:58:51 +00:00
|
|
|
Resource payment_operations.robot
|
|
|
|
Resource setup_teardown.robot
|
2022-05-06 09:53:02 +00:00
|
|
|
Resource storage_group.robot
|
2021-04-02 14:29:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
*** Test cases ***
|
|
|
|
BearerToken Operations
|
|
|
|
[Documentation] Testcase to validate NeoFS operations with BearerToken.
|
2022-03-15 11:58:59 +00:00
|
|
|
[Tags] ACL BearerToken
|
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
|
2022-03-15 11:58:59 +00:00
|
|
|
|
2021-09-08 17:31:52 +00:00
|
|
|
${FILE_S} = Generate file ${SIMPLE_OBJ_SIZE}
|
2022-02-01 13:42:41 +00:00
|
|
|
Check eACL Deny and Allow All Bearer Simple ${WALLET} ${FILE_S}
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-09-08 17:31:52 +00:00
|
|
|
${FILE_S} = Generate file ${COMPLEX_OBJ_SIZE}
|
2022-02-01 13:42:41 +00:00
|
|
|
Check eACL Deny and Allow All Bearer Complex ${WALLET} ${FILE_S}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2021-06-01 12:07:31 +00:00
|
|
|
[Teardown] Teardown acl_bearer_allow_storagegroup
|
2021-04-26 10:30:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
*** Keywords ***
|
2021-04-26 10:30:40 +00:00
|
|
|
|
2021-04-02 14:29:41 +00:00
|
|
|
Check eACL Deny and Allow All Bearer
|
2022-05-06 09:53:02 +00:00
|
|
|
[Arguments] ${RUN_TYPE} ${WALLET} ${FILE_S}
|
2022-03-15 11:58:59 +00:00
|
|
|
|
2022-05-06 09:53:02 +00:00
|
|
|
${CID} = Create Container Public ${WALLET}
|
|
|
|
${OID} = Put object ${WALLET} ${FILE_S} ${CID}
|
|
|
|
@{OBJECTS} = Create List ${OID}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-05-06 09:53:02 +00:00
|
|
|
Run Storage Group Operations and Expect Success
|
|
|
|
... ${WALLET} ${CID} ${OBJECTS} ${RUN_TYPE}
|
2021-04-02 14:29:41 +00:00
|
|
|
|
2022-05-06 09:53:02 +00:00
|
|
|
${SG} = Put Storagegroup ${WALLET} ${CID} ${OBJECTS}
|
2021-09-10 12:44:40 +00:00
|
|
|
|
2022-05-06 09:53:02 +00:00
|
|
|
Prepare eACL Role rules ${CID}
|
2022-02-01 13:42:41 +00:00
|
|
|
Set eACL ${WALLET} ${CID} ${EACL_DENY_ALL_USER}
|
2021-09-10 12:44:40 +00:00
|
|
|
|
2022-05-06 09:53:02 +00:00
|
|
|
Run Storage Group Operations and Expect Failure
|
|
|
|
... ${WALLET} ${CID} ${OBJECTS} ${SG}
|
|
|
|
|
|
|
|
${RULE_GET} = Create Dictionary Operation=GET Access=ALLOW Role=USER
|
|
|
|
${RULE_HEAD} = Create Dictionary Operation=HEAD Access=ALLOW Role=USER
|
|
|
|
${RULE_PUT} = Create Dictionary Operation=PUT Access=ALLOW Role=USER
|
|
|
|
${RULE_DELETE} = Create Dictionary Operation=DELETE Access=ALLOW Role=USER
|
|
|
|
${RULE_SEARCH} = Create Dictionary Operation=SEARCH Access=ALLOW Role=USER
|
|
|
|
|
|
|
|
${eACL_gen}= Create List
|
|
|
|
... ${RULE_GET}
|
|
|
|
... ${RULE_HEAD}
|
|
|
|
... ${RULE_PUT}
|
|
|
|
... ${RULE_DELETE}
|
|
|
|
... ${RULE_SEARCH}
|
2022-02-01 13:42:41 +00:00
|
|
|
${EACL_TOKEN} = Form BearerToken File ${WALLET} ${CID} ${eACL_gen}
|
2021-09-10 12:44:40 +00:00
|
|
|
|
2022-05-06 09:53:02 +00:00
|
|
|
Run Storage Group Operations With Bearer Token
|
|
|
|
... ${WALLET} ${CID} ${OBJECTS} ${EACL_TOKEN} ${RUN_TYPE}
|