mirror of
https://github.com/nspcc-dev/neofs-node.git
synced 2026-03-01 04:29:10 +00:00
Support Neo N3 account auth #1368
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#1368
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 (Mar 3, 2025).
Originally assigned to: @cthulhu-rider on GitHub.
introduced in https://github.com/nspcc-dev/neofs-api/issues/305
all system parts must serve authentication and authorization via new scheme
@cthulhu-rider commented on GitHub (Mar 3, 2025):
Neo Go code snippet demonstrating examplary authorization through new N3 scheme with contract-side key management (thx to @AnnaShaleva && @roman-khimov):
@cthulhu-rider commented on GitHub (Mar 31, 2025):
it starts with https://github.com/nspcc-dev/neofs-node/pull/3216. Other signed entities are gonna be changed the same way
after discussion with @roman-khimov, it was decided to not add account field to the requests' verification headers
@cthulhu-rider commented on GitHub (Apr 8, 2025):
played in DevEnv with contract verifications
contract
signer:
@cthulhu-rider commented on GitHub (Apr 8, 2025):
played in DevEnv with multi-sig
@cthulhu-rider commented on GitHub (Apr 8, 2025):
@roman-khimov @AnnaShaleva pls review my examples
questions are:
the most obvious values for 3:
@cthulhu-rider commented on GitHub (Apr 8, 2025):
i also think system should allow the call of only one approved contract. Store its address in the network configuration (Netmap contract)?
@roman-khimov commented on GitHub (Apr 8, 2025):
(haven't looked at code yet)
No, technically verification script has access to this data as well, so they need to filled in anyway.
This prevents cross-network replay attacks, so it's definitely good.
All good to me.
Why?
@roman-khimov commented on GitHub (Apr 8, 2025):
This should be a part of the verification script (binding the script hash to user name), but the result is going to be the same in this example.
Otherwise looks OK.
@cthulhu-rider commented on GitHub (Apr 9, 2025):
oh yeah, account is essentially a verif script, so we should build it from the username
@cthulhu-rider commented on GitHub (Apr 9, 2025):
lookin at https://pkg.go.dev/github.com/nspcc-dev/neo-go@v0.108.1/pkg/core/transaction#Signer, we can definitely specify an account (verif script essentially). Others are inobvious to me speaking about general purpose scenarios. I tend to think that input can depend on particular contract call. What we can do?
initially i thought that malicious user could make fake call always returning
true. But i forgot that this will entail an account change. So yeah, seems like not needed@roman-khimov commented on GitHub (Apr 9, 2025):
It shouldn't. In this case we always have a single signer. Let it be in transaction and that's it (with "none" scope).
@cthulhu-rider commented on GitHub (Apr 10, 2025):
https://github.com/nspcc-dev/neofs-testcases comminicate with the system via CLI. Currently, there is no way to pass prepared signature to
container createand so on. I think this opportunity will be useful in general. In a separate issue@cthulhu-rider commented on GitHub (Apr 16, 2025):
TODO: pass context to verification funcs for RPC verifications
@cthulhu-rider commented on GitHub (Apr 16, 2025):
FS chain height resolution for objects (from creation epoch) and tokens (from IAT claim) is a bit challenging for now. Netmap contract provides https://pkg.go.dev/github.com/nspcc-dev/neofs-contract/contracts/netmap#LastEpochBlock only, which does not fit in general
i see next options:
GetEpochTickBlock(epoch uint64) (block int)method to the contract. Pros: easy to use. Cons: 1) contract changes, its storage grows 2) doubt that there will be enough storage for a huge number of epochsi like 2 more since we have all tools for it
@roman-khimov what do u think?
@roman-khimov commented on GitHub (Apr 16, 2025):
2 doesn't work in case nodes cut the tail. 1 is actually not that expensive, one record per hour is just 8760 records per year. I'd try that for now, maybe we'll create some better scheme in future.
@cthulhu-rider commented on GitHub (Apr 16, 2025):
oh, rly a problem. Then new method is the only option for now
@cthulhu-rider commented on GitHub (Apr 23, 2025):
TODO: check simple- and multi-sig scripts locally, do not make RPC
@roman-khimov commented on GitHub (Apr 23, 2025):
Can be a separate issue, it's an optimization. Just like #3243.