Skip to content

Commit

Permalink
Fix/session token errors details (#2747)
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-khimov authored Feb 22, 2024
2 parents d8df959 + 8858b30 commit 732d7c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/services/container/morph/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,14 @@ func (s *morphExecutor) validateToken(t *sessionV2.Token, cIDV2 *refs.ContainerI
}

if issuer := t.GetBody().GetOwnerID().GetValue(); !bytes.Equal(cnr.Value.Owner().WalletBytes(), issuer) {
return fmt.Errorf("session was not issued by the container owner, issuer: %q", issuer)
return fmt.Errorf("session was not issued by the container owner, issuer: %s", base58.Encode(issuer))
}

var keyFromToken neofsecdsa.PublicKey

err = keyFromToken.Decode(t.GetSignature().GetKey())
if err != nil {
return errors.New("error while decoding public key from the token's signer")
return fmt.Errorf("decoding key from signature: %w", err)
}

userFromToken := user.ResolveFromECDSAPublicKey(ecdsa.PublicKey(keyFromToken))
Expand Down

0 comments on commit 732d7c5

Please sign in to comment.