-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Context:
The library aio-lib-core-networking v2 had a bug (adobe/aio-lib-core-networking#16) which caused the wrong type of proxy (http vs https) to be selected. This bug has been fixed in aio-lib-core-networking v3 (see line https://github.com/adobe/aio-lib-core-networking/blob/master/src/ProxyFetch.js#L45).
aio cli (the cli tool) has been upgraded to use aio-lib-core-networking v3, but the aio-cli-plugin-cloudmanager still uses v2 and hence uses faulty proxy logic.
Please update aio-cli-cloudmanager-plugin to also use aio-lib-core-networking v3.
Expected Behavior
When using an http proxy for an https endpoint (it is a valid use case), then an https proxy must be used (see table in adobe/aio-lib-core-networking#16).
Test invocation:
HTTP_PROXY=http://username:[email protected]:8080/ HTTPS_PROXY=http://username:[email protected]:8080/ DEBUG=* aio cloudmanager:list-programs
The log output should read:
...
https-proxy-agent Creating new HttpsProxyAgent instance ...
...
Actual Behavior
Since the aio-cli-plugin-cloudmanager is using the old aio-lib-core-networking library version (v2 instead of v3), an http-proxy-agent is being created:
Same invocation:
HTTP_PROXY=http://username:[email protected]:8080/ HTTPS_PROXY=http://username:[email protected]:8080/ DEBUG=* aio cloudmanager:list-programs
The log output actually reads:
...
http-proxy-agent Creating new HttpProxyAgent instance: { protocol: 'http:', hostname: '127.0.0.1', hash: '', search: '', pathname: '/', path: undefined, href: 'http://username:[email protected]:8080/', port: '8080', auth: 'username:password', rejectUnauthorized: true }
...
Reproduction Scenario, Platform, and Version
aio cli 9.1.1 with aio-cli-cloudmanager-plugin 3.0.2 on a Mac
Also include the output of aio -v and aio plugins
aio --version
@adobe/aio-cli/9.1.1 darwin-x64 node-v14.18.3
aio info:
System:
OS: macOS 13.0.1
CPU: (10) x64 Apple M1 Max
Memory: 17.12 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.18.3 - ~/.nvm/versions/node/v14.18.3/bin/node
Yarn: Not Found
npm: 6.14.15 - ~/.nvm/versions/node/v14.18.3/bin/npm
Virtualization:
Docker: 20.10.21 - /usr/local/bin/docker
npmGlobalPackages:
@adobe/aio-cli: 9.1.1
Proxies:
http: http://username:[email protected]:8080/
https: http://username:[email protected]:8080/ (scheme mismatch)
CLI plugins:
core:
@adobe/aio-cli 9.1.1
@adobe/aio-cli-plugin-app 10.0.2
@adobe/aio-cli-plugin-app-templates 1.5.1
@adobe/aio-cli-plugin-auth 3.0.1
@adobe/aio-cli-plugin-certificate 1.0.1
@adobe/aio-cli-plugin-config 4.0.1
@adobe/aio-cli-plugin-console 4.0.1
@adobe/aio-cli-plugin-events 2.0.2
@adobe/aio-cli-plugin-info 3.0.1
@adobe/aio-cli-plugin-runtime 6.0.1
@adobe/aio-cli-plugin-telemetry 1.1.0
@oclif/plugin-autocomplete 1.3.6
@oclif/plugin-help 5.1.19
@oclif/plugin-not-found 2.3.9
@oclif/plugin-plugins 2.1.7
@oclif/plugin-warn-if-update-available 2.0.14
user:
@adobe/aio-cli-plugin-cloudmanager 3.0.2
link: