Add Kubernetes Secret-backed certificate store support for OPC PLC#473
Merged
luiscantero merged 2 commits intomainfrom Mar 16, 2026
Merged
Add Kubernetes Secret-backed certificate store support for OPC PLC#473luiscantero merged 2 commits intomainfrom
luiscantero merged 2 commits intomainfrom
Conversation
luiscantero
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This change adds a new KubernetesSecret certificate store implementation to OPC PLC so OPC UA PKI material can be stored directly in Kubernetes Secrets instead of relying on flat-directory storage.
The OPC UA security configuration path was generalized so custom certificate store types can be registered and configured consistently. This keeps existing FlatDirectory support intact while adding support for KubernetesSecret for the application certificate, trusted peer certificates, trusted issuer certificates, trusted user certificates, user issuer certificates, and rejected certificates.
The new Secret-backed store supports certificate entries in .der and .crt formats, private keys in .pfx, .pem, and .key, and CRLs in .crl. It also handles reading and writing certificate material from a flat Secret key set, which aligns with how Kubernetes Secrets are structured.
This PR also adds the Kubernetes Secret client abstraction and store type registration needed to instantiate the new store, updates CLI and application configuration handling for the new backend, and documents the new option in the README.
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
Added KubernetesSecretCertificateStore tests covering Secret-backed certificate persistence
Added format coverage for .der, .crt, .pfx, .pem, .key, and .crl handling
Verified the new custom store type integrates with OPC UA application security configuration without regressing existing flat-directory support
What to Check
Verify that the following are valid
Other Information