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

Fix client logging. #22

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Fix client logging. #22

merged 1 commit into from
Mar 5, 2024

Conversation

petermyers
Copy link
Collaborator

The logging interface for aws sdk v3 changed from v2. This follows a similar pattern to the client logging in aws-lambda-stream library.

Missed this in my initial upgrade PR. Tested to verify sensitive information is not logged.
Output logs from kms-client look like:

2024-03-05T17:27:22.187Z kms {
  clientName: 'KMSClient',
  commandName: 'DecryptCommand',
  input: {
    CiphertextBlob: <Buffer 01 02 03 00 78 47 16 ad d7 c3 22 6d ec d1 57 c3 6b df 6b 44 59 1c 7e a9 2b 6c 07 b1 81 2c 7b e1 26 04 41 13 b9 01 7c 5b 2d 35 6e 91 ba c9 5c e8 85 ca ... 134 more bytes>
  },
  output: {
    EncryptionAlgorithm: 'SYMMETRIC_DEFAULT',
    KeyId: 'arn:aws:kms:us-east-1:<my aws account id redacted here>:key/dac69c83-0387-4109-8ed0-28b9dfba9d26',
    Plaintext: '***SensitiveInformation***'
  },
  metadata: {
    httpStatusCode: 200,
    requestId: 'e38f3da9-55e4-4991-89c0-d5c409c46957',
    extendedRequestId: undefined,
    cfId: undefined,
    attempts: 1,
    totalRetryDelay: 0
  }

@jgilbert01 jgilbert01 merged commit ca3ac47 into master Mar 5, 2024
2 checks passed
@jgilbert01 jgilbert01 deleted the sdk-v3-logging branch March 5, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants