eACL updated version has been added

This commit is contained in:
anatoly@nspcc.ru 2020-08-20 01:31:16 +03:00
parent da334c3bc1
commit d9ceb25233
2 changed files with 267 additions and 166 deletions

View file

@ -76,6 +76,30 @@ def get_eacl(private_key: bytes, cid: str):
logger.info("Output: %s" % output) logger.info("Output: %s" % output)
@keyword('Convert Str to Hex Str with Len')
def conver_str_to_hex(string_convert: str):
converted = binascii.hexlify(bytes(string_convert, encoding= 'utf-8')).decode("utf-8")
prev_len_2 = '{:04x}'.format(int(len(converted)/2))
return str(prev_len_2)+str(converted)
@keyword('Set custom eACL')
def set_custom_eacl(private_key: bytes, cid: str, eacl_prefix: str, eacl_slice: str, eacl_postfix: str):
logger.info(str(eacl_prefix))
logger.info(str(eacl_slice))
logger.info(str(eacl_postfix))
eacl = str(eacl_prefix) + str(eacl_slice) + str(eacl_postfix)
logger.info("Custom eACL: %s" % eacl)
set_eacl(private_key, cid, eacl)
return
@keyword('Set eACL') @keyword('Set eACL')
def set_eacl(private_key: bytes, cid: str, eacl: str): def set_eacl(private_key: bytes, cid: str, eacl: str):
@ -329,27 +353,67 @@ def head_object(private_key: bytes, cid: str, oid: str, full_headers:bool=False,
@keyword('Parse Object Header') @keyword('Parse Object System Header')
def parse_object_header(header: str): def parse_object_system_header(header: str):
result_header = dict() result_header = dict()
#SystemHeader #SystemHeader
result_header['ID'] = _parse_oid(header) logger.info("Input: %s" % header)
result_header['CID'] = _parse_cid(header) # ID
m = re.search(r'- ID=([a-zA-Z0-9-]+)', header)
if m.start() != m.end(): # e.g., if match found something
result_header['ID'] = m.group(1)
else:
raise Exception("no ID was parsed from object header: \t%s" % output)
# CID
m = re.search(r'- CID=([a-zA-Z0-9]+)', header)
if m.start() != m.end(): # e.g., if match found something
result_header['CID'] = m.group(1)
else:
raise Exception("no CID was parsed from object header: \t%s" % output)
# Owner
m = re.search(r'- OwnerID=([a-zA-Z0-9]+)', header)
if m.start() != m.end(): # e.g., if match found something
result_header['OwnerID'] = m.group(1)
else:
raise Exception("no OwnerID was parsed from object header: \t%s" % output)
# Version
m = re.search(r'- Version=(\d+)', header)
if m.start() != m.end(): # e.g., if match found something
result_header['Version'] = m.group(1)
else:
raise Exception("no Version was parsed from object header: \t%s" % output)
# PayloadLength
m = re.search(r'- PayloadLength=(\d+)', header)
if m.start() != m.end(): # e.g., if match found something
result_header['PayloadLength'] = m.group(1)
else:
raise Exception("no PayloadLength was parsed from object header: \t%s" % output)
# CreatedAtUnixTime
m = re.search(r'- CreatedAt={UnixTime=(\d+)', header)
if m.start() != m.end(): # e.g., if match found something
result_header['CreatedAtUnixTime'] = m.group(1)
else:
raise Exception("no CreatedAtUnixTime was parsed from object header: \t%s" % output)
# CreatedAtEpoch
m = re.search(r'- CreatedAt={UnixTime=\d+ Epoch=(\d+)', header)
if m.start() != m.end(): # e.g., if match found something
result_header['CreatedAtEpoch'] = m.group(1)
else:
raise Exception("no CreatedAtEpoch was parsed from object header: \t%s" % output)
logger.info("Result: %s" % result_header) logger.info("Result: %s" % result_header)
return result_header
m = re.search(r'ID: ([a-zA-Z0-9-]+)', header)
if m.start() != m.end(): # e.g., if match found something
oid = m.group(1)
else:
raise Exception("no OID was parsed from command output: \t%s" % output)
return oid
return
# SystemHeader: # SystemHeader:
# - ID=c9fdc3e8-6576-4822-9bc4-2a0addcbf105 # - ID=c9fdc3e8-6576-4822-9bc4-2a0addcbf105
# - CID=42n81QNr7o513t2pTGuzM2PPFiHLhJ1MeSCJzizQW1wP # - CID=42n81QNr7o513t2pTGuzM2PPFiHLhJ1MeSCJzizQW1wP
@ -357,6 +421,26 @@ def parse_object_header(header: str):
# - Version=1 # - Version=1
# - PayloadLength=1024 # - PayloadLength=1024
# - CreatedAt={UnixTime=1597330026 Epoch=2427} # - CreatedAt={UnixTime=1597330026 Epoch=2427}
@keyword('Parse Object Extended Header')
def parse_object_extended_header(header: str):
result_header = dict()
pattern = re.compile(r'- Type=(\w+)\n.+Value=(.+)\n')
# key in dict.keys()
for (f_type, f_val) in re.findall(pattern, header):
logger.info("found: %s - %s" % (f_type, f_val))
if f_type not in result_header.keys():
result_header[f_type] = []
# if {} -> dict -> if re.search(r'(%s)' % cid, output):
result_header[f_type].append(f_val)
logger.info("Result: %s" % result_header)
return result_header
# ExtendedHeaders: # ExtendedHeaders:
# - Type=UserHeader # - Type=UserHeader
# Value={Key=key1 Val=1} # Value={Key=key1 Val=1}

View file

@ -1,13 +1,10 @@
*** Settings *** *** Settings ***
Variables ../../variables/common.py Variables ../../variables/common.py
Library Collections
Library ${RESOURCES}/environment.py Library ${RESOURCES}/environment.py
Library ${RESOURCES}/neo.py Library ${RESOURCES}/neo.py
Library ${RESOURCES}/neofs.py Library ${RESOURCES}/neofs.py
Library ${RESOURCES}/payment.py
Library ${RESOURCES}/assertions.py
Library ${RESOURCES}/neo.py
*** Variables *** *** Variables ***
@ -16,20 +13,18 @@ Library ${RESOURCES}/neo.py
&{FILE_OTH_HEADER} = key1=oth key2=oth &{FILE_OTH_HEADER} = key1=oth key2=oth
*** Test cases *** *** Test cases ***
Basic ACL Operations Extended ACL Operations
[Documentation] Testcase to validate NeoFS operations with extended ACL. [Documentation] Testcase to validate NeoFS operations with extended ACL.
[Tags] ACL NeoFS NeoCLI [Tags] ACL NeoFS NeoCLI
[Timeout] 20 min [Timeout] 20 min
Generate Keys Generate Keys
Generate file Generate file
Prepare eACL rules Prepare eACL Role rules
# Check Filters
Check Actions Check Actions
Check Filters
*** Keywords *** *** Keywords ***
@ -37,102 +32,184 @@ Check Actions
Check eACL Deny and Allow All Other Check eACL Deny and Allow All Other
Check eACL Deny and Allow All User Check eACL Deny and Allow All User
Check eACL Deny and Allow All System Check eACL Deny and Allow All System
Check eACL Deny All Other and Allow All Pubkey Check eACL Deny All Other and Allow All Pubkey
Check Filters Check Filters
Check eACL MatchType String Check eACL MatchType String Equal
Check eACL MatchType String Not Equal
Check eACL MatchType String Check eACL MatchType String Equal
${CID} = Create Container Public ${CID} = Create Container Public
${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER}
${HEADER} = Head object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${True}
Get nodes with object ${SYSTEM_KEY} ${CID} ${S_OID_USER} ${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${True}
Parse Object Header ${HEADER} &{SYS_HEADER_PARSED} = Parse Object System Header ${HEADER}
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
#### Format Log Set eACL for Deny GET operation with StringEqual Object ID
# ${ID_value} = Get From Dictionary ${SYS_HEADER_PARSED} ID
#{ ${ID_value_hex} = Convert Str to Hex Str with Len ${ID_value}
# "Records": [ Set custom eACL ${USER_KEY} ${CID} 000100000002000000010001000000020000000100024944 ${ID_value_hex} 0001000000030000
# { Sleep 15sec
# "Operation": OPERATION, Run Keyword And Expect Error *
# "Action": ACTION, ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
# "Filters": [
# {
# "HeaderType": HEADER_TYPE,
# "MatchType": MATCH_TYPE,
# "Name": {HeaderType = ObjectSystem ? SYSTEM_HEADER : ANY_STRING},
# "Value": ANY_STRING,
# }
# ],
# "Targets": [
# {
# "Role": ROLE,
# "Keys": BASE64_STRING[...]
# }
# ]
# }
# ]
#}
# * ANY_STRING - any JSON string value Log Set eACL for Deny GET operation with StringEqual Object CID
# * BASE64_STRING - any Base64 string (RFC 4648) ${CID_value} = Get From Dictionary ${SYS_HEADER_PARSED} CID
# * ACTION - string, one of ${CID_value_hex} = Convert Str to Hex Str with Len ${CID_value}
# * Deny Set custom eACL ${USER_KEY} ${CID} 00010000000200000001000100000002000000010003434944 ${CID_value_hex} 0001000000030000
# * Allow Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
# * ROLE - string, one of Log Set eACL for Deny GET operation with StringEqual Object OwnerID
# * User ${OwnerID_value} = Get From Dictionary ${SYS_HEADER_PARSED} OwnerID
# * System ${OwnerID_value_hex} = Convert Str to Hex Str with Len ${OwnerID_value}
# * Others Set custom eACL ${USER_KEY} ${CID} 000100000002000000010001000000020000000100084f574e45525f4944 ${OwnerID_value_hex} 0001000000030000
# * Pubkey Sleep 15sec
# * OPERATION - string, one of Run Keyword And Expect Error *
# * GET ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
# * HEAD
# * PUT
# * DELETE Log Set eACL for Deny GET operation with StringEqual Object Version
# * SEARCH ${Version_value} = Get From Dictionary ${SYS_HEADER_PARSED} Version
# * GETRANGE ${Version_value_hex} = Convert Str to Hex Str with Len ${Version_value}
# * GETRANGEHASH Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000001000756455253494f4e ${Version_value_hex} 0001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Log Set eACL for Deny GET operation with StringEqual Object PayloadLength
${Payload_value} = Get From Dictionary ${SYS_HEADER_PARSED} PayloadLength
${Payload_value_hex} = Convert Str to Hex Str with Len ${Payload_value}
Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000001000e5041594c4f41445f4c454e475448 ${Payload_value_hex} 0001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Log Set eACL for Deny GET operation with StringEqual Object CreatedAtUnixTime
${AtUnixTime_value} = Get From Dictionary ${SYS_HEADER_PARSED} CreatedAtUnixTime
${AtUnixTime_value_hex} = Convert Str to Hex Str with Len ${AtUnixTime_value}
Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000001000c435245415445445f554e4958 ${AtUnixTime_value_hex} 0001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Log Set eACL for Deny GET operation with StringEqual Object CreatedAtEpoch
${AtEpoch_value} = Get From Dictionary ${SYS_HEADER_PARSED} CreatedAtEpoch
${AtEpoch_value_hex} = Convert Str to Hex Str with Len ${AtEpoch_value}
Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000001000d435245415445445f45504f4348 ${AtEpoch_value_hex} 0001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Log Set eACL for Deny GET operation with StringEqual Object Extended User Header
${S_OID_USER_OTH} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER}
Set eACL ${USER_KEY} ${CID} 000100000002000000010001000000030000000100046b65793200062761626331270001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER_OTH} local_file_eacl
Check eACL MatchType String Not Equal
${CID} = Create Container Public
${FILE_S_2} = Generate file of bytes 2048
${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER}
# Sleep for 1 epoch
Sleep 30sec
${S_OID_OTHER} = Put object to NeoFS ${OTHER_KEY} ${FILE_S_2} ${CID} &{FILE_OTH_HEADER}
${HEADER} = Head object ${USER_KEY} ${CID} ${S_OID_USER} ${True}
Head object ${USER_KEY} ${CID} ${S_OID_OTHER} ${True}
&{SYS_HEADER_PARSED} = Parse Object System Header ${HEADER}
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl
Log Set eACL for Deny GET operation with StringNotEqual Object ID
${ID_value} = Get From Dictionary ${SYS_HEADER_PARSED} ID
${ID_value_hex} = Convert Str to Hex Str with Len ${ID_value}
Set custom eACL ${USER_KEY} ${CID} 000100000002000000010001000000020000000200024944 ${ID_value_hex} 0001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
# * HEADER_TYPE - string, one of Log Set eACL for Deny GET operation with StringEqual Object CID
# * Request ${CID_value} = Get From Dictionary ${SYS_HEADER_PARSED} CID
# * ObjectSystem ${CID_value_hex} = Convert Str to Hex Str with Len ${CID_value}
# * ObjectUser Set custom eACL ${USER_KEY} ${CID} 00010000000200000001000100000002000000020003434944 ${CID_value_hex} 0001000000030000
Sleep 15sec
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
# * MATCH_TYPE - string, one of Log Set eACL for Deny GET operation with StringEqual Object OwnerID
# * StringEqual ${OwnerID_value} = Get From Dictionary ${SYS_HEADER_PARSED} OwnerID
# * StringNotEqual ${OwnerID_value_hex} = Convert Str to Hex Str with Len ${OwnerID_value}
Set custom eACL ${USER_KEY} ${CID} 000100000002000000010001000000020000000200084f574e45525f4944 ${OwnerID_value_hex} 0001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
# * SYSTEM_HEADER - string one of Log Set eACL for Deny GET operation with StringEqual Object Version
# * ID ${Version_value} = Get From Dictionary ${SYS_HEADER_PARSED} Version
# * CID ${Version_value_hex} = Convert Str to Hex Str with Len ${Version_value}
# * OWNER_ID Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000002000756455253494f4e ${Version_value_hex} 0001000000030000
# * VERSION Sleep 15sec
# * PAYLOAD_LENGTH Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl
# * CREATED_UNIX Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
# * CREATED_EPOCH
# * LINK_PREV
# * LINK_NEXT
# * LINK_CHILD
# * LINK_PAR
# * LINK_SG
Log Set eACL for Deny GET operation with StringEqual Object PayloadLength
${Payload_value} = Get From Dictionary ${SYS_HEADER_PARSED} PayloadLength
${Payload_value_hex} = Convert Str to Hex Str with Len ${Payload_value}
Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000002000e5041594c4f41445f4c454e475448 ${Payload_value_hex} 0001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Log Set eACL for Deny GET operation with StringEqual Object CreatedAtUnixTime
${AtUnixTime_value} = Get From Dictionary ${SYS_HEADER_PARSED} CreatedAtUnixTime
${AtUnixTime_value_hex} = Convert Str to Hex Str with Len ${AtUnixTime_value}
Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000002000c435245415445445f554e4958 ${AtUnixTime_value_hex} 0001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Log Set eACL for Deny GET operation with StringEqual Object CreatedAtEpoch
${AtEpoch_value} = Get From Dictionary ${SYS_HEADER_PARSED} CreatedAtEpoch
${AtEpoch_value_hex} = Convert Str to Hex Str with Len ${AtEpoch_value}
Set custom eACL ${USER_KEY} ${CID} 0001000000020000000100010000000200000002000d435245415445445f45504f4348 ${AtEpoch_value_hex} 0001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Log Set eACL for Deny GET operation with StringEqual Object Extended User Header
${S_OID_USER_OTH} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER}
Set eACL ${USER_KEY} ${CID} 000100000002000000010001000000030000000200046b65793200062761626331270001000000030000
Sleep 15sec
Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_OTHER} local_file_eacl
Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Generate Keys Generate Keys
@ -154,25 +231,20 @@ Generate Keys
Set Global Variable ${SYSTEM_KEY_SN} ${SYSTEM_KEY_GEN_SN} Set Global Variable ${SYSTEM_KEY_SN} ${SYSTEM_KEY_GEN_SN}
Create Container Public Create Container Public
Log Create Public Container Log Create Public Container
${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x2FFFFFFF ${PUBLIC_CID_GEN} = Create container ${USER_KEY} 0x2FFFFFFF
[Return] ${PUBLIC_CID_GEN} [Return] ${PUBLIC_CID_GEN}
Generate file Generate file
# Generate small file # Generate small file
${FILE_S_GEN} = Generate file of bytes 1024 ${FILE_S_GEN} = Generate file of bytes 1024
${FILE_S_HASH_GEN} = Get file hash ${FILE_S_GEN}
Set Global Variable ${FILE_S} ${FILE_S_GEN} Set Global Variable ${FILE_S} ${FILE_S_GEN}
Set Global Variable ${FILE_S_HASH} ${FILE_S_HASH_GEN}
Prepare eACL rules Prepare eACL Role rules
Log Set eACL for different cases Log Set eACL for different Role cases
Set Global Variable ${EACL_DENY_ALL_OTHER} 0007000000020000000100000001000000030000000000020000000300000001000000030000000000020000000200000001000000030000000000020000000500000001000000030000000000020000000400000001000000030000000000020000000600000001000000030000000000020000000700000001000000030000 Set Global Variable ${EACL_DENY_ALL_OTHER} 0007000000020000000100000001000000030000000000020000000300000001000000030000000000020000000200000001000000030000000000020000000500000001000000030000000000020000000400000001000000030000000000020000000600000001000000030000000000020000000700000001000000030000
Set Global Variable ${EACL_ALLOW_ALL_OTHER} 0007000000010000000100000001000000030000000000010000000300000001000000030000000000010000000200000001000000030000000000010000000500000001000000030000000000010000000400000001000000030000000000010000000600000001000000030000000000010000000700000001000000030000 Set Global Variable ${EACL_ALLOW_ALL_OTHER} 0007000000010000000100000001000000030000000000010000000300000001000000030000000000010000000200000001000000030000000000010000000500000001000000030000000000010000000400000001000000030000000000010000000600000001000000030000000000010000000700000001000000030000
@ -196,8 +268,6 @@ Check eACL Deny and Allow All Other
Check eACL Deny and Allow All System Check eACL Deny and Allow All System
${CID} = Create Container Public ${CID} = Create Container Public
${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} ${S_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER}
${D_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER_DEL} ${D_OID_USER} = Put object to NeoFS ${USER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER_DEL}
@ -231,10 +301,9 @@ Check eACL Deny and Allow All System
Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_SYSTEM} Set eACL ${USER_KEY} ${CID} ${EACL_DENY_ALL_SYSTEM}
Sleep 30sec Sleep 15sec
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} ... Put object to NeoFS ${SYSTEM_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
@ -268,7 +337,7 @@ Check eACL Deny and Allow All System
Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_SYSTEM} Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_SYSTEM}
Sleep 30sec Sleep 15sec
Run Keyword And Expect Error * Run Keyword And Expect Error *
@ -298,8 +367,6 @@ Check eACL Deny and Allow All System
Check eACL Deny All Other and Allow All Pubkey Check eACL Deny All Other and Allow All Pubkey
${CID} = Create Container Public ${CID} = Create Container Public
@ -315,12 +382,10 @@ Check eACL Deny All Other and Allow All Pubkey
Delete object ${EACL_KEY} ${CID} ${D_OID_USER} Delete object ${EACL_KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_Pubkey} Set eACL ${USER_KEY} ${CID} ${EACL_ALLOW_ALL_Pubkey}
Sleep 30sec Sleep 15sec
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object to NeoFS ${OTHER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} ... Put object to NeoFS ${OTHER_KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER}
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl ... Get object from NeoFS ${OTHER_KEY} ${CID} ${S_OID_USER} local_file_eacl
Run Keyword And Expect Error * Run Keyword And Expect Error *
@ -332,7 +397,7 @@ Check eACL Deny All Other and Allow All Pubkey
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER} ... Delete object ${OTHER_KEY} ${CID} ${S_OID_USER}
Put object to NeoFS ${EACL_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} Put object to NeoFS ${EACL_KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER}
Get object from NeoFS ${EACL_KEY} ${CID} ${S_OID_USER} local_file_eacl Get object from NeoFS ${EACL_KEY} ${CID} ${S_OID_USER} local_file_eacl
Search object ${EACL_KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER} Search object ${EACL_KEY} ${CID} ${EMPTY} @{S_OBJ_H} &{FILE_USR_HEADER}
Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${True} Head object ${EACL_KEY} ${CID} ${S_OID_USER} ${True}
@ -340,8 +405,6 @@ Check eACL Deny All Other and Allow All Pubkey
Delete object ${EACL_KEY} ${CID} ${D_OID_USER} Delete object ${EACL_KEY} ${CID} ${D_OID_USER}
Check eACL Deny and Allow All Check eACL Deny and Allow All
[Arguments] ${KEY} ${DENY_EACL} ${ALLOW_EACL} [Arguments] ${KEY} ${DENY_EACL} ${ALLOW_EACL}
@ -358,7 +421,7 @@ Check eACL Deny and Allow All
Delete object ${KEY} ${CID} ${D_OID_USER} Delete object ${KEY} ${CID} ${D_OID_USER}
Set eACL ${USER_KEY} ${CID} ${DENY_EACL} Set eACL ${USER_KEY} ${CID} ${DENY_EACL}
Sleep 30sec Sleep 15sec
Run Keyword And Expect Error * Run Keyword And Expect Error *
... Put object to NeoFS ${KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER} ... Put object to NeoFS ${KEY} ${FILE_S} ${CID} &{FILE_USR_HEADER}
@ -375,7 +438,7 @@ Check eACL Deny and Allow All
Set eACL ${USER_KEY} ${CID} ${ALLOW_EACL} Set eACL ${USER_KEY} ${CID} ${ALLOW_EACL}
Sleep 30sec Sleep 15sec
Put object to NeoFS ${KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER} Put object to NeoFS ${KEY} ${FILE_S} ${CID} &{FILE_OTH_HEADER}
@ -385,49 +448,3 @@ Check eACL Deny and Allow All
Get Range ${KEY} ${CID} ${S_OID_USER} 0:256 Get Range ${KEY} ${CID} ${S_OID_USER} 0:256
Delete object ${KEY} ${CID} ${D_OID_USER} Delete object ${KEY} ${CID} ${D_OID_USER}
# docker exec neofs-cli neofs-cli --host 192.168.123.71:8080 --key 13a75c3bc71865ef9474f314dedb7aa9e2b22048a86bd431578abc30971f319a container set-eacl --cid 8PD2SdxUB1P6122mHP14XcRkQtWg2XPHaeDysWKz3ARy --eacl 0a4b080210021a1e080310011a0a686561646572206b6579220c6865616465722076616c7565222508031221031a6c6fbbdf02ca351745fa86b9ba5a9452d785ac4f7fc2b7548ca2a46c4fcf4a
# docker exec neofs-cli neofs-cli --host 192.168.123.71:8080 --key 13a75c3bc71865ef9474f314dedb7aa9e2b22048a86bd431578abc30971f319a container set-eacl --cid 8PD2SdxUB1P6122mHP14XcRkQtWg2XPHaeDysWKz3ARy --eacl 0a4a080210021a1e080310011a0a686561646572206b6579220c6865616465722076616c75652224080312200eef0860d2f81ed724ee45e7275a6a917791503582202c47459804192e1ba04a
# docker exec neofs-cli neofs-cli --host 192.168.123.71:8080 --key 13a75c3bc71865ef9474f314dedb7aa9e2b22048a86bd431578abc30971f319a container get-eacl --cid 8PD2SdxUB1P6122mHP14XcRkQtWg2XPHaeDysWKz3ARy
########################################
########################################
Create Containers DELETE
# Create containers:
Log Create Private Container
${INCOR_CID_GEN} = Create container ${USER_KEY} 0x3FFFFFFF
Container Existing ${USER_KEY} ${INCOR_CID_GEN}
Log Create Private Container
${PRIV_CID_GEN} = Create container ${USER_KEY} 0x0C8C8CCC
Container Existing ${USER_KEY} ${PRIV_CID_GEN}
Log Create None Container
${NONE_CID_GEN} = Create container ${USER_KEY} 0x2000000
Container Existing ${USER_KEY} ${NONE_CID_GEN}
Set Global Variable ${INCOR_CID} ${INCOR_CID_GEN}
Set Global Variable ${PUBLIC_CID} ${PUBLIC_CID_GEN}
Set Global Variable ${PRIV_CID} ${PRIV_CID_GEN}
Set Global Variable ${NONE_CID} ${NONE_CID_GEN}