Skip to content

Commit b960def

Browse files
authored
[KeyVault] - Hide LocalCryptographyClient and replace it with a local mode instead (Azure#13373)
## What - Remove LocalCryptographyClient from public API and instead make it a mode of the Cryptography Client - Align our API with other languages where it makes sense and is not a breaking change ## Why - Hiding the LocalCryptographyClient came out from feedback from the arch board - Aligning with our partners ensures consistency across APIs. There are also things we missed before so it makes sense to add them now. resolves Azure#13365
1 parent dc03344 commit b960def

File tree

30 files changed

+2628
-549
lines changed

30 files changed

+2628
-549
lines changed

sdk/keyvault/keyvault-admin/src/accessControlClient.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ export class KeyVaultAccessControlClient {
5252

5353
/**
5454
* @internal
55-
* @hidden
5655
* A reference to the auto-generated Key Vault HTTP client.
5756
*/
5857
private readonly client: KeyVaultClient;
@@ -245,7 +244,6 @@ export class KeyVaultAccessControlClient {
245244

246245
/**
247246
* @internal
248-
* @hidden
249247
* Deals with the pagination of {@link listRoleAssignments}.
250248
* @param roleScope - The scope of the role assignments.
251249
* @param continuationState - An object that indicates the position of the paginated request.
@@ -286,7 +284,6 @@ export class KeyVaultAccessControlClient {
286284

287285
/**
288286
* @internal
289-
* @hidden
290287
* Deals with the iteration of all the available results of {@link listRoleAssignments}.
291288
* @param roleScope - The scope of the role assignments.
292289
* @param options - Common options for the iterative endpoints.
@@ -341,7 +338,6 @@ export class KeyVaultAccessControlClient {
341338

342339
/**
343340
* @internal
344-
* @hidden
345341
* Deals with the pagination of {@link listRoleDefinitions}.
346342
* @param roleScope - The scope of the role definition.
347343
* @param continuationState - An object that indicates the position of the paginated request.
@@ -382,7 +378,6 @@ export class KeyVaultAccessControlClient {
382378

383379
/**
384380
* @internal
385-
* @hidden
386381
* Deals with the iteration of all the available results of {@link listRoleDefinitions}.
387382
* @param roleScope - The scope of the role definition.
388383
* @param options - Common options for the iterative endpoints.

sdk/keyvault/keyvault-admin/src/backupClient.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export class KeyVaultBackupClient {
5151

5252
/**
5353
* @internal
54-
* @hidden
5554
* A reference to the auto-generated Key Vault HTTP client.
5655
*/
5756
private readonly client: KeyVaultClient;

sdk/keyvault/keyvault-keys/CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Release History
22

3-
43
## 4.2.0-beta.3 (Unreleased)
54

65
- [Breaking] Removed `dist-browser` from the published package. To bundle the Azure SDK libraries for the browsers, please read our bundling guide: [link](https://github.com/Azure/azure-sdk-for-js/blob/master/documentation/Bundling.md).
76
- Updated the Key Vault Keys Long Running Operation Pollers to follow a more compact and meaningful approach moving forward.
87
- Bug fix: The logging of HTTP requests wasn't properly working - now it has been fixed and tests have been written that verify the fix.
8+
- Add a constructor overload to `CryptographyClient` that takes a `JsonWebKey` and allows for local-only subset of operations.
9+
- Add `KeyId` to the public API of CryptographyClient.
910

1011
## 4.2.0-beta.2 (2020-10-06)
1112

@@ -19,7 +20,7 @@
1920
## 4.2.0-beta.1 (2020-09-11)
2021

2122
- Added `parseKeyVaultKeysIdentifier` and `ParsedKeyVaultKeysIdentifier` to help with parsing the unique identifiers of Key Vault Keys.
22-
- Added the basic structure of a new client to perform local cryptography operations, which is now called `LocalCryptographyClient`.
23+
- Added the basic structure of a new client to perform local cryptography operations, which is now called `LocalCryptographyClient`.
2324
- The existing `CryptographyClient`, when initialized, will create one instance of a local cryptography client, which can be retrieved by calling to a new method that is part of the `CryptographyClient` class: `getLocalCryptographyClient()`.
2425
- The `LocalCryptographyClient` currently has limited support of the cryptography operations available on the `CryptographyClient`. More operations will be added over time.
2526

@@ -30,8 +31,8 @@
3031
### Changes since 4.0.4
3132

3233
- Added the optional `serviceVersion` property to the `KeyClient` and `CryptographyClient` optional parameters to control the version of the Key Vault service being used by the clients.
33-
- It defaults to the latest supported API version, which currently is `7.1`.
34-
- Other supported service version at the moment is `7.0`.
34+
- It defaults to the latest supported API version, which currently is `7.1`.
35+
- Other supported service version at the moment is `7.0`.
3536
- Added `import` to the list of possible values for `KeyOperation`.
3637
- Added `recoverableDays` as an optional property to `KeyProperties` which denotes the number of days in which the key can be recovered after deletion. This is only applicable for Azure Key Vaults with the soft-delete setting enabled.
3738
- Fixed [bug 10352](https://github.com/Azure/azure-sdk-for-js/issues/10352), which caused cryptography operations on RSA-HSM keys to fail.

sdk/keyvault/keyvault-keys/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// https://github.com/karma-runner/karma-chrome-launcher
22
process.env.CHROME_BIN = require("puppeteer").executablePath();
3-
require("dotenv").config({ path: "../.env" });
3+
require("dotenv").config();
44
const {
55
jsonRecordingFilterFunction,
66
isPlaybackMode,

sdk/keyvault/keyvault-keys/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,14 @@
106106
"@rollup/plugin-node-resolve": "^8.0.0",
107107
"@rollup/plugin-replace": "^2.2.0",
108108
"@types/chai": "^4.1.6",
109+
"@types/chai-as-promised": "^7.1.0",
109110
"@types/mocha": "^7.0.2",
110111
"@types/node": "^8.0.0",
111112
"@types/query-string": "6.2.0",
112113
"@types/sinon": "^9.0.4",
113114
"assert": "^1.4.1",
114115
"chai": "^4.2.0",
116+
"chai-as-promised": "^7.1.1",
115117
"cross-env": "^7.0.2",
116118
"dotenv": "^8.2.0",
117119
"eslint": "^7.15.0",

sdk/keyvault/keyvault-keys/recordings/browsers/keys_client__create_read_update_and_delete_operations/recording_can_create_a_rsa_key_with_public_exponent.json

Lines changed: 238 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)