Skip to content

JS SDK does not support CA bundle configuration #2970

@jkenn99

Description

@jkenn99

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
The AWS CLI and other SDKs support configuration of a custom SSL/TLS CA bundle path using the AWS_CA_BUNDLE environment variable or ca_bundle key in ~/.aws/config. Neither of these are supported by the JS SDK.

Is the issue in the browser/Node.js?
Node.js

If on Node.js, are you running this on AWS Lambda?
N/A

Details of the browser/Node.js version
v10.17.0

SDK version number
2.576.0

To Reproduce (observed behavior)
My corporate network uses TLS interception with an internal root CA. This CA is added to a custom CA bundle set in ~/.aws/config:

[default]
ca_bundle = /path/to/ca-bundle.trust.crt

When attempting to make any requests using the AWS JS SDK, I get something like the following result:

Error: self signed certificate in certificate chain
    at TLSSocket.onConnectSecure (_tls_wrap.js:1058:34)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.EventEmitter.emit (domain.js:448:20)
    at TLSSocket._finishInit (_tls_wrap.js:636:8)
  message: 'self signed certificate in certificate chain',
  code: 'NetworkingError',
  region: 'us-east-1',
  hostname: 'sts.amazonaws.com',
  retryable: true,
  time: 2019-11-21T23:48:23.555Z

Expected behavior
The JS SDK should match the behaviour of the CLI and other SDKs with support for a custom CA bundle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions