microsoft / azure-spring-boot

Spring Boot Starters for Azure services
MIT License
374 stars 460 forks source link

Key Vault unzipping responses #921

Closed H2RockyRoad closed 4 years ago

H2RockyRoad commented 4 years ago

We have implemented azure keyvault secrets spring boot starter, but it has resulted in our rest responses coming back unzipped.

Environment

Summary

When we added the dependency azure keyvault, our rest template responses are now coming back as ASCII text, when they used to come back GZipped.

Reproduce steps

1) Add com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter:2.2.0 to build.gradle

Expected Results

See POST response.body is GZipped

Actual Results

See POST response.body is type ASCII

yiliuTo commented 4 years ago

Thanks for your reporing, could you describe how you use the key vault starter in your project or just add it as a dependency?

H2RockyRoad commented 4 years ago

The only thing we've done is add com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter:2.2.0 to our build.gradle file. Before we got a chance to fully implement it, we noticed existing rest responses were no longer coming back GZipped.

yiliuTo commented 4 years ago

Hi @H2RockyRoad , could you provide a sample project or code snippet about the REST request/responses settings?

moarychan commented 4 years ago

Hi @H2RockyRoad , I will focus on this issue, could you please provide more details of the code structure,? I am checking the version you mentioned. It's best if you can provide your demo project, I can reproduce your problem faster☺

moarychan commented 4 years ago

Hi @H2RockyRoad , 2.2.0 version found a problem. The spring boot 2.2.0 and azure-keyvault-secrets-starter 2.2.2 version combination work well,it is recommended that you upgrade the version of keyvault-secrets to 2.2.2 version. I added a rest api, check the Content-Encoding of response header through the Postman, it has been compressed using gzip. This is the sample I used for your reference.

moarychan commented 4 years ago

Hi @H2RockyRoad , is there any other update? If not, we will close this issue tomorrow.