Spring cloud gcp secret manager integration worked just fine up to the version 6.2.6 of spring framework but got broken when upgrading to 6.2.7 I have tested this with spring cloud gcp secretmanager 6.1.x and 6.2.x and these all work as long as spring framework is up to and including 6.2.6 but upgrading to 6.2.7 (which is necessary due to CVE on earlier version of spring framework) breaks that integration as secret values fetched from GCP secret manager are no longer converted properly to String. Here is the snippet from the exception:
org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [com.google.protobuf.ByteString$LiteralByteString] to type [java.lang.String]\n\tat org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:294)
With earlier spring framework versions the GCP secret manager integration can properly extract secret's value from the vault and convert it to String object. When upgrading spring framework to 6.2.7 the conversion fails to extract the String value of the secret. To work around this - I have created custom converter implementing GenericConverter with the custom method to convert that ByteString to String - but that only works for some properties, as other keep going to generic converter which cannot properly extract String value from ByteString object. Since that used to work fine - this bug is now a regression in 6.2.7 spring framework release
I attached a log with full stack for your reference.
Comment From: jhoeller
This looks like a duplicate of #34936. Please give the latest 6.2.8 snapshot a try - ideally today since we intend to release 6.2.8 tomorrow.
Comment From: sbrannen
This indeed looks like a duplicate of #34936 and more specifically #34954.
I am therefore closing this with same rationale as mentioned in https://github.com/spring-projects/spring-framework/issues/34954#issuecomment-2912836616.
If 6.2.8 snapshots do not resolve your issue, we can reopen this issue.
Cheers,
Sam
Comment From: zasied
Yes, I can confirm that 6.2.8-SNAPSHOT is working
Comment From: sbrannen
Yes, I can confirm that 6.2.8-SNAPSHOT is working
Great! 👍
Thanks for trying out the snapshot and letting us know so quickly!