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.34k stars 1.98k forks source link

[QUESTION] Keyvault secrets not updating on Azure spring apps #36164

Closed gnandyala123 closed 1 month ago

gnandyala123 commented 1 year ago

Describe the bug Not seeing the recent key secrets updated on runtime env after the refresh on key vault side , we need to manually do restart to get this changes In Azure spring Apps environment.

To Reproduce -- We have tried to load it in the runtime but using spring.cloud.azure.keyvault.secret.property-sources[].refresh-interval but the secrets are not refreshing until and manual restart is done.

https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/secret-management#setting-refresh-interval

-- We tried this and printed for every 30 secs but still the refreshed secret from keyvault is not updating in runtime environment Code Snippet Add the code snippet that causes the issue.

image

Expected behavior Token to be updated on runtime

Screenshots If applicable, add screenshots to help explain your problem.

Netyyyy commented 1 year ago

Hi @gnandyala123 , thanks for reaching out. We have received your submission and will take it into consideration. We appreciate your input and will review this matter as soon as possible. Please feel free to provide any additional information or context that you think may be helpful. We'll keep you updated on the progress of our review. Thank you for your contribution to improving our project.

moarychan commented 1 year ago

Related issue https://github.com/Azure/azure-sdk-for-java/issues/26356

moarychan commented 1 month ago

Hi @gnandyala123 , I cannot reproduce this issue via ASA-E app + KV + Managed Identity, I used the version spring-cloud-azure-starter-keyvault:5.14.0; if you only use one key vault property source, then it should work fine.

There's linked PR to support multiple key vault property source, the new version can show more logs for each property source loading.

github-actions[bot] commented 1 month ago

Hi @gnandyala123. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

moarychan commented 1 month ago

Hi @gnandyala123 , you can try to use the new version 5.16.0. I am going to close this issue, please reopen this issue or create a new one if you still encounter related issues.