aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.65k stars 3.91k forks source link

AWS CDK CDk-application-pipeline (module name): (short issue description) #28511

Closed araravicha closed 4 months ago

araravicha commented 10 months ago

Describe the bug

executing the bootstrapping command in the provided examples npx ts-node infrastructure/src/bootstrap.tx results in unable to get local issuer certificate. I am trying this command form a windows powersheli. I am in the corporate network that uses Zscaler. IS there a way to determine what site is the command reaching out to? The eero happens after it gets the progule for the toolchain account. The error message is very cryptic and does not provide any indication of the destination it is trying to reach. Here is the error message: npx ts-node infrastructure/src/bootstrap.ts √ Select AWS profile for 'toolchain' account » toolchain Error: unable to get local issuer certificate at TLSSocket.onConnectSecure (node:_tls_wrap:1550:34) at TLSSocket.emit (node:events:514:28) at TLSSocket.emit (node:domain:489:12) at TLSSocket._finishInit (node:_tls_wrap:967:8) at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:743:12) { code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY', '$metadata': { attempts: 1, totalRetryDelay: 0 }

Expected Behavior

It should have bootstrapped the toolchain account

Current Behavior

npx ts-node infrastructure/src/bootstrap.ts √ Select AWS profile for 'toolchain' account » toolchain Error: unable to get local issuer certificate at TLSSocket.onConnectSecure (node:_tls_wrap:1550:34) at TLSSocket.emit (node:events:514:28) at TLSSocket.emit (node:domain:489:12) at TLSSocket._finishInit (node:_tls_wrap:967:8) at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:743:12) { code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY', '$metadata': { attempts: 1, totalRetryDelay: 0 }

Reproduction Steps

You need to be on a WIndows 10 environemnt on a corproate network using Zscaler (self signed certificates)

Possible Solution

Need to determine the destination being accessed so that the certificate for that location along with Zscaler root certificate can be provisioned and the location of the certificate provided to the software (aws-CDK?) can be specified

Additional Information/Context

Nothing else

CDK CLI Version

2.113

Framework Version

No response

Node.js Version

18.17.1

OS

Windows 10

Language

TypeScript

Language Version

10.9.2

Other information

No response

araravicha commented 10 months ago

It is coconfirmed as an issue with Node.js not forwrding the env variable aws_ca-bundle to a sub process. If for that step we set https-proxy variable that step works but we get erros in the immediatley following steps because the proxy terminates the request before the handshake. SO remove the proxy and then the rest of the stuff works. The work around is clunky but will do fo rnow but the issue needs to be fixed within node.

pahud commented 10 months ago

I am not sure if this issue still exists. If it does, please provide a minimal code snippets that reproduces this issue. Thanks.

github-actions[bot] commented 10 months ago

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

araravicha commented 10 months ago

This issue needs to be resolved. Node is not conveying environmental parameters, when is spawns a sub process. The example code is in the cdk- application- directory. In the file bootstrap.ts, when it spawns a sub process to execute bootstrap command npx command It works from the command line but not through the code Thanks Ravi

On Thu, Jan 4, 2024, 3:04 PM github-actions[bot] @.***> wrote:

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

— Reply to this email directly, view it on GitHub https://github.com/aws/aws-cdk/issues/28511#issuecomment-1877690808, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIBSOKS4EJ4VVL2TW4PIX3YM4DOPAVCNFSM6AAAAABBF2NYSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXGY4TAOBQHA . You are receiving this because you authored the thread.Message ID: @.***>

pahud commented 5 months ago

As mentioned, please provide a minimal code snippets that reproduces this issue so we can look into this problem. Thanks.

github-actions[bot] commented 4 months ago

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.