[#505] ir/container: Check key ownership in Put container handler

Check if new container was signed by its owner, and otherwise prohibit
operation.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-19 19:16:54 +03:00 committed by Alex Vanin
parent 5287c194e5
commit 6310535b3c

View file

@ -61,7 +61,7 @@ func (cp *Processor) checkPutContainer(e *containerEvent.Put) error {
return fmt.Errorf("incorrect container format: %w", err) return fmt.Errorf("incorrect container format: %w", err)
} }
return nil return cp.checkKeyOwnership(cnr, key)
} }
func (cp *Processor) approvePutContainer(e *containerEvent.Put) { func (cp *Processor) approvePutContainer(e *containerEvent.Put) {