Azure-sdk-for-js: Cannot encrypt with key with kty = RSA-HSM

Created on 30 Jul 2020  路  3Comments  路  Source: Azure/azure-sdk-for-js

  • Package Name: keyvault-keys
  • Package Version: 4.0.4
  • Operating system: MacOS
  • [X] nodejs

    • version: v10.17.0

  • [ ] browser

    • name/version:

  • [ ] typescript

    • version:

  • Is the bug related to documentation in

Describe the bug
I try to encrypt a text value with a KeyVault Key. In file and line
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-keys/src/cryptographyClient.ts#L112
I get an exception because my key has a kty of RSA-HSM which should not trigger this exception. If I remove the whole check I get a correctly encrypted value back.

To Reproduce
Steps to reproduce the behavior:

  1. see bug description

Expected behavior
Able to encrypt with a key with kty = RSA-HSM

Screenshots
N/A

Additional context
N/A

Client KeyVault bug customer-reported needs-team-attention

Most helpful comment

@DerKobe Hello! Key Vault Keys version 4.1.0 has been released: https://www.npmjs.com/package/@azure/keyvault-keys/v/4.1.0

Please let us know if you continue to see the problem you reported, or if you find any other problem with our libraries! We're here to help.

All 3 comments

@DerKobe Hello Mr Claren,

Thank you for making this issue! We are studying the problem. We will be making the fixes soon. Please give us some days to coordinate this.

@DerKobe Hello again!

We will be releasing 4.1.0 in about a week. We're planning on including this fix! I'll come back once the release happen to ask you to try it. Please let us know if we can do anything else.

@DerKobe Hello! Key Vault Keys version 4.1.0 has been released: https://www.npmjs.com/package/@azure/keyvault-keys/v/4.1.0

Please let us know if you continue to see the problem you reported, or if you find any other problem with our libraries! We're here to help.

Was this page helpful?
0 / 5 - 0 ratings