Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.36k stars 2k forks source link

[BUG] Spring Cloud Azure keyvault secrets does not use configured connect-timeouts #43222

Open mrclmh opened 8 hours ago

mrclmh commented 8 hours ago

Describe the bug When using spring.cloud.azure.keyvault.secret a connect-timeout can be confgured in three variants:

  1. spring.cloud.azure.client.http.connect-timeout (configuration-properties-global)
  2. spring.cloud.azure.keyvault.client.connect-timeout (configuration-properties-azure-key-vault)
  3. spring.cloud.azure.keyvault.secret.client.connect-timeout (configuration-properties-azure-key-vault-secrets)

When using a configuration which triggers an io.netty.channel.ConnectTimeoutException the timeout for this is only correctly set when using variant 3. When using variant 1 or 2, the timeout stays at the default 10 seconds.

Exception or Stack Trace log_global.txt

To Reproduce

  1. Configure usage of Azure keyvault secrets
  2. Configure the connect-timeout with variant 1 or 2 (see above).
  3. Introduce an error in the config (like URI to nonexistent key vault).

Expected behavior The configured timeout should be used when it is configured globally (variant 1) or for Azure keyvault (variant 2).

Setup (please complete the following information):

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

Additional context https://github.com/Azure/azure-sdk-for-java/issues/31051 seems to be similar

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

github-actions[bot] commented 8 hours ago

@moarychan @netyyyy @rujche @saragluna

github-actions[bot] commented 8 hours ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.