Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Oct 9, 2024

Ticket: WP-2733

@ghost ghost force-pushed the WP-2733-gpg-passkey-encryption branch 2 times, most recently from 15834b0 to e12f508 Compare October 10, 2024 15:31
@ghost ghost marked this pull request as ready for review October 10, 2024 15:49
@ghost ghost self-requested a review October 10, 2024 15:49
@ghost ghost requested review from a team as code owners October 10, 2024 15:49
@ghost ghost force-pushed the WP-2733-gpg-passkey-encryption branch from e12f508 to 3387cce Compare October 10, 2024 15:57
assert.equal(e.message, 'Error decrypting message: Session key decryption failed.');
}
});
it('should not authenticate with wrong signing key', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add empty lines between tests, that looks more readable

const keyPair = await generateGPGKeyPair('secp256k1');
const encryptedToken = (await encryptAndSignText(
'access_token',
keyPair.publicKey,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename the one of the keyPair object, it looks very confusing

pranavjain97
pranavjain97 previously approved these changes Oct 11, 2024
Comment on lines 974 to 976
if (!body.encryptedToken) {
throw new Error('encryptedToken is missing from response');
}
Copy link
Contributor

@pranavjain97 pranavjain97 Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!body.encryptedToken) {
throw new Error('encryptedToken is missing from response');
}
else if (body.encryptedToken) {
...
} else {
throw new Error('Failed to login. Please contact support@bitgo.com`)
}

add gpg decryption and signature verification to passkey authentication

TICKET: WP-2733
@ghost ghost force-pushed the WP-2733-gpg-passkey-encryption branch 2 times, most recently from eebe859 to 2170204 Compare October 15, 2024 14:18
@ghost ghost force-pushed the WP-2733-gpg-passkey-encryption branch from 2170204 to 1eda08f Compare October 15, 2024 16:00
@ghost ghost merged commit bd5fe3c into master Oct 17, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants