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

[KeyVault] - Add support for getRandomBytes operation #15955

Merged
merged 5 commits into from
Jun 25, 2021

Conversation

maorleger
Copy link
Member

What

  • Regenerate from 7.3-preview swagger
  • Add getRandomBytes method

Why

  • For July we would like to add support for the RNG endpoint in a Managed HSM. While this is a customer ask for Java, we will add this to all languages at the same time.

@ghost ghost added the KeyVault label Jun 24, 2021
@@ -19,12 +19,13 @@
}
},
"TestType": "node",
"NodeTestVersion": "10.x",
"ServiceVersion": ["7.0", "7.1"]
"NodeTestVersion": "14.x",
Copy link
Member Author

Choose a reason for hiding this comment

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

Now that 7.3-preview is the latest, we need an entry for 7.2 as well

@maorleger maorleger marked this pull request as ready for review June 24, 2021 20:51
@maorleger maorleger requested a review from heaths June 24, 2021 22:49
@@ -327,7 +332,7 @@ export const enum KnownKeyCurveNames {
}

// @public
export const enum KnownKeyOperations {
export enum KnownKeyOperations {
Copy link
Member Author

Choose a reason for hiding this comment

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

We should avoid const enum whenever possible, not breaking as the net-effect is the same for TS and additive for JS. I plan to incrementally replace const enum with enum where I can. I did not have lot of success with preserveConstEnums though

Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

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

Reviewed the .ts and .md files. LGTM

sdk/keyvault/keyvault-keys/src/index.ts Outdated Show resolved Hide resolved
sdk/keyvault/keyvault-keys/src/keysModels.ts Show resolved Hide resolved
@@ -49,5 +50,26 @@ onVersions({ minVer: "7.2" }).describe(
assert.equal(result.keyType, "oct-HSM");
await testClient.flushKey(keyName);
});

onVersions({ minVer: "7.3-preview" }).describe("getRandomBytes", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh this is super cool!

Copy link
Contributor

@sadasant sadasant left a comment

Choose a reason for hiding this comment

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

The actual change looks simple an clean!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants