Skip to content

Commit a5dd6c2

Browse files
authored
fix: Update user agent calls to KMS (#205)
We want to identify which implementation of the AWS Encryption SDK is being used in order to assist in any requests from customers or for debugging as necessary by developers. We plan to utilize the user agent set by the SDK to achieve this. This identification is done in the default clientProvider. Users can create their own clientProvider, and set a different user agent.
1 parent f642b29 commit a5dd6c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/kms-keyring-browser/src/kms_keyring_browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
} from '@aws-crypto/material-management-browser'
3737
import { KMS } from 'aws-sdk' // eslint-disable-line no-unused-vars
3838

39-
const getKmsClient = getClient(KMS)
39+
const getKmsClient = getClient(KMS, { customUserAgent: 'AwsEncryptionSdkJavascriptBrowser' })
4040
const cacheKmsClients = cacheClients(getKmsClient)
4141

4242
export type KmsKeyringWebCryptoInput = Partial<KmsKeyringInput<KMS>>

modules/kms-keyring-node/src/kms_keyring_node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
immutableClass, KeyringNode
3030
} from '@aws-crypto/material-management-node'
3131
import { KMS } from 'aws-sdk' // eslint-disable-line no-unused-vars
32-
const getKmsClient = getClient(KMS)
32+
const getKmsClient = getClient(KMS, { customUserAgent: 'AwsEncryptionSdkJavascriptNodejs' })
3333
const cacheKmsClients = cacheClients(getKmsClient)
3434

3535
export type KmsKeyringNodeInput = Partial<KmsKeyringInput<KMS>>

0 commit comments

Comments
 (0)