question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot configure HTTP proxy in `azure-keyvault-secrets`

See original GitHub issue
  • Package Name: azure-keyvault-secrets
  • Package Version: 1.22.1
  • Operating System: linux
  • Python Version: 3.9.7

Describe the bug According to this documentation it should be possible to configure proxies globally by using the HTTP*_PROXY environment variables.

However, they do not seem to have any effect on azure.keyvault.secrets.SecretClient. Instead the request to KeyVault just hangs.

To Reproduce Steps to reproduce the behavior:

def get_secret():
    credential = DefaultAzureCredential()
    secret_client = SecretClient(vault_url="...", credential=credential)
    v = secret_client.get_secret("mysecret").value
    print(f"My secret: {v}")

The code snippet does work in an environment without a corporate proxy.

Expected behavior To be able to configure proxy according to the documentation.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
lundholmxcommented, Mar 29, 2022

@xiangyan99 proxy support comes from azure-core, and it seems like the base client for SecretClient is using RequestsTransport in a way that should support this scenario. Do you have any ideas as to what could be happening here?

We saw that in the source code and also thought the default settings would support proxy (ultimately via requests.Session if we understand it correctly). We also tried setting the transport on SecretClient explicitly without success.

1reaction
kashifkhancommented, Mar 23, 2022

Hi @lundholmx , thanks for the feedback. We’ll take a look at this and get back to you asap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Key Vault Secrets client library for Python
pip install azure-keyvault-secrets azure-identity ... It cannot change the secret's value; use set_secret to set a secret's value. Python
Read more >
Intellij Community can't use http proxy for Maven
Navigate to Maven > Importing 1. inside the IntelliJ IDEA Settings (which is found under File > Settings ). The second last option...
Read more >
azure-keyvault-secrets 4.6.0
It cannot change the secret's value; use set_secret to set a secret's value. from azure.identity import DefaultAzureCredential from azure.keyvault.secrets ...
Read more >
Add an Azure Key Vault Secrets Manager
Add an Azure Key Vault Secrets Manager · Before You Begin · Visual Overview · Step 1: Create Azure Reader Role. Azure Portal;...
Read more >
Certificates with Azure Key Vault and Nginx Ingress Controller
In Create a certificate, fill in the blanks. If you want to use a real domain, make sure you specify it in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found