Add certificate status gating for PVA TLS connections#3786
Add certificate status gating for PVA TLS connections#3786george-mcintyre wants to merge 6 commits intoControlSystemStudio:masterfrom
Conversation
|
|
I would defer this because it is a significant change with no immediate need. This Java implementation aims to be compatible with the C++ (PVXS) implementation. This includes the PVXS security additions which as of now have not been released. Java servers and clients can use the same certificates as PVXS servers and clients. |



Overview
After a TLS handshake, if the peer certificate contains a certificate status PV name (stored in the custom OID
1.3.6.1.4.1.37427.1), the connection now waits for that PV to reportVALIDbefore allowing data operations. This implements the PVA TLS certificate status protocol, matching PVXS behaviour.Behaviour
VALIDwithin timeoutEPICS_PVA_CERT_STATUS_TMO(default 30 s)REVOKEDorEXPIREDClient side
ClientTCPHandlerstarts aCertificateStatusMonitorafter a successful TLS handshake.CompletableFuturethat resolves when the status PV responds.PVAClient(tls_disabled=true)to avoid infinite recursion (cert-status monitoring cannot itself require cert-status monitoring).Server side
ServerTCPListenerandServerTCPHandlerstart aCertificateStatusMonitorfor the client certificate after TLS handshake.CreateChannelHandlergates its reply on the client certificate status beingVALID.Configuration
EPICS_PVA_CERT_STATUS_TMO30Dependencies
This branch includes the prerequisite commits for XDG keychain discovery, keychain password file support, CA certificate extraction, and DER double-unwrap, since the certificate status monitor relies on
SecureSocketsandPVASettingshelpers introduced in those changes. Those changes are also submitted as standalone PRs:Files Changed
core/pva/src/main/java/org/epics/pva/PVASettings.javacore/pva/src/main/java/org/epics/pva/client/ClientTCPHandler.javacore/pva/src/main/java/org/epics/pva/common/CertificateStatus.javacore/pva/src/main/java/org/epics/pva/common/CertificateStatusMonitor.javacore/pva/src/main/java/org/epics/pva/common/SecureSockets.javacore/pva/src/main/java/org/epics/pva/server/CreateChannelHandler.javacore/pva/src/main/java/org/epics/pva/server/ServerTCPHandler.javacore/pva/src/main/java/org/epics/pva/server/ServerTCPListener.java