mirror of
https://github.com/nspcc-dev/neofs-contract.git
synced 2026-03-01 04:28:59 +00:00
Consider legal holds on NeoFS objects #90
Labels
No labels
I1
I2
I3
I4
S1
S2
S3
S4
U1
U2
U3
U4
alphabet
audit
balance
blocked
bug
config
container
discussion
documentation
enhancement
feature
go
good first issue
help wanted
neofs
neofsid
netmap
nns
nns
performance
proxy
question
reputation
security
task
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-contract#90
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 (Jun 9, 2022).
Is your feature request related to a problem? Please describe.
S3 protocol defines Object Lock legal hold operation. This operation locks object for indefinite period of time. This lock can be removed.
As we decided here, NeoFS locks cannot be removed and must have expiration, see https://github.com/nspcc-dev/neofs-api/pull/221. This is suitable for retention locks in compliance mode, but it does not work with legal holds.
Describe the solution you'd like
As we discussed this with @realloc some time ago, there was a proposal to implement legal holds as a smart contract. This way we avoid API changes.
Q: Who has the right to trigger legal hold?
A: In public network -- nobody. In private network -- some set of keys defined in legal hold contract.
Q: How storage node stores legal hold information?
A: In metabase. Maybe we can ask contract on every
DELETErequest.Q: What if metabase is lost in SN?
A: Resync the list of legal hold objects from contract at startup.
@fyrchik commented on GitHub (Jun 23, 2022):
@KirillovDenis commented on GitHub (Jul 4, 2022):
Determine who can create legal holds
AWS allows create legal hold users that have
s3:PutObjectLegalHoldpersmission (it's related to revising ACL in s3-gw) https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectLegalHold.html. So we can either:s3:PutObjectLegalHoldpermission.service records(if they will be introduced) in eACL. PoC of using theservice recordscan be found in this old draft PRTry hold containers, check if it plays nicely with S3 spec
I don't see any appropriate S3 API method that can be used to hold the bucket/container. There is only one method to change legal hold PutObjectLegalHold and it's per object version. Besides the bucket cannot be deleted if it isn't empty. So it's strange to introduce method to hold bucket in AWS mind.
There is one option though.
Using https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectLockConfiguration.html. We can extend body to accept param to hold bucket. But this will be incompatible with S3 protocol so I don't like it.