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(logger): disable logging of raw HTTP request/response #1682

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Nov 13, 2020

Issue #, if available:
Internal JS-2221

Description of changes:
Disable logging of raw HTTP request/response, as it logs sensitive data in raw HTTP request/response.

Example code
const { IAM } = require("@aws-sdk/client-iam");

(async () => {
  const region = "us-west-2";
  const logger = console;

  const client = new IAM({ region, logger });
  await client.changePassword({
    OldPassword: "OldPassword",
    NewPassword: "NewPassword",
  });
})();
Relevant logger output
{ clientName: 'IAMClient', commandName: 'ChangePasswordCommand' }
{
  input: {
    OldPassword: '***SensitiveInformation***',
    NewPassword: '***SensitiveInformation***'
  }
}
{
  httpRequest: HttpRequest {
    method: 'POST',
    hostname: 'iam.amazonaws.com',
    port: undefined,
    query: {},
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    body: 'NewPassword=NewPassword&OldPassword=OldPassword&Action=ChangePassword&Version=2010-05-08',
    protocol: 'https:',
    path: '/'
  }
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr merged commit 2f1975d into aws:master Nov 13, 2020
@trivikr trivikr deleted the remove-logging-http-req-res branch November 13, 2020 19:39
@github-actions
Copy link

github-actions bot commented Jan 9, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants