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

Msal Node adds support proxy #4447

Merged
merged 20 commits into from Feb 8, 2022
Merged

Msal Node adds support proxy #4447

merged 20 commits into from Feb 8, 2022

Conversation

sameerag
Copy link
Member

@sameerag sameerag commented Jan 25, 2022

msal-node by default uses axios as the network manager.
Since axios does not support proxies in its implementation as mentioned in this issue, the current SDK fails to support proxy environments.

We provide couple options to solve this:

  • Developers can implement their own NetworkManager by instantiating INetworkModule and building proxy support in it
  • Support proxy support explicitly with https-proxy-agent

This PR adds the proxy support in the existing package and adds documentation for alternatives.

@github-actions github-actions bot added msal-common Related to msal-common package msal-node Related to msal-node package labels Jan 25, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2022

Codecov Report

Merging #4447 (30e6adb) into dev (a146c2b) will decrease coverage by 0.05%.
The diff coverage is 56.00%.

Flag Coverage Δ *Carryforward flag
msal-angular 96.39% <ø> (ø) Carriedforward from a146c2b
msal-browser 87.50% <ø> (ø) Carriedforward from a146c2b
msal-common 85.32% <75.00%> (ø) Carriedforward from a146c2b
msal-core 82.67% <ø> (ø) Carriedforward from a146c2b
msal-node 82.32% <22.22%> (-0.65%) ⬇️
msal-node-extensions 76.03% <ø> (ø) Carriedforward from a146c2b
msal-react 92.70% <ø> (ø) Carriedforward from a146c2b

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
lib/msal-common/src/client/BaseClient.ts 68.29% <ø> (ø)
lib/msal-common/src/client/DeviceCodeClient.ts 84.81% <ø> (ø)
lib/msal-common/src/config/ClientConfiguration.ts 100.00% <ø> (ø)
lib/msal-common/src/network/INetworkModule.ts 33.33% <ø> (ø)
lib/msal-common/src/url/UrlString.ts 91.48% <ø> (ø)
lib/msal-node/src/config/Configuration.ts 100.00% <ø> (ø)
lib/msal-node/src/network/HttpClient.ts 54.16% <12.50%> (-16.43%) ⬇️
lib/msal-common/src/authority/RegionDiscovery.ts 45.71% <33.33%> (ø)
lib/msal-common/src/authority/Authority.ts 98.10% <100.00%> (ø)
lib/msal-common/src/authority/AuthorityFactory.ts 100.00% <100.00%> (ø)
... and 6 more

@sameerag sameerag changed the title Msal node 2600 v2 Msal Node adds support proxy Jan 25, 2022
@sameerag sameerag marked this pull request as draft January 25, 2022 22:14
@sameerag sameerag marked this pull request as ready for review February 4, 2022 20:41
lib/msal-common/src/authority/Authority.ts Outdated Show resolved Hide resolved
lib/msal-common/src/authority/Authority.ts Outdated Show resolved Hide resolved
lib/msal-common/src/authority/Authority.ts Outdated Show resolved Hide resolved
lib/msal-common/src/authority/RegionDiscovery.ts Outdated Show resolved Hide resolved
lib/msal-common/src/authority/RegionDiscovery.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@tnorling tnorling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for addressing feedback!

@github-actions github-actions bot added the documentation Related to documentation. label Feb 7, 2022
lib/msal-node/docs/faq.md Outdated Show resolved Hide resolved
@sameerag sameerag merged commit 639253a into dev Feb 8, 2022
@sameerag sameerag deleted the msal-node-2600-v2 branch February 8, 2022 00:40
@ghost
Copy link

ghost commented Feb 8, 2022

🎉@azure/msal-common@v6.1.0 has been released which incorporates this pull request.:tada:

We recommend upgrading to the latest version of @azure/msal-browser or @azure/msal-node to take advantage of this change.

Handy links:

@ghost
Copy link

ghost commented Feb 8, 2022

🎉@azure/msal-node@v1.6.0 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to documentation. msal-common Related to msal-common package msal-node Related to msal-node package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants