diff --git a/durabletask-client/src/test/java/io/dapr/durabletask/DurableTaskGrpcClientTlsTest.java b/durabletask-client/src/test/java/io/dapr/durabletask/DurableTaskGrpcClientTlsTest.java index b60b26be74..2f1b70c625 100644 --- a/durabletask-client/src/test/java/io/dapr/durabletask/DurableTaskGrpcClientTlsTest.java +++ b/durabletask-client/src/test/java/io/dapr/durabletask/DurableTaskGrpcClientTlsTest.java @@ -1,342 +1,121 @@ -///* -// * Copyright 2025 The Dapr Authors -// * Licensed under the Apache License, Version 2.0 (the "License"); -// * you may not use this file except in compliance with the License. -// * You may obtain a copy of the License at -// * http://www.apache.org/licenses/LICENSE-2.0 -// * Unless required by applicable law or agreed to in writing, software -// * distributed under the License is distributed on an "AS IS" BASIS, -// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// * See the License for the specific language governing permissions and -//limitations under the License. -//*/ -//package io.dapr.durabletask; -// -//import org.junit.jupiter.api.AfterEach; -//import org.junit.jupiter.api.Test; -//import org.junit.jupiter.api.io.TempDir; -//import org.junit.jupiter.api.condition.EnabledOnOs; -//import org.junit.jupiter.api.condition.OS; -//import org.junit.jupiter.api.Assumptions; -// -//import java.io.File; -//import java.nio.file.Files; -//import java.nio.file.Path; -//import java.security.KeyPair; -//import java.security.KeyPairGenerator; -//import java.security.cert.X509Certificate; -//import java.util.Base64; -//import java.util.Date; -//import java.math.BigInteger; -// -//import org.bouncycastle.asn1.x500.X500Name; -//import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo; -//import org.bouncycastle.cert.X509v3CertificateBuilder; -//import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; -//import org.bouncycastle.operator.ContentSigner; -//import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; -// -//import static org.junit.jupiter.api.Assertions.*; -// -//public class DurableTaskGrpcClientTlsTest { -// private static final int DEFAULT_PORT = 4001; -// private static final String DEFAULT_SIDECAR_IP = "127.0.0.1"; -// -// @TempDir -// Path tempDir; -// -// // Track the client for cleanup -// private DurableTaskGrpcClient client; -// -// @AfterEach -// void tearDown() throws Exception { -// if (client != null) { -// client.close(); -// client = null; -// } -// } -// -// // Helper method to generate a key pair for testing -// private static KeyPair generateKeyPair() throws Exception { -// KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); -// keyPairGenerator.initialize(2048); -// return keyPairGenerator.generateKeyPair(); -// } -// -// // Helper method to generate a self-signed certificate -// private static X509Certificate generateCertificate(KeyPair keyPair) throws Exception { -// X500Name issuer = new X500Name("CN=Test Certificate"); -// X500Name subject = new X500Name("CN=Test Certificate"); -// Date notBefore = new Date(System.currentTimeMillis() - 24 * 60 * 60 * 1000); -// Date notAfter = new Date(System.currentTimeMillis() + 365 * 24 * 60 * 60 * 1000L); -// SubjectPublicKeyInfo publicKeyInfo = SubjectPublicKeyInfo.getInstance(keyPair.getPublic().getEncoded()); -// X509v3CertificateBuilder certBuilder = new X509v3CertificateBuilder( -// issuer, -// BigInteger.valueOf(System.currentTimeMillis()), -// notBefore, -// notAfter, -// subject, -// publicKeyInfo -// ); -// ContentSigner signer = new JcaContentSignerBuilder("SHA256withRSA").build(keyPair.getPrivate()); -// return new JcaX509CertificateConverter().getCertificate(certBuilder.build(signer)); -// } -// -// private static void writeCertificateToFile(X509Certificate cert, File file) throws Exception { -// String certPem = "-----BEGIN CERTIFICATE-----\n" + -// Base64.getEncoder().encodeToString(cert.getEncoded()) + -// "\n-----END CERTIFICATE-----"; -// Files.write(file.toPath(), certPem.getBytes()); -// } -// -// private static void writePrivateKeyToFile(KeyPair keyPair, File file) throws Exception { -// String keyPem = "-----BEGIN PRIVATE KEY-----\n" + -// Base64.getEncoder().encodeToString(keyPair.getPrivate().getEncoded()) + -// "\n-----END PRIVATE KEY-----"; -// Files.write(file.toPath(), keyPem.getBytes()); -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithTls() throws Exception { -// // Generate test certificate and key -// KeyPair keyPair = generateKeyPair(); -// X509Certificate cert = generateCertificate(keyPair); -// -// File certFile = File.createTempFile("test-cert", ".pem"); -// File keyFile = File.createTempFile("test-key", ".pem"); -// try { -// writeCertificateToFile(cert, certFile); -// writePrivateKeyToFile(keyPair, keyFile); -// -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .tlsCertPath(certFile.getAbsolutePath()) -// .tlsKeyPath(keyFile.getAbsolutePath()) -// .build(); -// -// assertNotNull(client); -// // Note: We can't easily test the actual TLS configuration without a real server -// } finally { -// certFile.delete(); -// keyFile.delete(); -// } -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithTlsAndEndpoint() throws Exception { -// // Generate test certificate and key -// KeyPair keyPair = generateKeyPair(); -// X509Certificate cert = generateCertificate(keyPair); -// -// File certFile = File.createTempFile("test-cert", ".pem"); -// File keyFile = File.createTempFile("test-key", ".pem"); -// try { -// writeCertificateToFile(cert, certFile); -// writePrivateKeyToFile(keyPair, keyFile); -// -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .tlsCertPath(certFile.getAbsolutePath()) -// .tlsKeyPath(keyFile.getAbsolutePath()) -// .port(443) -// .build(); -// -// assertNotNull(client); -// } finally { -// certFile.delete(); -// keyFile.delete(); -// } -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithInvalidTlsCert() { -// assertThrows(RuntimeException.class, () -> { -// new DurableTaskGrpcClientBuilder() -// .tlsCertPath("/nonexistent/cert.pem") -// .tlsKeyPath("/nonexistent/key.pem") -// .build(); -// }); -// } -// -// @Test -// @EnabledOnOs({OS.LINUX, OS.MAC}) -// public void testBuildGrpcManagedChannelWithTlsAndUnixSocket() throws Exception { -// // Skip this test since Unix socket support is not implemented yet -// Assumptions.assumeTrue(false, "Unix socket support not implemented yet"); -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithTlsAndDnsAuthority() throws Exception { -// // Generate test certificate and key -// KeyPair keyPair = generateKeyPair(); -// X509Certificate cert = generateCertificate(keyPair); -// -// File certFile = File.createTempFile("test-cert", ".pem"); -// File keyFile = File.createTempFile("test-key", ".pem"); -// try { -// writeCertificateToFile(cert, certFile); -// writePrivateKeyToFile(keyPair, keyFile); -// -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .tlsCertPath(certFile.getAbsolutePath()) -// .tlsKeyPath(keyFile.getAbsolutePath()) -// .port(443) -// .build(); -// -// assertNotNull(client); -// } finally { -// certFile.delete(); -// keyFile.delete(); -// } -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithTlsAndCaCert() throws Exception { -// // Generate test CA certificate -// KeyPair caKeyPair = generateKeyPair(); -// X509Certificate caCert = generateCertificate(caKeyPair); -// -// File caCertFile = File.createTempFile("test-ca-cert", ".pem"); -// try { -// writeCertificateToFile(caCert, caCertFile); -// -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .tlsCaPath(caCertFile.getAbsolutePath()) -// .build(); -// -// assertNotNull(client); -// } finally { -// caCertFile.delete(); -// } -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithTlsAndCaCertAndEndpoint() throws Exception { -// // Generate test CA certificate -// KeyPair caKeyPair = generateKeyPair(); -// X509Certificate caCert = generateCertificate(caKeyPair); -// -// File caCertFile = File.createTempFile("test-ca-cert", ".pem"); -// try { -// writeCertificateToFile(caCert, caCertFile); -// -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .tlsCaPath(caCertFile.getAbsolutePath()) -// .port(443) -// .build(); -// -// assertNotNull(client); -// } finally { -// caCertFile.delete(); -// } -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithInvalidCaCert() { -// assertThrows(RuntimeException.class, () -> { -// new DurableTaskGrpcClientBuilder() -// .tlsCaPath("/nonexistent/ca.pem") -// .build(); -// }); -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithMtlsAndCaCert() throws Exception { -// // Generate test certificates -// KeyPair caKeyPair = generateKeyPair(); -// X509Certificate caCert = generateCertificate(caKeyPair); -// KeyPair clientKeyPair = generateKeyPair(); -// X509Certificate clientCert = generateCertificate(clientKeyPair); -// -// File caCertFile = File.createTempFile("test-ca-cert", ".pem"); -// File clientCertFile = File.createTempFile("test-client-cert", ".pem"); -// File clientKeyFile = File.createTempFile("test-client-key", ".pem"); -// try { -// writeCertificateToFile(caCert, caCertFile); -// writeCertificateToFile(clientCert, clientCertFile); -// writePrivateKeyToFile(clientKeyPair, clientKeyFile); -// -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .tlsCaPath(caCertFile.getAbsolutePath()) -// .tlsCertPath(clientCertFile.getAbsolutePath()) -// .tlsKeyPath(clientKeyFile.getAbsolutePath()) -// .build(); -// -// assertNotNull(client); -// } finally { -// caCertFile.delete(); -// clientCertFile.delete(); -// clientKeyFile.delete(); -// } -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithInsecureTls() throws Exception { -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .insecure(true) -// .port(443) -// .build(); -// -// assertNotNull(client); -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithInsecureTlsAndMtls() throws Exception { -// // Generate test certificates -// KeyPair caKeyPair = generateKeyPair(); -// X509Certificate caCert = generateCertificate(caKeyPair); -// KeyPair clientKeyPair = generateKeyPair(); -// X509Certificate clientCert = generateCertificate(clientKeyPair); -// -// File caCertFile = File.createTempFile("test-ca-cert", ".pem"); -// File clientCertFile = File.createTempFile("test-client-cert", ".pem"); -// File clientKeyFile = File.createTempFile("test-client-key", ".pem"); -// try { -// writeCertificateToFile(caCert, caCertFile); -// writeCertificateToFile(clientCert, clientCertFile); -// writePrivateKeyToFile(clientKeyPair, clientKeyFile); -// -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .insecure(true) -// .tlsCaPath(caCertFile.getAbsolutePath()) -// .tlsCertPath(clientCertFile.getAbsolutePath()) -// .tlsKeyPath(clientKeyFile.getAbsolutePath()) -// .port(443) -// .build(); -// -// assertNotNull(client); -// } finally { -// caCertFile.delete(); -// clientCertFile.delete(); -// clientKeyFile.delete(); -// } -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithInsecureTlsAndCustomEndpoint() throws Exception { -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .insecure(true) -// .port(443) -// .build(); -// -// assertNotNull(client); -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithPlaintext() throws Exception { -// // No TLS config provided, should use plaintext -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .port(443) -// .build(); -// -// assertNotNull(client); -// } -// -// @Test -// public void testBuildGrpcManagedChannelWithPlaintextAndCustomEndpoint() throws Exception { -// // No TLS config provided, should use plaintext -// client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() -// .port(50001) // Custom port -// .build(); -// -// assertNotNull(client); -// } -//} \ No newline at end of file +/* + * Copyright 2025 The Dapr Authors + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.dapr.durabletask; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; + +import java.io.File; + +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class DurableTaskGrpcClientTlsTest { + private DurableTaskGrpcClient client; + + @AfterEach + void tearDown() { + if (client != null) { + client.close(); + client = null; + } + } + + private File getTestCertificate() { + return new File(getClass().getResource("/certs/test-cert.pem").getFile()); + } + + private File getTestKey() { + return new File(getClass().getResource("/certs/test-cert.key").getFile()); + } + + private File getTestCaCertificate() { + return new File(getClass().getResource("/certs/test-ca-cert.pem").getFile()); + } + + @Test + void testBuildGrpcClientWithTls() { + File certFile = getTestCertificate(); + File keyFile = getTestKey(); + + assertDoesNotThrow(() -> { + client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() + .tlsCertPath(certFile.getAbsolutePath()) + .tlsKeyPath(keyFile.getAbsolutePath()) + .build(); + }); + } + + @Test + void testBuildGrpcClientWithTlsAndCaCert() { + File caCertFile = getTestCaCertificate(); + + assertDoesNotThrow(() -> { + client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() + .tlsCaPath(caCertFile.getAbsolutePath()) + .build(); + }); + } + + @Test + void testBuildGrpcClientWithMtlsAndCaCert() { + File caCertFile = getTestCaCertificate(); + File certFile = getTestCertificate(); + File keyFile = getTestKey(); + + assertDoesNotThrow(() -> { + client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() + .tlsCaPath(caCertFile.getAbsolutePath()) + .tlsCertPath(certFile.getAbsolutePath()) + .tlsKeyPath(keyFile.getAbsolutePath()) + .build(); + }); + } + + @Test + void testBuildGrpcClientWithInvalidTlsCertificate() { + assertThrows(RuntimeException.class, () -> + new DurableTaskGrpcClientBuilder() + .tlsCertPath("/nonexistent/cert.pem") + .tlsKeyPath("/nonexistent/key.pem") + .build()); + } + + @Test + void testBuildGrpcClientWithInvalidCaCertificate() { + assertThrows(RuntimeException.class, () -> + new DurableTaskGrpcClientBuilder() + .tlsCaPath("/nonexistent/ca.pem") + .build()); + } + + @Test + void testBuildGrpcClientWithInsecureTls() { + assertDoesNotThrow(() -> { + client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() + .insecure(true) + .build(); + }); + } + + @Test + void testBuildGrpcClientWithPlaintext() { + assertDoesNotThrow(() -> { + client = (DurableTaskGrpcClient) new DurableTaskGrpcClientBuilder() + .build(); + }); + } +} \ No newline at end of file diff --git a/durabletask-client/src/test/resources/certs/test-ca-cert.pem b/durabletask-client/src/test/resources/certs/test-ca-cert.pem new file mode 100644 index 0000000000..087998d230 --- /dev/null +++ b/durabletask-client/src/test/resources/certs/test-ca-cert.pem @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE-----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jxb0LK0SWaKjOlRle +bmowDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAh/5qDtYaiTWN +3cX0H/ucdsT1fzVCiWmniRBrvGgLOJ4VfBpcGAeyt3nTOCGBpLIHi6M47mv6+DA8 +GVA+k4FgAbFRWgSR5zDsOOC0/jTTEMpcrz13DgpCeh/Jj0MdNe3nzkC+eAT2bp07 +ZYLrO++N+IEpDEuDz3YlqIpgKpEREoGKWXrXcCEdsAUbIjOSWBfLBTuF8x11IVi7 +V4y3UUVTg6aA8ILmtWStoBuVroOH/HY/8RuQztUejjtd3PIEzPRgITekpWEDxI1D +Ycc7ZgdxEYmzXTvRAmLkIAoSPR5U61i09SSHmCs9hoWUGQGxSsxBFloTH6IoJFls +VDeWw3Shzu1PSPP5NedGgdRC8GKjOVDAgXzYPSoTYab5mGHTbL3HtRELthCmQSaC +SrNwKjd1MmhJ6yrjxKruE9mpSHUu50IDIP+PyMokWMRf504eGvPJstvD6+I4sUS3 +/Owu0eGM3incgG/ulAWpRDCXRq49JpAoq7evbyBQyzDfrCSN0U6sgjBVlJuoEuXD +t1cNmvPxf0730HxQYrq1nYahdt5Mi9+Pv8ublylKuGeYiWqiSeSE6wRRTktL7Xmf +BotM8yvJBhpY00GAPSxXQ2Kl+OielJq9QSCOgtQkMCMzKMsfbO+YA+WvMICe+GNJ +sfrgLw0imYT1npKJbNtg/vRxTZFj9hc= +-----END CERTIFICATE----- diff --git a/durabletask-client/src/test/resources/certs/test-cert.key b/durabletask-client/src/test/resources/certs/test-cert.key new file mode 100644 index 0000000000..87b958ab6d --- /dev/null +++ b/durabletask-client/src/test/resources/certs/test-cert.key @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCX9WC+9qfCu7Lh +LTkm1XpYnIFowqlIAARHxWv08xbOIm/4bUtruuy0nOEVzzYiu8fdRP2LsBp9iKuR +JzBw6QO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oP8RwcwnT1Lpqnq9IjJohJ9bt96Q +V7EuEQW+nWuxc0NHAFE4gt5R9ooE7bN9ToCjAaXYaCgEcuyQFtk2/Y3jvDwPTxUD +6zQYY2Z4/Le+GZ4s699EdRgMy4l53TK3UaY+s/jLVh/T+7E5lXAE0OCwZxsqZiWp +4LYVBS+xM/21bcaOggVel5UPzgrclgeW4eS8x2MCggEACJSLt/Vj2Id93F/u4fBi +u7TjRwiMSoqE34qZ4/rNLJlyVP2C17uvBAW2oorV4kQT3OXGuVHuNO0KBygrSsRC +f6tpCgZ1716fVqF/j/pcESIskybqq76tqx3DKX2Z59JnNpFC1c+PzswJX3G84aIU +VEhx8ygtuI5Li1gm8/MPgr+RQwj9uXZKo+eCY5LXvq6vsi21yMNEdiH+21Rz4gcU +FGg7rr3NpwPMTV17l6RoqqFxKYywBBBRUs8FrLZx7oppi5fnPgQVWrB+KiXj3YSC +wRlMFI5dmTRivjTv9BxZIsPgFeBpE76zP0DdfM5Y3bn+gs0RfsUUsEV5D6y7FSCs +HwKCAQEAz2K9KVwA/hocmUlAkH1jnT3lBtparZa5Be/KfLgqpmRp3ujgPbH1L+vL +vPUaAHJ0VScKwe0vY+FFFo+WDdAHnVEdcrolwoQ2oFV9/7wdtk1LS8VEFFdObrff +8wx20yy00yfLTcwrG3g3K9RCCD9/JdkhFahBNX+Vn+pBmgABGiu1gESKiNA/lUar +7Ki/eU2fUwgyHKXsYRhSrcw6aatHE/yJVUgyExjcdYyy0wPkSiwB0hEfyDv/yIOm +Hdce5kkMFRNcsp2E0nP3zpt0+lhbhGVal+8gkH2q0YucqZsIaF0Ha2jpUbIsE81A +mfPgTPwyRZiGKrz43GpgD0Zg/eytPw== +-----END PRIVATE KEY----- diff --git a/durabletask-client/src/test/resources/certs/test-cert.pem b/durabletask-client/src/test/resources/certs/test-cert.pem new file mode 100644 index 0000000000..00a8155f78 --- /dev/null +++ b/durabletask-client/src/test/resources/certs/test-cert.pem @@ -0,0 +1,31 @@ +-----BEGIN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