You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I need to serve decrypted XML files as plain text, but only YAML, JSON, and properties file extensions are currently supported.
Describe the solution you'd like
Implement a ResourceEncryptor for the xml file extension.
https://github.com/FasterXML/jackson-dataformat-xml provides an XML extension of JsonFactory, which fits in nicely with AbstractCipherResourceEncryptor#decryptWithJacksonParser and hence could make this a straightforward implementation.
Describe alternatives you've considered
I implemented such a ResourceEncryptor, albeit not using jackson-dataformat-xml, and plugged it in using the following configuration:
Not only is this a carbon copy of org.springframework.cloud.config.server.config.ResourceEncryptorConfiguration, but AbstractCipherResourceEncryptor is package-private so I can't reuse the CIPHER_MARKER constant or decryptValue method in my implementation; the latter is especially important because EnvironmentPrefixHelper is also package-private.
This would be a more workable solution if:
There were an easier way to plug in custom ResourceEncryptor implementations, e.g. by simply defining ResourceEncryptor beans
AbstractCipherResourceEncryptor were open for extension
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I need to serve decrypted XML files as plain text, but only YAML, JSON, and properties file extensions are currently supported.
Describe the solution you'd like
Implement a
ResourceEncryptor
for thexml
file extension.https://github.com/FasterXML/jackson-dataformat-xml provides an XML extension of
JsonFactory
, which fits in nicely withAbstractCipherResourceEncryptor#decryptWithJacksonParser
and hence could make this a straightforward implementation.Describe alternatives you've considered
I implemented such a
ResourceEncryptor
, albeit not usingjackson-dataformat-xml
, and plugged it in using the following configuration:Not only is this a carbon copy of
org.springframework.cloud.config.server.config.ResourceEncryptorConfiguration
, butAbstractCipherResourceEncryptor
is package-private so I can't reuse theCIPHER_MARKER
constant ordecryptValue
method in my implementation; the latter is especially important becauseEnvironmentPrefixHelper
is also package-private.This would be a more workable solution if:
ResourceEncryptor
implementations, e.g. by simply definingResourceEncryptor
beansAbstractCipherResourceEncryptor
were open for extensionAdditional context
N/A
The text was updated successfully, but these errors were encountered: