Skip to content

SSO requests ignore proxy configuration #6687

@otaviomacedo

Description

@otaviomacedo

Checkboxes for prior research

Describe the bug

The SDK gets credentials via SSO directly (ignoring proxy configuration) provided in the fromIni() method.

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/[email protected]

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

node version: v22.9.0

Reproduction Steps

  1. Precondition: the SSO set-up has been done (creating user, aws sso login etc).
  2. Start a proxy on port 8080. I'm using mitmproxy.
  3. Install the CA certificate.
  4. Run the following code:
    const agent = new ProxyAgent({
      ca: fs.readFileSync('/path/to/pem', { encoding: 'utf-8' }),
      getProxyForUrl: () => Promise.resolve('http://localhost:8080'),
    });

    const provider = fromIni({
      profile: 'test',
      ignoreCache: true,
      clientConfig: {
        requestHandler: {
          connectionTimeout: 30000,
          requestTimeout: 10000,
          httpsAgent: agent,
          httpAgent: agent,
        },
      },
    });

    console.log(await provider());
  1. Watch the proxy logs.

Observed Behavior

The TypeScript program will print the AWS credentials, but the proxy won't show any activity. To further confirm, if I shut down the proxy, the credentials are still retrieved.

Expected Behavior

Proxy show activity when up and request fail when proxy is down.

Possible Solution

No response

Additional Information/Context

Related issue: aws/aws-cdk#32208

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closed-for-stalenessp2This is a standard priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions