From 50d81a37e5291e3057d804bf4b9c009ffcaf6283 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Tue, 5 Nov 2024 13:12:12 -0500 Subject: [PATCH 1/8] Get certs from security plugin instead of having them locally checked in Signed-off-by: Craig Perkins --- build.gradle | 14 +++++++++++ src/test/resources/security/esnode-key.pem | 28 --------------------- src/test/resources/security/esnode.pem | 25 ------------------ src/test/resources/security/kirk-key.pem | 28 --------------------- src/test/resources/security/kirk.pem | 27 -------------------- src/test/resources/security/root-ca.pem | 28 --------------------- src/test/resources/security/sample.pem | 25 ------------------ src/test/resources/security/test-kirk.jks | Bin 3766 -> 0 bytes 8 files changed, 14 insertions(+), 161 deletions(-) delete mode 100644 src/test/resources/security/esnode-key.pem delete mode 100644 src/test/resources/security/esnode.pem delete mode 100644 src/test/resources/security/kirk-key.pem delete mode 100644 src/test/resources/security/kirk.pem delete mode 100644 src/test/resources/security/root-ca.pem delete mode 100644 src/test/resources/security/sample.pem delete mode 100644 src/test/resources/security/test-kirk.jks diff --git a/build.gradle b/build.gradle index 257c51520..88f6fce13 100644 --- a/build.gradle +++ b/build.gradle @@ -189,6 +189,20 @@ tasks.named('forbiddenApisTest').configure { ext { projectSubstitutions = [:] + + ['esnode.pem', 'esnode-key.pem', 'kirk.pem', 'kirk-key.pem', 'root-ca.pem', 'sample.pem', 'test-kirk.jks'].forEach { file -> + File local = getLayout().getBuildDirectory().file(file).get().getAsFile() + download.run { + src "https://raw.githubusercontent.com/opensearch-project/security/refs/heads/main/bwc-test/src/test/resources/security/" + file + dest local + overwrite false + } + } + + processResources { + from(getLayout().getBuildDirectory().file('sample.pem').get().getAsFile()) + from(getLayout().getBuildDirectory().file('test-kirk.jks').get().getAsFile()) + } } allprojects { diff --git a/src/test/resources/security/esnode-key.pem b/src/test/resources/security/esnode-key.pem deleted file mode 100644 index 567f85c93..000000000 --- a/src/test/resources/security/esnode-key.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIE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k4zOyZowS8WScOqiy -hnQn1vKTJQKBgElhYuAnl9a2qXcC7KOwRsJS3rcKIVxijzL4xzOyVShp5IwIPbOv -hnxBiBOH/JGmaNpFYBcBdvORE9JfA4KMQ2fx53agfzWRjoPI1/7mdUk5RFI4gRb/ -A3jZRBoopgFSe6ArCbnyQxzYzToG48/Wzwp19ZxYrtUR4UyJct6f5n27AoGBAJDh -KIpQQDOvCdtjcbfrF4aM2DPCfaGPzENJriwxy6oEPzDaX8Bu/dqI5Ykt43i/zQrX -GpyLaHvv4+oZVTiI5UIvcVO9U8hQPyiz9f7F+fu0LHZs6f7hyhYXlbe3XFxeop3f -5dTKdWgXuTTRF2L9dABkA2deS9mutRKwezWBMQk5AoGBALPtX0FrT1zIosibmlud -tu49A/0KZu4PBjrFMYTSEWGNJez3Fb2VsJwylVl6HivwbP61FhlYfyksCzQQFU71 -+x7Nmybp7PmpEBECr3deoZKQ/acNHn0iwb0It+YqV5+TquQebqgwK6WCLsMuiYKT -bg/ch9Rhxbq22yrVgWHh6epp ------END PRIVATE KEY----- diff --git a/src/test/resources/security/esnode.pem b/src/test/resources/security/esnode.pem deleted file mode 100644 index b690a603d..000000000 --- a/src/test/resources/security/esnode.pem +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEPDCCAySgAwIBAgIUaYSlET3nzsotWTrWueVPPh10yLYwDQYJKoZIhvcNAQEL -BQAwgY8xEzARBgoJkiaJk/IsZAEZFgNjb20xFzAVBgoJkiaJk/IsZAEZFgdleGFt -cGxlMRkwFwYDVQQKDBBFeGFtcGxlIENvbSBJbmMuMSEwHwYDVQQLDBhFeGFtcGxl -IENvbSBJbmMuIFJvb3QgQ0ExITAfBgNVBAMMGEV4YW1wbGUgQ29tIEluYy4gUm9v -dCBDQTAeFw0yNDAyMjAxNzAzMjVaFw0zNDAyMTcxNzAzMjVaMFcxCzAJBgNVBAYT -AmRlMQ0wCwYDVQQHDAR0ZXN0MQ0wCwYDVQQKDARub2Rl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xmsliEMyMR0VINl8emyobvfwa7oMeWMR+hg= ------END CERTIFICATE----- diff --git a/src/test/resources/security/kirk-key.pem b/src/test/resources/security/kirk-key.pem deleted file mode 100644 index fd1728cda..000000000 --- a/src/test/resources/security/kirk-key.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCVXDgEJQorgfXp -gpY0TgF55bD2xuzxN5Dc9rDfgWxrsOvOloMpd7k6FR71bKWjJi1KptSmM/cDElky -AWYKSfYWGiGxsQ+EQW+6kwCfEOHXQldn+0+JcWqP+osSPjtJfwRvRN5kRqP69MPo -7U0N2kdqenqMWjmG1chDGLRSOEGU5HIBiDxsZtOcvMaJ8b1eaW0lvS+6gFQ80AvB -GBkDDCOHHLtDXBylrZk2CQP8AzxNicIZ4B8G3CG3OHA8+nBtEtxZoIihrrkqlMt+ -b/5N8u8zB0Encew0kdrc4R/2wS//ahr6U+9Siq8T7WsUtGwKj3BJClg6OyDJRhlu -y2gFnxoPAgMBAAECggEAP5TOycDkx+megAWVoHV2fmgvgZXkBrlzQwUG/VZQi7V4 -ZGzBMBVltdqI38wc5MtbK3TCgHANnnKgor9iq02Z4wXDwytPIiti/ycV9CDRKvv0 -TnD2hllQFjN/IUh5n4thHWbRTxmdM7cfcNgX3aZGkYbLBVVhOMtn4VwyYu/Mxy8j -xClZT2xKOHkxqwmWPmdDTbAeZIbSv7RkIGfrKuQyUGUaWhrPslvYzFkYZ0umaDgQ -OAthZew5Bz3OfUGOMPLH61SVPuJZh9zN1hTWOvT65WFWfsPd2yStI+WD/5PU1Doo -1RyeHJO7s3ug8JPbtNJmaJwHe9nXBb/HXFdqb976yQKBgQDNYhpu+MYSYupaYqjs -9YFmHQNKpNZqgZ4ceRFZ6cMJoqpI5dpEMqToFH7tpor72Lturct2U9nc2WR0HeEs -/6tiptyMPTFEiMFb1opQlXF2ae7LeJllntDGN0Q6vxKnQV+7VMcXA0Y8F7tvGDy3 -qJu5lfvB1mNM2I6y/eMxjBuQhwKBgQC6K41DXMFro0UnoO879pOQYMydCErJRmjG -/tZSy3Wj4KA/QJsDSViwGfvdPuHZRaG9WtxdL6kn0w1exM9Rb0bBKl36lvi7o7xv -M+Lw9eyXMkww8/F5d7YYH77gIhGo+RITkKI3+5BxeBaUnrGvmHrpmpgRXWmINqr0 -0jsnN3u0OQKBgCf45vIgItSjQb8zonLz2SpZjTFy4XQ7I92gxnq8X0Q5z3B+o7tQ -K/4rNwTju/sGFHyXAJlX+nfcK4vZ4OBUJjP+C8CTjEotX4yTNbo3S6zjMyGQqDI5 -9aIOUY4pb+TzeUFJX7If5gR+DfGyQubvvtcg1K3GHu9u2l8FwLj87sRzAoGAflQF -RHuRiG+/AngTPnZAhc0Zq0kwLkpH2Rid6IrFZhGLy8AUL/O6aa0IGoaMDLpSWUJp -nBY2S57MSM11/MVslrEgGmYNnI4r1K25xlaqV6K6ztEJv6n69327MS4NG8L/gCU5 -3pEm38hkUi8pVYU7in7rx4TCkrq94OkzWJYurAkCgYATQCL/rJLQAlJIGulp8s6h -mQGwy8vIqMjAdHGLrCS35sVYBXG13knS52LJHvbVee39AbD5/LlWvjJGlQMzCLrw -F7oILW5kXxhb8S73GWcuMbuQMFVHFONbZAZgn+C9FW4l7XyRdkrbR1MRZ2km8YMs -/AHmo368d4PSNRMMzLHw8Q== ------END PRIVATE KEY----- diff --git a/src/test/resources/security/kirk.pem b/src/test/resources/security/kirk.pem deleted file mode 100644 index b89edfe18..000000000 --- a/src/test/resources/security/kirk.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEmDCCA4CgAwIBAgIUaYSlET3nzsotWTrWueVPPh10yLcwDQYJKoZIhvcNAQEL -BQAwgY8xEzARBgoJkiaJk/IsZAEZFgNjb20xFzAVBgoJkiaJk/IsZAEZFgdleGFt -cGxlMRkwFwYDVQQKDBBFeGFtcGxlIENvbSBJbmMuMSEwH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G -9w0BAQsFAAOCAQEACEUPPE66/Ot3vZqRGpjDjPHAdtOq+ebaglQhvYcnDw8LOZm8 -Gbh9M88CiO6UxC8ipQLTPh2yyeWArkpJzJK/Pi1eoF1XLiAa0sQ/RaJfQWPm9dvl -1ZQeK5vfD4147b3iBobwEV+CR04SKow0YeEEzAJvzr8YdKI6jqr+2GjjVqzxvRBy -KRVHWCFiR7bZhHGLq3br8hSu0hwjb3oGa1ZI8dui6ujyZt6nm6BoEkau3G/6+zq9 -E6vX3+8Fj4HKCAL6i0SwfGmEpTNp5WUhqibK/fMhhmMT4Mx6MxkT+OFnIjdUU0S/ -e3kgnG8qjficUr38CyEli1U0M7koIXUZI7r+LQ== ------END CERTIFICATE----- diff --git a/src/test/resources/security/root-ca.pem b/src/test/resources/security/root-ca.pem deleted file mode 100644 index 854323e6f..000000000 --- a/src/test/resources/security/root-ca.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIExjCCA66gAwIBAgIUDWQJmWZ9xBTsQUeOt9F5YSPpqOIwDQYJKoZIhvcNAQEL -BQAwgY8xEzARBgoJkiaJk/IsZAEZFgNjb20xFzAVBgoJkiaJk/IsZAEZFgdleGFt -cGxlMRkwFwYDVQQKDBBFeGFtcGxlIENvbSBJbmMuMSEwHwYDVQQLDBhFeGFtcGxl -IENvbSBJbmMuIFJvb3QgQ0ExITAfBgNVBAMMGEV4YW1wbGUgQ29tIEluYy4gUm9v -dCBDQTAeFw0yNDAyMjAxNzAwMzZaFw0zNDAyMTcxNzAwMzZaMIGPMRMwEQYKCZIm -iZPyLGQBGRYDY29tMRcwFQYKCZImiZPyLGQBGRYHZXhhbXBsZTEZMBcGA1UECgwQ -RXhhbXBsZSBDb20gSW5jLjEhMB8GA1UECwwYRXhhbXBsZSBDb20gSW5jLiBSb290 -IENBMSEwHwYDVQQDDBhFeGFtcGxlIENvbSBJbmMuIFJvb3QgQ0EwggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEK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tYv6YfMewtjg0TtAnFyQov -rdXmeq1dy9HLo3Ds4AFz3Gx9076TxcRS/iI= ------END CERTIFICATE----- diff --git a/src/test/resources/security/sample.pem b/src/test/resources/security/sample.pem deleted file mode 100644 index b690a603d..000000000 --- a/src/test/resources/security/sample.pem +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEPDCCAySgAwIBAgIUaYSlET3nzsotWTrWueVPPh10yLYwDQYJKoZIhvcNAQEL -BQAwgY8xEzARBgoJkiaJk/IsZAEZFgNjb20xFzAVBgoJkiaJk/IsZAEZFgdleGFt -cGxlMRkwFwYDVQQKDBBFeGFtcGxlIENvbSBJbmMuMSEwHwYDVQQLDBhFeGFtcGxl -IENvbSBJbmMuIFJvb3QgQ0ExITAfBgNVBAMMGEV4YW1wbGUgQ29tIEluYy4gUm9v -dCBDQTAeFw0yNDAyMjAxNzAzMjVaFw0zNDAyMTcxNzAzMjVaMFcxCzAJBgNVBAYT -AmRlMQ0wCwYDVQQHDAR0ZXN0MQ0wCwYDVQQKDARub2RlMQ0wCwYDVQQLDARub2Rl -MRswGQYDVQQDDBJub2RlLTAuZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUA -A4IBDwAwggEKAoIBAQCm93kXteDQHMAvbUPNPW5pyRHKDD42XGWSgq0k1D29C/Ud -yL21HLzTJa49ZU2ldIkSKs9JqbkHdyK0o8MO6L8dotLoYbxDWbJFW8bp1w6tDTU0 -HGkn47XVu3EwbfrTENg3jFu+Oem6a/501SzITzJWtS0cn2dIFOBimTVpT/4Zv5qr -XA6Cp4biOmoTYWhi/qQl8d0IaADiqoZ1MvZbZ6x76qTrRAbg+UWkpTEXoH1xTc8n -dibR7+HP6OTqCKvo1NhE8uP4pY+fWd6b6l+KLo3IKpfTbAIJXIO+M67FLtWKtttD -ao94B069skzKk6FPgW/OZh6PRCD0oxOavV+ld2SjAgMBAAGjgcYwgcMwRwYDVR0R -BEAwPogFKgMEBQWCEm5vZGUtMC5leGFtcGxlLmNvbYIJbG9jYWxob3N0hxAAAAAA -AAAAAAAAAAAAAAABhwR/AAABMAsGA1UdDwQEAwIF4DAdBgNVHSUEFjAUBggrBgEF -BQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQU0/qDQaY10jIo -wCjLUpz/HfQXyt8wHwYDVR0jBBgwFoAUF4ffoFrrZhKn1dD4uhJFPLcrAJwwDQYJ -KoZIhvcNAQELBQADggEBAGbij5WyF0dKhQodQfTiFDb73ygU6IyeJkFSnxF67gDz -pQJZKFvXuVBa3cGP5e7Qp3TK50N+blXGH0xXeIV9lXeYUk4hVfBlp9LclZGX8tGi -7Xa2enMvIt5q/Yg3Hh755ZxnDYxCoGkNOXUmnMusKstE0YzvZ5Gv6fcRKFBUgZLh -hUBqIEAYly1EqH/y45APiRt3Nor1yF6zEI4TnL0yNrHw6LyQkUNCHIGMJLfnJQ9L -camMGIXOx60kXNMTigF9oXXwixWAnDM9y3QT8QXA7hej/4zkbO+vIeV/7lGUdkyg -PAi92EvyxmsliEMyMR0VINl8emyobvfwa7oMeWMR+hg= ------END CERTIFICATE----- diff --git a/src/test/resources/security/test-kirk.jks b/src/test/resources/security/test-kirk.jks deleted file mode 100644 index 6c8c5ef77e20980f8c78295b159256b805da6a28..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3766 zcmd^=c{r47AIImJ%`(PV###wuU&o%k$xbMgr4m`Pk2Tv-j4?=zEwY?!X|aVw)I`=A zPAY52Rt6yODkPjhAQ%WsfbL*f;mp!-018Nf*#Q6sf)b!}Nv;s_8gzOC@mTmi+D9F}jyYkhL=#Xk3eYM2csmxKA&W!xAdE{tZ2mEGS z;L%QU`DHcrbdbw$3GsKUvmfQu0Z^?sH7B)!W)eLbG*fXB^G$&6CbCnj4~ z*J>Rkut6vL1EvT!JqAq#X=O~#!JHQ#QVSPuOGlnLrXXB~{{FsGRq?o?I;>^GFEhMB zw;z!v1sXap8nq3z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K9gk<_y!v za(Rbclc{1;TFBtT`lr|YO0}|UXzh>FLsx6RQUq8=?V4{NR#=oxL2}kHb-ZAfuN Date: Tue, 5 Nov 2024 13:33:04 -0500 Subject: [PATCH 2/8] Add download plugin Signed-off-by: Craig Perkins --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 88f6fce13..2d4124a04 100644 --- a/build.gradle +++ b/build.gradle @@ -85,6 +85,7 @@ buildscript { } plugins { + id "de.undercouch.download" version "5.3.0" id "com.netflix.nebula.ospackage" version "11.5.0" id "com.dorongold.task-tree" version "2.1.1" } From 56c4789f0e8afd4c8448d24219f30733d50eae9d Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Tue, 5 Nov 2024 13:45:39 -0500 Subject: [PATCH 3/8] Change to processTestResources Signed-off-by: Craig Perkins --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2d4124a04..5ef2c8dfb 100644 --- a/build.gradle +++ b/build.gradle @@ -200,7 +200,7 @@ ext { } } - processResources { + processTestResources { from(getLayout().getBuildDirectory().file('sample.pem').get().getAsFile()) from(getLayout().getBuildDirectory().file('test-kirk.jks').get().getAsFile()) } From 1eba4a695f212022ab2a0acc95772be43ba50514 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Tue, 5 Nov 2024 16:14:18 -0500 Subject: [PATCH 4/8] process all test resources Signed-off-by: Craig Perkins --- build.gradle | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 5ef2c8dfb..59dfe21af 100644 --- a/build.gradle +++ b/build.gradle @@ -198,11 +198,9 @@ ext { dest local overwrite false } - } - - processTestResources { - from(getLayout().getBuildDirectory().file('sample.pem').get().getAsFile()) - from(getLayout().getBuildDirectory().file('test-kirk.jks').get().getAsFile()) + processTestResources { + from(getLayout().getBuildDirectory().file(file).get().getAsFile()) + } } } From 6d5cbf7219b784527d477d1ce3731ff589ecbdd7 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Wed, 6 Nov 2024 09:59:17 -0500 Subject: [PATCH 5/8] Remove security from path Signed-off-by: Craig Perkins --- build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 59dfe21af..e0bf89228 100644 --- a/build.gradle +++ b/build.gradle @@ -355,11 +355,11 @@ afterEvaluate { plugins.add(firstPlugin) if (securityEnabled) { - node.extraConfigFile("kirk.pem", file("src/test/resources/security/kirk.pem")) - node.extraConfigFile("kirk-key.pem", file("src/test/resources/security/kirk-key.pem")) - node.extraConfigFile("esnode.pem", file("src/test/resources/security/esnode.pem")) - node.extraConfigFile("esnode-key.pem", file("src/test/resources/security/esnode-key.pem")) - node.extraConfigFile("root-ca.pem", file("src/test/resources/security/root-ca.pem")) + node.extraConfigFile("kirk.pem", file("src/test/resources/kirk.pem")) + node.extraConfigFile("kirk-key.pem", file("src/test/resources/kirk-key.pem")) + node.extraConfigFile("esnode.pem", file("src/test/resources/esnode.pem")) + node.extraConfigFile("esnode-key.pem", file("src/test/resources/esnode-key.pem")) + node.extraConfigFile("root-ca.pem", file("src/test/resources/root-ca.pem")) node.setting("plugins.security.ssl.transport.pemcert_filepath", "esnode.pem") node.setting("plugins.security.ssl.transport.pemkey_filepath", "esnode-key.pem") node.setting("plugins.security.ssl.transport.pemtrustedcas_filepath", "root-ca.pem") From 1586f63628db7110282cc2ee63ba7c115971ff10 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Thu, 7 Nov 2024 10:57:48 -0500 Subject: [PATCH 6/8] remove path Signed-off-by: Craig Perkins --- build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index e0bf89228..609f61b25 100644 --- a/build.gradle +++ b/build.gradle @@ -355,11 +355,11 @@ afterEvaluate { plugins.add(firstPlugin) if (securityEnabled) { - node.extraConfigFile("kirk.pem", file("src/test/resources/kirk.pem")) - node.extraConfigFile("kirk-key.pem", file("src/test/resources/kirk-key.pem")) - node.extraConfigFile("esnode.pem", file("src/test/resources/esnode.pem")) - node.extraConfigFile("esnode-key.pem", file("src/test/resources/esnode-key.pem")) - node.extraConfigFile("root-ca.pem", file("src/test/resources/root-ca.pem")) + node.extraConfigFile("kirk.pem", file("kirk.pem")) + node.extraConfigFile("kirk-key.pem", file("kirk-key.pem")) + node.extraConfigFile("esnode.pem", file("esnode.pem")) + node.extraConfigFile("esnode-key.pem", file("esnode-key.pem")) + node.extraConfigFile("root-ca.pem", file("root-ca.pem")) node.setting("plugins.security.ssl.transport.pemcert_filepath", "esnode.pem") node.setting("plugins.security.ssl.transport.pemkey_filepath", "esnode-key.pem") node.setting("plugins.security.ssl.transport.pemtrustedcas_filepath", "root-ca.pem") From 3925229859ce55e439cedc5765c8338676ef195d Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Thu, 7 Nov 2024 11:26:39 -0500 Subject: [PATCH 7/8] Use processResources Signed-off-by: Craig Perkins --- build.gradle | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 609f61b25..d4215a703 100644 --- a/build.gradle +++ b/build.gradle @@ -198,8 +198,8 @@ ext { dest local overwrite false } - processTestResources { - from(getLayout().getBuildDirectory().file(file).get().getAsFile()) + processResources { + from(local) } } } @@ -355,11 +355,11 @@ afterEvaluate { plugins.add(firstPlugin) if (securityEnabled) { - node.extraConfigFile("kirk.pem", file("kirk.pem")) - node.extraConfigFile("kirk-key.pem", file("kirk-key.pem")) - node.extraConfigFile("esnode.pem", file("esnode.pem")) - node.extraConfigFile("esnode-key.pem", file("esnode-key.pem")) - node.extraConfigFile("root-ca.pem", file("root-ca.pem")) + node.extraConfigFile("kirk.pem", file("build/resources/main/kirk.pem")) + node.extraConfigFile("kirk-key.pem", file("build/resources/main/kirk-key.pem")) + node.extraConfigFile("esnode.pem", file("build/resources/main/esnode.pem")) + node.extraConfigFile("esnode-key.pem", file("build/resources/main/esnode-key.pem")) + node.extraConfigFile("root-ca.pem", file("build/resources/main/root-ca.pem")) node.setting("plugins.security.ssl.transport.pemcert_filepath", "esnode.pem") node.setting("plugins.security.ssl.transport.pemkey_filepath", "esnode-key.pem") node.setting("plugins.security.ssl.transport.pemtrustedcas_filepath", "root-ca.pem") From 4c128b451734493ed2540a502378a0eb09f667a9 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Thu, 7 Nov 2024 11:48:47 -0500 Subject: [PATCH 8/8] Remove parent folder Signed-off-by: Craig Perkins --- .../kotlin/org/opensearch/indexmanagement/ODFERestTestCase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/kotlin/org/opensearch/indexmanagement/ODFERestTestCase.kt b/src/test/kotlin/org/opensearch/indexmanagement/ODFERestTestCase.kt index 480e0950c..129a98f86 100644 --- a/src/test/kotlin/org/opensearch/indexmanagement/ODFERestTestCase.kt +++ b/src/test/kotlin/org/opensearch/indexmanagement/ODFERestTestCase.kt @@ -55,7 +55,7 @@ abstract class ODFERestTestCase : OpenSearchRestTestCase() { return when (keystore != null) { true -> { // create adminDN (super-admin) client - val uri = javaClass.classLoader.getResource("security/sample.pem")?.toURI() + val uri = javaClass.classLoader.getResource("sample.pem")?.toURI() val configPath = PathUtils.get(uri).parent.toAbsolutePath() SecureRestClientBuilder(settings, configPath, hosts).setSocketTimeout(60000) .setConnectionRequestTimeout(180000).build()