mirror of
https://github.com/nspcc-dev/neofs-node.git
synced 2026-03-01 04:29:10 +00:00
Static session tokens are silently mutated by CLI #1084
Labels
No labels
I1
I2
I3
I4
S0
S1
S2
S3
S4
U0
U1
U2
U3
U4
blocked
bug
config
dependencies
discussion
documentation
enhancement
enhancement
epic
feature
go
good first issue
help wanted
neofs-adm
neofs-cli
neofs-cli
neofs-cli
neofs-ir
neofs-lens
neofs-storage
neofs-storage
performance
question
security
task
test
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-node#1084
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 @cthulhu-rider on GitHub (Aug 9, 2023).
currently, NeoFS CLI completes and signs session tokens in commands
and
the token is finalized unconditionally: even if it is signed, it is mutated. The problem occured in testsuite:
Access Denied)invalid session token owner)Proposal
from my pov, current behavior with silent invasion is incorrect, and i propose to require tokens specified via
--sessionto be correctly formed and signed (*) because static sessions are going from the outworld and MUST NOT be modified by CLI(*) we provide
util sign session-tokenfor thisoverall, I'd make NeoFS CLI to not touch user input at all except some UI translations like
public-read-write->uint32@cthulhu-rider commented on GitHub (Aug 10, 2023):
i restored how we came to this
static sessions currently make no sense for
object put|delete|lockcommands according to docs (code follows)once #1216 happened and we optimized dynamic sessions:
neofs-cli session create --json --out token.jsonput, user may pass this token same way as static sessionsneofs-cli object put --session token,jsonin total, from this moment unsigned dynamic sessions started to collide with static ones (that's why we may re-sign already signed as mentioned in issue body)
lets resolve issues one-by-one:
--dynamic-sessionflag?(*) static sessions may become needed with #2482 in the future. Right now using static session in, for example,
object putalways leads tomy own answers are:
--sessionflag until #2482@roman-khimov @carpawell pls share ur thoughts
@roman-khimov commented on GitHub (Aug 10, 2023):
I'd say that we should separate two flows then, but dropping something that we already have doesn't seem right to me (it'd be a regression), so I'd say:
@carpawell commented on GitHub (Aug 17, 2023):
What static sessions are for? Why we called them "sessions"? Is there any component of NeoFS that relies on static sessions?
I would research if we can opt out of this feature. If yes, it would become so much easier to explain what it is for, to understand what we are developing them for, and so on.
@carpawell commented on GitHub (Aug 17, 2023):
I static sessions are needed that much I would provide a separate grpc
messagefor them and name them differently.