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
XML is still widely used for configuration in Java/JVM ecosystems. The company I work for uses it to define part of the configurations of such an application.
Currently, teams working with XML config files that contain secrets must either convert to a supported format before encrypting with SOPS, or fall back to BINARY mode which loses the structured diff and selective encryption benefits.
Proposal
Add an xml store alongside the existing json, yaml, ini, and dotenv stores. The implementation would:
Map XML elements to SOPS tree branches, attributes to @-prefixed keys, and text content to #text keys
Support repeated same-name elements as arrays
Preserve XML comments
Store sops metadata as a <sops> child element of the root (consistent with how other structured formats handle it)
Reject mixed content (interleaved text and child elements) with a clear error, as this pattern is more common in document markup (HTML, DocBook) rather than in configuration files
Use Go's standard encoding/xml for parsing/emission (no new dependencies)
I have a working implementation based on the existing store architecture (modeled after the INI store for metadata flattening and the JSON store for hierarchical tree construction). Happy to open a PR if there's interest.
Any plans to support this feature? I alsohve a dozen of XML configuration that needs to be partially encrypted: Only specific elements in the document tree should be encrypted.
Right now, there are no plans. I guess contributing this is possible, but I'm currently working on a bigger refactoring of the stores, if anyone wants to implement XML support I'd wait until that's done.
@felixfontein I'll wait on sending my PR then - not asking for any precise number, but as a ballpark estimate, shall the stores/ renovation be done in a quarter, two or EOY?
I'm interested in contributing XML support after the stores refactoring.
I also wanted to mention that I’d be happy to help with the refactoring effort as well, if that would be useful.
A few questions from my side:
Will the refactoring change the Store interface significantly?
Should I wait for a specific PR/branch, or will it be announced here?
Are there any design decisions I should keep in mind for XML support, such as namespaces, CDATA, or other edge cases? @blacksd, would you like to collaborate once the refactoring is done?
Activity
annis-souames commentedon Mar 12, 2026
Any plans to support this feature? I alsohve a dozen of XML configuration that needs to be partially encrypted: Only specific elements in the document tree should be encrypted.
felixfontein commentedon Mar 12, 2026
Right now, there are no plans. I guess contributing this is possible, but I'm currently working on a bigger refactoring of the stores, if anyone wants to implement XML support I'd wait until that's done.
blacksd commentedon Mar 15, 2026
@felixfontein I'll wait on sending my PR then - not asking for any precise number, but as a ballpark estimate, shall the
stores/renovation be done in a quarter, two or EOY?felixfontein commentedon Mar 15, 2026
@blacksd I would hope for less than a quarter, but it depends a lot on how much time I and the reviewers have, so no promises :)
kushal9897 commentedon Apr 11, 2026
Hi @felixfontein and @blacksd,
I'm interested in contributing XML support after the stores refactoring.
I also wanted to mention that I’d be happy to help with the refactoring effort as well, if that would be useful.
A few questions from my side:
Will the refactoring change the Store interface significantly?
Should I wait for a specific PR/branch, or will it be announced here?
Are there any design decisions I should keep in mind for XML support, such as namespaces, CDATA, or other edge cases?
@blacksd, would you like to collaborate once the refactoring is done?
Thanks!
angyaljanos commentedon Sep 18, 2026
Hey Guys!
I recently faced this issue. After investigation.
I would share my changes please review and comment it.
PR
Thanks,
Janos