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

Unable to get access_token due to aiohttp not honoring env proxy vars #19282

Closed
priyaananthasankar opened this issue Jun 16, 2021 · 2 comments
Closed
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved.
Milestone

Comments

@priyaananthasankar
Copy link

priyaananthasankar commented Jun 16, 2021

  • azure-identity 1.6.0
  • Python 3.8
  • Windows/OSX

The aio version of ClientSecretCredential when used to obtain an access_token fails with the following error:
Cannot connect to host <REQUESTED URL>:443 ssl:default [The parameter is incorrect] because the environment variable no_proxy is not honored by aiohttp (which is internally used by the async identity python sdk)
Here is the aiohttp issue: aio-libs/aiohttp#4431

To Reproduce (run this in an asyncio event loop)

from azure.identity.aio import ClientSecretCredential

credential = await ClientSecretCredential(self.tenant_id,self.client_id,self.client_secret)
token_obj = credential.get_token("https://management.core.windows.net/.default")
credential.close()

Expected behavior
Get back a token

Impacts

Since Identity cannot be used in an async fashion, this has cascading effects on other SDK's like BlobServiceClient that would need a storage credential and further will lead to customer being able to use only the sync version of these SDK's and it would lead to throughput issues downstream.

aiohttp will release a fix in their 3.8 release (current is 3.7.x) and once that is released, this needs to be re-tested. Keeping this here for tracking

Most secure enterprise setups will have no_proxy environment variable set and this should be fixed to fully avail the async aspects of the SDK.

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jun 16, 2021
@xiangyan99 xiangyan99 added Azure.Core Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved. labels Jun 18, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jun 18, 2021
@xiangyan99 xiangyan99 added this to the Backlog milestone Jun 24, 2021
@awoimbee
Copy link

seems like this is fixed: aio-libs/aiohttp#4445

Copy link

Hi @priyaananthasankar, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 15, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved.
Projects
None yet
Development

No branches or pull requests

3 participants