summaryrefslogtreecommitdiffstats
path: root/datarouter-node
diff options
context:
space:
mode:
Diffstat (limited to 'datarouter-node')
-rw-r--r--datarouter-node/aaf_certs/org.onap.dmaap-dr.jksbin3647 -> 3666 bytes
-rw-r--r--datarouter-node/aaf_certs/org.onap.dmaap-dr.keyfile54
-rw-r--r--datarouter-node/aaf_certs/org.onap.dmaap-dr.trust.jksbin1413 -> 1413 bytes
-rw-r--r--datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java20
-rw-r--r--datarouter-node/src/main/resources/drNodeCadi.properties6
-rw-r--r--datarouter-node/src/main/resources/node.properties6
-rw-r--r--datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeUtilsTest.java2
-rw-r--r--datarouter-node/src/test/resources/node_test.properties6
-rw-r--r--datarouter-node/src/test/resources/org.onap.dmaap-dr-test-cert.jksbin3647 -> 0 bytes
-rw-r--r--datarouter-node/src/test/resources/org.onap.dmaap-dr.jksbin0 -> 3666 bytes
10 files changed, 49 insertions, 45 deletions
diff --git a/datarouter-node/aaf_certs/org.onap.dmaap-dr.jks b/datarouter-node/aaf_certs/org.onap.dmaap-dr.jks
index 2320dc9f..bcbbe999 100644
--- a/datarouter-node/aaf_certs/org.onap.dmaap-dr.jks
+++ b/datarouter-node/aaf_certs/org.onap.dmaap-dr.jks
Binary files differ
diff --git a/datarouter-node/aaf_certs/org.onap.dmaap-dr.keyfile b/datarouter-node/aaf_certs/org.onap.dmaap-dr.keyfile
index 0d187ccf..fc9bdf31 100644
--- a/datarouter-node/aaf_certs/org.onap.dmaap-dr.keyfile
+++ b/datarouter-node/aaf_certs/org.onap.dmaap-dr.keyfile
@@ -1,27 +1,27 @@
-6-tNRI8kimOFIXwcTbENGrkJzim1NFAcA4iRrbWVSteGmgX0-RzgwYEy4wnNju7jlOUfRVKqJSYL
-0qcHP1Z9AbX_K5zqJ2CATFO_0tlvNbocvoh6IecTlvL6V00hlVzP1JjCedUN0cO13TSnc4_NpWWj
-nVZ9E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etNX-sQtz7IvX2scJ6yL3Wzm1FvYGOb7cL8b
+qTPQ5bbovMMxGXYl6zKyZuQV0xGk6c3loX_7CLB8o89mtO50Vs0bPbps07dt9OIMcuPBxPPnSc01
+7lMa0kf_kiW0sCjRCJK9685ZJWK1YVdXuHAbiWtkpmNK81Ks0G1-H25wCgBSJUlqq1-8F1aazs3s
+lcOzAj1qXLfpbp0QZ916pzUU6P2USt7oF1vrUuNEslCk5oMymYMLX-miz0MNG3gUboCMAXKvBJPF
+FIg29T9v_tPsvoyGy_Tsqhg0CXq7BVvh-AQ-UFxbmZw78EWLwC7y0cUlaVjKo7Ubog3cKmS7K7O6
+OJs6ZdJGjOHcqZNxtoi08ZiP8y21pOyROhcgYtWi4zOA1ZgYKKNBO8xa2DSXSH0p-zxlS1uuEBLj
+G1Y1CxHYmuTXIE45ZEse7waa8SOA8rbUkeFFAvNy1_xYFYLfNjiF5t_sEOMVkSeushDmK39X3nGN
+YJr-_SkLAq7NdRKxGQhQqjy9QkdbLLm8go_8wcpH4kQEAhKF99mciEAnKht8a_paF1gVGxMetK4_
+3zJZ6roaflVDLrCs8BqbS5_4l3WxR02mVjT2seQjDoxIYeF8Lfg0IVoThCPryRphc0jMidXzx-40
+QhryIOMNx569-5BSFAQz2xdNtuqKI_PnGN-S23YRfDM-3vcpjhOyfShKK3nk68PNEzIgjrYBWqrj
+x8cLP7_BxbIq27iQXzavpB2bRMYETZ8ZTucEYWLAGZLX3roaxz8xLiHFf_TO6lEhCE7_ISs4 \ No newline at end of file
diff --git a/datarouter-node/aaf_certs/org.onap.dmaap-dr.trust.jks b/datarouter-node/aaf_certs/org.onap.dmaap-dr.trust.jks
index 808c1b92..0e384957 100644
--- a/datarouter-node/aaf_certs/org.onap.dmaap-dr.trust.jks
+++ b/datarouter-node/aaf_certs/org.onap.dmaap-dr.trust.jks
Binary files differ
diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java
index d4fc7dbe..37e5db60 100644
--- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java
+++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeUtils.java
@@ -47,6 +47,9 @@ import java.util.Enumeration;
import java.util.TimeZone;
import java.util.UUID;
import java.util.zip.GZIPInputStream;
+import javax.naming.InvalidNameException;
+import javax.naming.ldap.LdapName;
+import javax.naming.ldap.Rdn;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.codec.binary.Base64;
@@ -315,15 +318,16 @@ public class NodeUtils {
X509Certificate cert = (X509Certificate) ks.getCertificate(alias);
if (cert != null) {
String subject = cert.getSubjectX500Principal().getName();
- String[] parts = subject.split(",");
- if (parts.length < 1) {
- return null;
+ try {
+ LdapName ln = new LdapName(subject);
+ for (Rdn rdn : ln.getRdns()) {
+ if (rdn.getType().equalsIgnoreCase("CN")) {
+ return rdn.getValue().toString();
+ }
+ }
+ } catch (InvalidNameException e) {
+ eelfLogger.error("No valid CN not found for dr-node cert", e);
}
- subject = parts[5].trim();
- if (!subject.startsWith("CN=")) {
- return null;
- }
- return subject.substring(3);
}
}
return null;
diff --git a/datarouter-node/src/main/resources/drNodeCadi.properties b/datarouter-node/src/main/resources/drNodeCadi.properties
index 8dfcab1c..b94f6cfa 100644
--- a/datarouter-node/src/main/resources/drNodeCadi.properties
+++ b/datarouter-node/src/main/resources/drNodeCadi.properties
@@ -1,11 +1,11 @@
cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_9, OU=OSAAF, O=ONAP, C=US
cadi_keyfile=/opt/app/datartr/aaf_certs/org.onap.dmaap-dr.keyfile
cadi_keystore=/opt/app/datartr/aaf_certs/org.onap.dmaap-dr.jks
-cadi_keystore_password=]3V)($O&.Mv]W{f8^]6SxGNL
-cadi_key_password=]3V)($O&.Mv]W{f8^]6SxGNL
+cadi_keystore_password=[V7pj(U*?Jzpsl0aZP?3hS;?
+cadi_key_password=[V7pj(U*?Jzpsl0aZP?3hS;?
cadi_alias=dmaap-dr-node@dmaap-dr.onap.org
cadi_truststore=/opt/app/datartr/aaf_certs/org.onap.dmaap-dr.trust.jks
-cadi_truststore_password=(Rd,&{]%ePdp}4JZjqoJ2G+g
+cadi_truststore_password=jH+{FIhNOX+tl:I7:dnJT($3
aaf_env=DEV
aaf_locate_url=https://aaf-onap-test.osaaf.org:8095
diff --git a/datarouter-node/src/main/resources/node.properties b/datarouter-node/src/main/resources/node.properties
index 7c076359..5a669eca 100644
--- a/datarouter-node/src/main/resources/node.properties
+++ b/datarouter-node/src/main/resources/node.properties
@@ -63,10 +63,10 @@ KeyStoreType = jks
KeyStoreFile = /opt/app/datartr/aaf_certs/org.onap.dmaap-dr.jks
#
# The password for the https keystore
-KeyStorePassword=WGxd2P6MDo*Bi4+UdzWs{?$8
+KeyStorePassword=[V7pj(U*?Jzpsl0aZP?3hS;?
#
# The password for the private key in the https keystore
-KeyPassword=WGxd2P6MDo*Bi4+UdzWs{?$8
+KeyPassword=[V7pj(U*?Jzpsl0aZP?3hS;?
#
# The type of truststore for https
TrustStoreType = jks
@@ -75,7 +75,7 @@ TrustStoreType = jks
TrustStoreFile = /opt/app/datartr/aaf_certs/org.onap.dmaap-dr.trust.jks
#
# The password for the https truststore
-TrustStorePassword=)OBvCd{e{aWq.^mJJdX:S:1&
+TrustStorePassword=jH+{FIhNOX+tl:I7:dnJT($3
#
# The path to the file used to trigger an orderly shutdown
QuiesceFile = etc/SHUTDOWN
diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeUtilsTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeUtilsTest.java
index 2d87b8b9..2b64c013 100644
--- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeUtilsTest.java
+++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeUtilsTest.java
@@ -79,7 +79,7 @@ public class NodeUtilsTest {
@Test
public void Given_Get_CanonicalName_Called_Valid_CN_Returned() {
- String canonicalName = NodeUtils.getCanonicalName("jks", "src/test/resources/org.onap.dmaap-dr-test-cert.jks", "WGxd2P6MDo*Bi4+UdzWs{?$8");
+ String canonicalName = NodeUtils.getCanonicalName("jks", "src/test/resources/org.onap.dmaap-dr.jks", "[V7pj(U*?Jzpsl0aZP?3hS;?");
Assert.assertEquals("dmaap-dr-node", canonicalName);
}
}
diff --git a/datarouter-node/src/test/resources/node_test.properties b/datarouter-node/src/test/resources/node_test.properties
index 9e0cd994..a4f1cbd2 100644
--- a/datarouter-node/src/test/resources/node_test.properties
+++ b/datarouter-node/src/test/resources/node_test.properties
@@ -63,10 +63,10 @@ KeyStoreType = jks
KeyStoreFile = aaf_certs/org.onap.dmaap-dr.jks
#
# The password for the https keystore
-KeyStorePassword=WGxd2P6MDo*Bi4+UdzWs{?$8
+KeyStorePassword=[V7pj(U*?Jzpsl0aZP?3hS;?
#
# The password for the private key in the https keystore
-KeyPassword=WGxd2P6MDo*Bi4+UdzWs{?$8
+KeyPassword=[V7pj(U*?Jzpsl0aZP?3hS;?
#
# The type of truststore for https
TrustStoreType = jks
@@ -75,7 +75,7 @@ TrustStoreType = jks
TrustStoreFile = aaf_certs/org.onap.dmaap-dr.trust.jks
#
# The password for the https truststore
-TrustStorePassword=)OBvCd{e{aWq.^mJJdX:S:1&
+TrustStorePassword=jH+{FIhNOX+tl:I7:dnJT($3
#
# The path to the file used to trigger an orderly shutdown
QuiesceFile = etc/SHUTDOWN
diff --git a/datarouter-node/src/test/resources/org.onap.dmaap-dr-test-cert.jks b/datarouter-node/src/test/resources/org.onap.dmaap-dr-test-cert.jks
deleted file mode 100644
index 2320dc9f..00000000
--- a/datarouter-node/src/test/resources/org.onap.dmaap-dr-test-cert.jks
+++ /dev/null
Binary files differ
diff --git a/datarouter-node/src/test/resources/org.onap.dmaap-dr.jks b/datarouter-node/src/test/resources/org.onap.dmaap-dr.jks
new file mode 100644
index 00000000..bcbbe999
--- /dev/null
+++ b/datarouter-node/src/test/resources/org.onap.dmaap-dr.jks
Binary files differ