Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
1 change: 1 addition & 0 deletions sdk/keyvault/keyvault-secrets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 4.2.0-beta.3 (Unreleased)

- Updated the Latest service version to 7.2.
- Added a `certificateKeyId?: string` secret property to use instead of the deprecated `keyId?: URL` and removed `"lib": ["dom"]` from `tsconfig.json`

## 4.2.0-beta.2 (2021-02-09)

Expand Down
4 changes: 3 additions & 1 deletion sdk/keyvault/keyvault-secrets/review/keyvault-secrets.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@ export interface SecretPollerOptions extends coreHttp.OperationOptions {

// @public
export interface SecretProperties {
readonly certificateKeyId?: string;
contentType?: string;
readonly createdOn?: Date;
enabled?: boolean;
readonly expiresOn?: Date;
id?: string;
readonly keyId?: URL;
// @deprecated
readonly keyId?: any;
Comment thread
maorleger marked this conversation as resolved.
Outdated
readonly managed?: boolean;
name: string;
readonly notBefore?: Date;
Expand Down
12 changes: 11 additions & 1 deletion sdk/keyvault/keyvault-secrets/src/secretsModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,18 @@ export interface SecretProperties {
* this field specifies the corresponding key backing the KV certificate.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
* @deprecated Please use {@link SecretProperties.certificateKeyId} instead. This field will always be undefined.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Some may take the "this" here to refer to certificateKeyId :)

How about the below?

The keyId field has and will be left as undefined.

*/
readonly keyId?: URL;
readonly keyId?: any;

/**
* If this is a secret backing a KV certificate, then
* this field specifies the identifier of the corresponding key backing the KV certificate.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly certificateKeyId?: string;

/**
* True if the secret's lifetime is managed by
* key vault. If this is a secret backing a certificate, then managed will be
Expand Down
3 changes: 2 additions & 1 deletion sdk/keyvault/keyvault-secrets/src/transformations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export function getSecretFromSecretBundle(

vaultUrl: parsedId.vaultUrl,
version: parsedId.version,
name: parsedId.name
name: parsedId.name,
certificateKeyId: secretBundle.kid
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ describe("Transformations", () => {
managed: true,
vaultUrl: "https://azure_keyvault.vault.azure.net",
version: "1",
name: "abc123"
name: "abc123",
certificateKeyId: "test_kid"
}
};

Expand Down
1 change: 0 additions & 1 deletion sdk/keyvault/keyvault-secrets/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"declarationDir": "./types",
"outDir": "./dist-esm",
"lib": ["dom"],
"resolveJsonModule": true
},
"exclude": ["node_modules", "../keyvault-common/node_modules", "./samples/**/*.ts"],
Expand Down