forked from TrueCloudLab/frostfs-node
[#755] morph: Drop FrostFSID contract usage
Unused. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
d5c9dd3c83
commit
1cd2bfe51a
18 changed files with 16 additions and 844 deletions
|
@ -5,7 +5,6 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/frostfsid"
|
||||
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
frostfsecdsa "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/session"
|
||||
|
@ -73,20 +72,6 @@ func (cp *Processor) verifySignature(v signatureVerificationData) error {
|
|||
|
||||
return errors.New("invalid signature calculated by container owner's key")
|
||||
}
|
||||
} else {
|
||||
var prm frostfsid.AccountKeysPrm
|
||||
prm.SetID(v.ownerContainer)
|
||||
|
||||
ownerKeys, err := cp.idClient.AccountKeys(prm)
|
||||
if err != nil {
|
||||
return fmt.Errorf("receive owner keys %s: %w", v.ownerContainer, err)
|
||||
}
|
||||
|
||||
for i := range ownerKeys {
|
||||
if (*frostfsecdsa.PublicKeyRFC6979)(ownerKeys[i]).Verify(v.signedData, v.signature) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return errors.New("signature is invalid or calculated with the key not bound to the container owner")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue