Skip to content

Commit

Permalink
fix(NODE-6085): add TS support for KMIP data key options (#4128)
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Jun 4, 2024
1 parent 17febb4 commit f790cc1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
33 changes: 20 additions & 13 deletions src/client-side-encryption/client_encryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ export interface ClientEncryptionRewrapManyDataKeyProviderOptions {
| AWSEncryptionKeyOptions
| AzureEncryptionKeyOptions
| GCPEncryptionKeyOptions
| KMIPEncryptionKeyOptions
| undefined;
}

Expand Down Expand Up @@ -885,6 +886,24 @@ export interface AzureEncryptionKeyOptions {
keyVersion?: string | undefined;
}

/**
* @public
* Configuration options for making a KMIP encryption key
*/
export interface KMIPEncryptionKeyOptions {
/**
* keyId is the KMIP Unique Identifier to a 96 byte KMIP Secret Data managed object.
*
* If keyId is omitted, a random 96 byte KMIP Secret Data managed object will be created.
*/
keyId?: string;

/**
* Host with optional port.
*/
endpoint?: string;
}

/**
* @public
* Options to provide when creating a new data key.
Expand All @@ -897,6 +916,7 @@ export interface ClientEncryptionCreateDataKeyProviderOptions {
| AWSEncryptionKeyOptions
| AzureEncryptionKeyOptions
| GCPEncryptionKeyOptions
| KMIPEncryptionKeyOptions
| undefined;

/**
Expand All @@ -909,19 +929,6 @@ export interface ClientEncryptionCreateDataKeyProviderOptions {
keyMaterial?: Buffer | Binary;
}

/**
* @public
* @experimental
*/
export interface ClientEncryptionRewrapManyDataKeyProviderOptions {
provider: ClientEncryptionDataKeyProvider;
masterKey?:
| AWSEncryptionKeyOptions
| AzureEncryptionKeyOptions
| GCPEncryptionKeyOptions
| undefined;
}

/**
* @public
* @experimental
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export type {
ClientEncryptionRewrapManyDataKeyResult,
DataKey,
GCPEncryptionKeyOptions,
KMIPEncryptionKeyOptions,
RangeOptions
} from './client-side-encryption/client_encryption';
export {
Expand Down

0 comments on commit f790cc1

Please sign in to comment.