mirror of
https://github.com/nspcc-dev/neofs-api.git
synced 2026-03-01 04:28:54 +00:00
Provide container session token to and from container service #45
Labels
No labels
I0
I1
I2
I3
I4
S0
S1
S2
S3
S3
S4
U2
U3
U4
bug
discussion
discussion
documentation
enhancement
enhancement
enhancement
feature
good first issue
question
task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-api#45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alexvanin on GitHub (May 17, 2021).
Originally assigned to: @cthulhu-rider on GitHub.
There are several ways container session token can be provided to and by container service.
Include session token in container and EACL bodies.
Objects already has session token field in the header, so it makes sense to do the same way with containers and EACL. This way we won't change signatures of RPC services and contract methods.
Include session token in meta headers.
The other way to include session tokens in request and response meta headers. In this case we should update container contract signatures and make additional storage for session tokens there. Also responses do not have token field in meta header yet. It actually doesn't make much sense, because it is meta information and it is not represented in response structures. It is not the case for the session token.
Personally I would go with option (1), because it requires small changes (two extra fields) and it is robust.
@cthulhu-rider commented on GitHub (May 20, 2021):
Option (1) seems more appropriate I think: in the case of creating a container within a delegated session, this information must be permanently reflected in the container itself. Leaving the token outside the structure, we will be forced to always pass it alongside.
On the other hand, this also applies to the signature, which at the moment is always nearby, but not sewn into the container.
Regardless of the approach chosen, I think the token should be present at the same level as the signature.
@alexvanin commented on GitHub (May 24, 2021):
After drafting and internal discussion we've decided to:
RequestMetaHeaderincontainer.Put,container.Deleteandcontainer.SetExtendedACLRPCs,GetResponseBodyandGetExtendedACLBody,GetResponseBodyso it will be pretty much the same asGetExtendedACLResponseBody.There are dependency issues when session token stored right in
ExtendedACLandContainerstructures. It makes sense to keep session token along with signatures and signatures are stored separately in response bodies. That's the reason we expandGetResponseBodywith signature field as well.