Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/session token errors details #2747

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
}

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)

Check warning on line 364 in pkg/services/container/morph/executor.go

View check run for this annotation

Codecov / codecov/patch

pkg/services/container/morph/executor.go#L364

Added line #L364 was not covered by tests
}

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