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

Azure.Core & Azure.Identity needs to be updated to support env vars #5967

Closed
2 tasks
joshfree opened this issue Oct 21, 2019 · 6 comments
Closed
2 tasks

Azure.Core & Azure.Identity needs to be updated to support env vars #5967

joshfree opened this issue Oct 21, 2019 · 6 comments
Assignees
Labels
Azure.Identity 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

@joshfree
Copy link
Member

joshfree commented Oct 21, 2019

The environment variables identified in https://github.com/Azure/azure-sdk/blob/master/_includes/tables/environment_variables.md such as

Environment Variable Purpose
Proxy Settings
HTTP_PROXY Proxy for HTTP connections
HTTPS_PROXY Proxy for HTTPS connections
NO_PROXY Hosts which must not use a proxy
Identity
MSI_ENDPOINT Azure AD MSI Credentials
MSI_SECRET Azure AD MSI Credentials
AZURE_SUBSCRIPTION_ID Azure subscription
AZURE_USERNAME Azure username for U/P Auth
AZURE_PASSWORD Azure password for U/P Auth
AZURE_CLIENT_CERTIFICATE_PATH Azure Active Directory
AZURE_CLIENT_ID Azure Active Directory
AZURE_CLIENT_SECRET Azure Active Directory
AZURE_TENANT_ID Azure Active Directory
AZURE_RESOURCE_GROUP Azure Resource Group
AZURE_CLOUD Name of the sovereign cloud
Pipeline Configuration
AZURE_TELEMETRY_DISABLED Disables telemetry
AZURE_LOG_LEVEL Enable logging by setting a log level.
AZURE_TRACING_DISABLED Disables tracing
AZURE_AUTHORITY_HOST Azure Active Directory
  • ManagedIdentityCredential - AZURE_CLIENT_ID

  • TokenCredentialOptions - AZURE_AUTHORITY_HOST

need to be reviewed, supported, and tested for our Azure.Core and Azure.Identity. There are at least some of these not currently properly supported, such as AZURE_CLOUD for example.

@joshfree joshfree added Azure.Identity feature-request This issue requires a new behavior in the product in order be resolved. labels Oct 21, 2019
@joshfree joshfree added this to the Sprint 162 milestone Oct 21, 2019
@joshfree
Copy link
Member Author

We will target this work for the December preview

@joshfree
Copy link
Member Author

joshfree commented Jan 3, 2020

Hi @tzhanl - how is the Identity environment variable support progressing? Do you need any assistance from @g2vinay or @jianghaolu? Thanks 😄

@joshfree joshfree removed this from the [2020] January milestone Jan 3, 2020
@tzhanl
Copy link

tzhanl commented Jan 6, 2020

@joshfree we sorted out all the env vars fro all languages.

Environment Variable Purpose Current Using Comments
Proxy Settings      
HTTP_PROXY Proxy for HTTP connections C#(Azure.core) JS(Azure.core) Python(Azure.core) Java(defined but not use) C#: HttpEnvironmentProxy JS: ProxyPolicy Python: ProxyPolicy
HTTPS_PROXY Proxy for HTTPS connections C#(Azure.core) JS(Azure.core) Python(Azure.core) Java(defined but not use) C#: HttpEnvironmentProxy JS: ProxyPolicy Python: ProxyPolicy
NO_PROXY Hosts which must not use a proxy C#(Azure.core) Java(defined but not use) C#: HttpEnvironmentProxy
ALL_PROXY (only in C#)   C#(Azure.core) C#: HttpEnvironmentProxy
Identity      
MSI_ENDPOINT Azure AD MSI Credentials Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(Azure.identity) Java: AppServiceMsiCredential,ManagedIdentityCredential C#: ManagedIdentityCredential JS: ManagedIdentityCredential Python: ManagedIdentityCredential
MSI_SECRET Azure AD MSI Credentials Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(Azure.identity) Java: AppServiceMsiCredential,ManagedIdentityCredential C#: ManagedIdentityCredential JS: ManagedIdentityCredential Python: ManagedIdentityCredential
AZURE_USERNAME Azure username for U/P Auth Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(Azure.identity) Java: SharedTokenCacheCredential C#: EnvironmentCredential,DefaultAzureCredential JS: EnvironmentCredential,DefaultAzureCredential Python: EnvironmentCredential,DefaultAzureCredential
AZURE_PASSWORD Azure password for U/P Auth C#(Azure.identity) JS(Azure.identity) Python(Azure.identity) Java(defined but not use) C#: EnvironmentCredential,DefaultAzureCredential JS: EnvironmentCredential,DefaultAzureCredential Python: EnvironmentCredential,DefaultAzureCredential
AZURE_CLIENT_CERTIFICATE_PATH Azure Active Directory JS(Azure.identity) Python(Azure.identity) C#(not defined) Java(not defined) JS: EnvironmentCredential,DefaultAzureCredential Python: EnvironmentCredential,DefaultAzureCredential
AZURE_CLIENT_ID Azure Active Directory Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(Azure.identity) Java: EnvironmentCredential,DefaultAzureCredential C#: EnvironmentCredential,DefaultAzureCredential JS: EnvironmentCredential,DefaultAzureCredential Python: EnvironmentCredential,DefaultAzureCredential
AZURE_CLIENT_SECRET Azure Active Directory Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(Azure.identity) Java: EnvironmentCredential,DefaultAzureCredential C#: EnvironmentCredential,DefaultAzureCredential JS: EnvironmentCredential,DefaultAzureCredential Python: EnvironmentCredential,DefaultAzureCredential
AZURE_TENANT_ID Azure Active Directory Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(Azure.identity) Java: EnvironmentCredential,DefaultAzureCredential C#: EnvironmentCredential,DefaultAzureCredential JS: EnvironmentCredential,DefaultAzureCredential Python: EnvironmentCredential,DefaultAzureCredential
Pipeline Configuration      
AZURE_TELEMETRY_DISABLED Disables telemetry java(Azure.core) C#(Azure.core) Java: UserAgentPolicy C#: DiagnosticsOptions
AZURE_LOG_LEVEL Enable logging by setting a log level. Java(Azure.core) JS(Azure.core) Python(Azure.core) Java: Logging JS: Logger Python: Settings
AZURE_TRACING_DISABLED Disables tracing java(Azure.core) C#(Azure.core) Java: Configuration C#: DiagnosticsOptions
AZURE_TRACING_ENABLED (only in Python)   Python(Azure.core) Python: Settings
AZURE_SDK_TRACING_IMPLEMENTATION (only in Python)   Python(Azure.core) Python: Settings
AZURE_AUTHORITY_HOST Azure Active Directory Not defined on all language  
General SDK Configuration      
AZURE_CLOUD Name of the sovereign cloud Java( defined but not use) Not defined on all other language  
AZURE_SUBSCRIPTION_ID Azure subscription Java( defined but not use) Not defined on all other language  
AZURE_RESOURCE_GROUP Azure Resource Group Java( defined but not use) Not defined on all other language  

Next step: For each EnvVars that not used anywhere, identify where they should be called, and update related code, add unit test and send PR.

@jianghaolu jianghaolu added this to the Backlog milestone Jul 15, 2020
@joshfree joshfree added the Client This issue points to a problem in the data-plane of the library. label Jul 16, 2020
@joshfree
Copy link
Member Author

@tzhanl other than #10372, is there any other remaining work left undone for this Java work item?

@tzhanl
Copy link

tzhanl commented Jul 17, 2020

@joshfree Besides Azure_Client_ID, still more variables.

Details:

Environment Variable Purpose Current Usage Gaps Java
HTTP_PROXY Proxy for HTTP connections C#(Azure.Core.Pipeline) JS(Azure.core) Java(defined but not use) Python (not defined)   Already support
HTTPS_PROXY Proxy for HTTPS connections C#(Azure.Core.Pipeline) JS(Azure.core) Java(defined but not use) Python (not defined) Java: Update ProxyOptions to support HTTPS_PROXY Can't support
NO_PROXY Hosts which must not use a proxy Hosts to exclude C#(Azure.Core.Pipeline) Java(defined but not use) Python (not defined) JS: ProxyPolicy has a ProxySettings property. This will be  modified to support EnvVar NO_PROXY. PR: Azure/azure-sdk-for-js#7069   Java: Update ProxyOptions to support NO_PROXY Can't support
ALL_PROXY (only in C#) Proxy for both http and https connections. Lower priority to HTTP_PROXY and HTTPS_PROXY. C#(Azure.Core.Pipeline) Python (not defined) JS: ProxyPolicy has a ProxySettings property. This will be  modified to support EnvVar ALL_PROXY. PR: Azure/azure-sdk-for-js#7069   Java: Update ProxyOptions to support ALL_PROXY. Can't support
MSI_ENDPOINT Azure AD MSI Credentials Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(azure.identity) No Gap No Gap
MSI_SECRET Azure AD MSI Credentials Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(azure.identity) No Gap No Gap
AZURE_USERNAME Azure username for U/P Auth Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(azure.identity) Java: EnvironmentCredential currently only supports client-secret values as env vars. Update it to support AZURE_USERNAME for username-password credential.   No Gap for other languages. merged
AZURE_PASSWORD Azure password for U/P Auth C#(Azure.identity) JS(Azure.identity) Java(defined but not use) Python(azure.identity) Java: EnvironmentCredential currently only supports client-secret values as env vars. Update it to support AZURE_PASSWORD for username-password credential. No Gap for other languages. merged
AZURE_CLIENT_CERTIFICATE_PATH Azure Active Directory JS(Azure.identity) C#(not defined) Java(not defined) Python(azure.identity) c#: Update EnvironmentCredentail to support AZURE_CLIENT_CERTIFICATE_PATH for client-certificate credential. PR:Azure/azure-sdk-for-net#9430 (closed) Azure/azure-sdk-for-net#10196   Java: Update EnvironmentCredential to support AZURE_CLIENT_CERTIFICATE_PATH for client-certificate credential.  #7337 No Gap for other languages. merged
AZURE_CLIENT_ID Azure Active Directory Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(azure.identity) ALL: ManagedIdentityCredential will be updated to support AZURE_CLIENT_ID env var if the user does not supply one.  
AZURE_CLIENT_SECRET Azure Active Directory Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(azure.identity) No Gap No Gap
AZURE_TENANT_ID Azure Active Directory Java(Azure.core) C#(Azure.identity) JS(Azure.identity) Python(azure.identity) No Gap No Gap
AZURE_TELEMETRY_DISABLED Disables telemetry java(Azure.core) C#(Azure.core) JS: UserAgentPolicy has a userAgent property. This will be  modified to support EnvVar AZURE_TELEMETRY_DISABLED. Python: Modify UserAgentPolicy to support AZURE_TELEMETRY_DISABLED. No Gap for other languages. No Gap
AZURE_LOG_LEVEL Enable logging by setting a log level. Java(Azure.core) JS(Azure.core) Python(Azure.core) c#: Don't know  
AZURE_TRACING_DISABLED Disables tracing java(Azure.core) C#(Azure.core) AZURE_TRACING_DISABLED and AZURE_TRACING_ENABLED, keep which one? pending
AZURE_TRACING_ENABLED (only in Python)   Python(Azure.core) AZURE_TRACING_DISABLED and AZURE_TRACING_ENABLED, keep which one? pending
AZURE_SDK_TRACING_IMPLEMENTATION (only in Python)   Python(Azure.core) Don't know.  
AZURE_AUTHORITY_HOST Azure Active Directory Not defined on all language TokenCredentialOptions has an AuthorityHost property. This will be modified to support EnvVar override with AZURE_AUTHORITY_HOST Python: Add EnvVar AZURE_AUTHORITY_HOST  PR: Azure/azure-sdk-for-python#10357 merged
AZURE_CLOUD Name of the sovereign cloud Java( defined but not use) Not defined on all other language Don't know  
AZURE_SUBSCRIPTION_ID Azure subscription Java( defined but not use) Not defined on all other language Don't know  
AZURE_RESOURCE_GROUP Azure Resource Group Java( defined but not use) Not defined on all other language Don't know  

@jongio

@g2vinay
Copy link
Member

g2vinay commented Oct 29, 2021

@tzhanl
Let us know if there's any work still in progress here and we can reopen this issue.

@g2vinay g2vinay closed this as completed Oct 29, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity 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

5 participants