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
{{ message }}
Repository navigation
Support plain text decryption for XML file extension #2767
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
Activity