Azure / azure-data-lake-store-python

Microsoft Azure Data Lake Store Filesystem Library for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

azure-datalake-store auth.lib() with proxy not working

robertfjones opened this issue · comments

Description

I am using the lib.auth for authenticating for a service to service connection, I can get this to work from my home connection but as soon as I am behind a corporate proxy it does not work. I have read this uses the Requests library but I can confirm the proxy settings don't seem to be used when applied.

#Without proxy
adlCreds = lib.auth(tenant_id = tenant,
                client_secret = client_secret,
                client_id = client_id,
                resource = RESOURCE)

#With proxy
proxies = {'https': 'mysuser:mypassword@myproxy:1234'}

adlCreds = lib.auth(tenant_id = tenant,
                client_secret = client_secret,
                client_id = client_id,
                resource = RESOURCE,
                proxies = proxies)

Separately, for completeness, when authenticating using the the adal library for account management the proxy works fine.

#Azure management authentication
context = adal.AuthenticationContext(authority_uri, api_version=None, proxies = proxies, verify_ssl=True)
mgmt_token = context.acquire_token_with_client_credentials(RESOURCE, client_id, client_secret)
armCreds = AADTokenCredentials(mgmt_token, client_id, resource=RESOURCE)

Please help!