Skip to content

spring framework upgrade to 6.2.7 breaks integration with spring cloud gcp secret manager due to converter issue #35032

Closed as not planned
@zasied

Description

@zasied

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

IA_Server.log

I attached a log with full stack for your reference.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: duplicateA duplicate of another issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions