azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

SDK inconsistency across langs: support AZURE_CLIENT_SEND_CERTIFICATE_CHAIN from DAC

Open maurolscla opened this issue 9 months ago • 2 comments

Is your feature request related to a problem? Please describe. In order to implement SNI cert-based auth one has to leverage ClientCertificateCredential instead of DefaultAzureCredential. This happens because the latter does not support the AZURE_CLIENT_SEND_CERTIFICATE_CHAIN env var so that appropriate x5c header is sent. If a codebase has to support both SNI and MSI auth it follows it must have different code paths for each. This makes the auth logic convoluted and can lead to code obscurity.

Describe the solution you'd like Add support for AZURE_CLIENT_SEND_CERTIFICATE_CHAIN when using DefaultAzureCredential() so that it can pick up said env var and send the appropriate x5c header.

Additional context Other azure SDKs already have support for that (golang and .NET). It makes sense to make this behaviour uniform acroos all SDKs.

maurolscla avatar May 02 '24 20:05 maurolscla

Other azure SDKs already have support for that (golang and .NET). It makes sense to make this behaviour uniform acroos all SDKs.

Thanks for reporting this issue, @maurolscla. @scottaddie @christothes @g2vinay can you please follow up?

joshfree avatar May 06 '24 16:05 joshfree

@KarishmaGhiya this tracking issue likely needs to be duplicated for other language repos

joshfree avatar May 06 '24 18:05 joshfree