Error loading a file into the container created by the account wallet-rest.json #110

Open
opened 2025-12-28 17:36:11 +00:00 by sami · 0 comments
Owner

Originally created by @tatiana-nspcc on GitHub (Nov 22, 2023).

I can't upload the file to the container that was created by the wallet-rest.json account and is available for uploading.

Expected Behavior

Successful file upload.

Current Behavior

status: code = 2048 message = access to object operation denied

Possible Solution

I don't know.

Steps to Reproduce (for bugs)

I'm trying to follow the instructions from nspcc-dev/neofs-http-gw@0b22557622/README.md (example)

  1. I have a container that was created as follows:
neofs-cli -r localhost:8080 -w ./config/wallet-rest.json  --basic-acl 0x0FFFCFFF container create --policy "REP 1"  --await

CID 5p6BUHVQThKhGoQWVyjKNjXEoMEMvr6Q3degGRACj45Y
Address from wallet-rest.json:
"address": "NPFCqWHfi9ixCJRu7DABRbVfXRbkSEr9Vo",
2. Then I encoded the CID and address:

echo '5p6BUHVQThKhGoQWVyjKNjXEoMEMvr6Q3degGRACj45Y' | base58 --decode | base64
R37nQztU279LICrFus4C1bPfVW9vf7NzXViBTQ3X8dM=

echo 'NPFCqWHfi9ixCJRu7DABRbVfXRbkSEr9Vo' | base58 --decode | base64
NSSLrQB6gIku+V7oMAHXinR47Juhw3qlfg==
  1. I composed the next bearer.json:
{
    "body": {
        "eaclTable": {
            "version": {
                "major": 0,
                "minor": 0
            },
            "containerID": {
                "value": "R37nQztU279LICrFus4C1bPfVW9vf7NzXViBTQ3X8dM="
            },
            "records": []
        },
        "ownerID": {
            "value": "NSSLrQB6gIku+V7oMAHXinR47Juhw3qlfg=="
        },
        "lifetime": {
            "exp": "10000",
            "nbf": "0",
            "iat": "0"
        }
    },
    "signature": null
}
  1. Signed and encoded:
aio:/# neofs-cli util sign bearer-token --from bearer.json --to signed.json -w ./config/wallet-rest.json
Enter password > 
signed bearer token was successfully dumped to signed.json
aio:/# base64 -w 0 signed.json
CkoKJgoAEiIKIEd+50M7VNu/SyAqxbrOAtWz31Vvb3+zc11YgU0N1/HTEhsKGTUki60AeoCJLvle6DAB14p0eOybocN6pX4aAwiQThJnCiECcuPzZCZ2VyDsm2jKEOMnU6xEWO2bF1dvOvBWTDFYB1YSQCuodbGajPo++quC00TPGxfV8V98R4FdXEwjnds8UeFvcFaJymM29u0SgTToJKfcVexPwH27VnIZrlU9uLJgM14YAQ==
  1. And when I try to upload the file, it says:
 curl -F 'file=@test.txt;filename=test.txt' -H "Authorization: Bearer CkoKJgoAEiIKIEd+50M7VNu/SyAqxbrOAtWz31Vvb3+zc11YgU0N1/HTEhsKGTUki60AeoCJLvle6DAB14p0eOybocN6pX4aAwiQThJnCiECcuPzZCZ2VyDsm2jKEOMnU6xEWO2bF1dvOvBWTDFYB1YSQCuodbGajPo++quC00TPGxfV8V98R4FdXEwjnds8UeFvcFaJymM29u0SgTToJKfcVexPwH27VnIZrlU9uLJgM14YAQ==" http://localhost:8082/upload/5p6BUHVQThKhGoQWVyjKNjXEoMEMvr6Q3degGRACj45Y
write: status: code = 2048 message = access to object operation denied

Please, note, that accounts of the gate and the container owner are matching (the same one).

Context

I'm just trying to reproduce readme instruction but something goes wrong.

Regression

Your Environment

  • Version used:
  • Server setup and configuration:
  • Operating System and version (uname -a):
    I'm using AIO-container c659a6c1a86a273d3b836ce204c2ebc70f9f5b2a upgraded to 0.38.1
Originally created by @tatiana-nspcc on GitHub (Nov 22, 2023). <!--- Provide a general summary of the issue in the Title above --> I can't upload the file to the container that was created by the wallet-rest.json account and is available for uploading. ## Expected Behavior <!--- If you're describing a bug, tell us what should happen --> <!--- If you're suggesting a change/improvement, tell us how it should work --> Successful file upload. ## Current Behavior <!--- If describing a bug, tell us what happens instead of the expected behavior --> <!--- If suggesting a change/improvement, explain the difference from current behavior --> `status: code = 2048 message = access to object operation denied` ## Possible Solution <!--- Not obligatory, but suggest a fix/reason for the bug, --> <!--- or ideas how to implement the addition or change --> I don't know. ## Steps to Reproduce (for bugs) <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug. --> I'm trying to follow the instructions from https://github.com/nspcc-dev/neofs-http-gw/blob/0b22557622db8551bfbfc8d0ff0fde51fbdea9c3/README.md#example 1. I have a container that was created as follows: ``` neofs-cli -r localhost:8080 -w ./config/wallet-rest.json --basic-acl 0x0FFFCFFF container create --policy "REP 1" --await ``` CID 5p6BUHVQThKhGoQWVyjKNjXEoMEMvr6Q3degGRACj45Y Address from wallet-rest.json: `"address": "NPFCqWHfi9ixCJRu7DABRbVfXRbkSEr9Vo",` 2. Then I encoded the CID and address: ``` echo '5p6BUHVQThKhGoQWVyjKNjXEoMEMvr6Q3degGRACj45Y' | base58 --decode | base64 R37nQztU279LICrFus4C1bPfVW9vf7NzXViBTQ3X8dM= echo 'NPFCqWHfi9ixCJRu7DABRbVfXRbkSEr9Vo' | base58 --decode | base64 NSSLrQB6gIku+V7oMAHXinR47Juhw3qlfg== ``` 3. I composed the next bearer.json: ``` { "body": { "eaclTable": { "version": { "major": 0, "minor": 0 }, "containerID": { "value": "R37nQztU279LICrFus4C1bPfVW9vf7NzXViBTQ3X8dM=" }, "records": [] }, "ownerID": { "value": "NSSLrQB6gIku+V7oMAHXinR47Juhw3qlfg==" }, "lifetime": { "exp": "10000", "nbf": "0", "iat": "0" } }, "signature": null } ``` 4. Signed and encoded: ``` aio:/# neofs-cli util sign bearer-token --from bearer.json --to signed.json -w ./config/wallet-rest.json Enter password > signed bearer token was successfully dumped to signed.json aio:/# base64 -w 0 signed.json CkoKJgoAEiIKIEd+50M7VNu/SyAqxbrOAtWz31Vvb3+zc11YgU0N1/HTEhsKGTUki60AeoCJLvle6DAB14p0eOybocN6pX4aAwiQThJnCiECcuPzZCZ2VyDsm2jKEOMnU6xEWO2bF1dvOvBWTDFYB1YSQCuodbGajPo++quC00TPGxfV8V98R4FdXEwjnds8UeFvcFaJymM29u0SgTToJKfcVexPwH27VnIZrlU9uLJgM14YAQ== ``` 5. And when I try to upload the file, it says: ``` curl -F 'file=@test.txt;filename=test.txt' -H "Authorization: Bearer CkoKJgoAEiIKIEd+50M7VNu/SyAqxbrOAtWz31Vvb3+zc11YgU0N1/HTEhsKGTUki60AeoCJLvle6DAB14p0eOybocN6pX4aAwiQThJnCiECcuPzZCZ2VyDsm2jKEOMnU6xEWO2bF1dvOvBWTDFYB1YSQCuodbGajPo++quC00TPGxfV8V98R4FdXEwjnds8UeFvcFaJymM29u0SgTToJKfcVexPwH27VnIZrlU9uLJgM14YAQ==" http://localhost:8082/upload/5p6BUHVQThKhGoQWVyjKNjXEoMEMvr6Q3degGRACj45Y write: status: code = 2048 message = access to object operation denied ``` #### Please, note, that accounts of the gate and the container owner are matching (the same one). ## Context <!--- How has this issue affected you? What are you trying to accomplish? --> <!--- Providing context helps us come up with a solution that is most useful in the real world --> I'm just trying to reproduce readme instruction but something goes wrong. ## Regression <!-- Is this issue a regression? (Yes / No) --> <!-- If Yes, optionally please include version or commit id or PR# that caused this regression, if you have these details. --> ## Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * Version used: * Server setup and configuration: * Operating System and version (`uname -a`): I'm using AIO-container `c659a6c1a86a273d3b836ce204c2ebc70f9f5b2a` upgraded to 0.38.1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-http-gw#110
No description provided.