You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
object may be prepared (formed and signed) on gateway side acting on behalf of the particular user within opened session. When gateway streams ready objects, it attaches session token to the request meta header as a power of attorney. The system must interpret such an operation as being performed by the session author (user). In particular, access control is carried out specifically for the user and not the gateway.
when out-of-container node receives PUT request, it forwards the stream into in-container nodes that must store the object. At the same time, the intermediate node supplements the request with its own metadata, retaining the original. Thus, the stream received by the container nodes should be perceived as essentially sent by the user.
Steps to reproduce
i tested described scenario with currently WIP implementation of object Slicer, and got denial of service
run NeoFS Dev Env. WIth make prepare.ir it fills services/chain/node-wallet.json account with GAS
create container create a container so that at least one of the nodes is outside it
Error: Received unexpected error:
write single root object: finish object stream: status: code = 1024 message = incomplete object PUT by placement: closing the stream failed: rpc error: code = Unknown desc = (*response.ClientMessageStreamer) could not send the request: status: code = 2048 message = access to object operation denied
Log message in out-of-container node:
error util/log.go:11 object service error {"node": "/dns4/s03.neofs.devenv/tcp/8080", "request": "PUT", "error": "closing the stream failed: rpc error: code = Unknown desc = (*response.ClientMessageStreamer) could not send the request: status: code = 2048 message = access to object operation denied"}
Conclusion
according to the log, out-of-container node did not receive permission to write the object when forwarding the request.
i researched and found that when checking write permissions on an object, the node only considers the session token attached by the last client in the request chain, but ignores the original one. This is a bug, the node must process the original request.
Context
object may be prepared (formed and signed) on gateway side acting on behalf of the particular user within opened session. When gateway streams ready objects, it attaches session token to the request meta header as a power of attorney. The system must interpret such an operation as being performed by the session author (user). In particular, access control is carried out specifically for the user and not the gateway.
when out-of-container node receives PUT request, it forwards the stream into in-container nodes that must store the object. At the same time, the intermediate node supplements the request with its own metadata, retaining the original. Thus, the stream received by the container nodes should be perceived as essentially sent by the user.
Steps to reproduce
i tested described scenario with currently WIP implementation of object
Slicer
, and got denial of servicemake prepare.ir
it fillsservices/chain/node-wallet.json
account with GASCLI commands
container nodes
output, i choses04
Test script
Script failed:
Log message in out-of-container node:
Conclusion
according to the log, out-of-container node did not receive permission to write the object when forwarding the request.
i researched and found that when checking write permissions on an object, the node only considers the session token attached by the last client in the request chain, but ignores the original one. This is a bug, the node must process the original request.
Versions
8fe3a55d8b1ccd079b595ce8d08a3674b7f993c5
1300860c8ce5cd37e20528dc591e190836891fa9
The text was updated successfully, but these errors were encountered: