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

SSO requests ignore proxy configuration #6687

Closed
3 of 4 tasks
otaviomacedo opened this issue Nov 22, 2024 · 2 comments
Closed
3 of 4 tasks

SSO requests ignore proxy configuration #6687

otaviomacedo opened this issue Nov 22, 2024 · 2 comments
Assignees
Labels
bug This issue is a bug. closed-for-staleness p2 This is a standard priority issue

Comments

@otaviomacedo
Copy link

otaviomacedo commented Nov 22, 2024

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

@otaviomacedo otaviomacedo added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2024
@kuhe kuhe self-assigned this Nov 22, 2024
@kuhe kuhe added p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2024
@kuhe kuhe added the pending-release This issue will be fixed by an approved PR that hasn't been released yet. label Nov 22, 2024
@kuhe
Copy link
Contributor

kuhe commented Nov 25, 2024

a fix for this was released in https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.699.0

@kuhe kuhe added closing-soon This issue will automatically close in 4 days unless further comments are made. and removed pending-release This issue will be fixed by an approved PR that hasn't been released yet. labels Nov 25, 2024
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Nov 30, 2024
Copy link

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 Dec 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. closed-for-staleness p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

2 participants