aboutsummaryrefslogtreecommitdiffstats
path: root/datarouter-prov/src
diff options
context:
space:
mode:
Diffstat (limited to 'datarouter-prov/src')
-rw-r--r--datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java4
-rw-r--r--datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/Main.java2
-rw-r--r--datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedAuthorization.java6
-rw-r--r--datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedLinks.java6
-rw-r--r--datarouter-prov/src/main/resources/docker-compose/prov_data/provserver.properties4
-rw-r--r--datarouter-prov/src/main/resources/provserver.properties4
-rw-r--r--datarouter-prov/src/test/java/datarouter/provisioning/IntegrationTestInternalMisc.java2
-rwxr-xr-xdatarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscribeServletTest.java1
8 files changed, 21 insertions, 8 deletions
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java
index 6ed5d8b6..412e1322 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java
@@ -273,7 +273,7 @@ public class BaseServlet extends HttpServlet implements ProvDataProvider {
try {
thishost = InetAddress.getLocalHost();
loopback = InetAddress.getLoopbackAddress();
- checkHttpsRelaxation(); //Data Router Subscriber HTTPS Relaxation feature USERSTORYID:US674047.
+ //checkHttpsRelaxation(); //Data Router Subscriber HTTPS Relaxation feature USERSTORYID:US674047.
} catch (UnknownHostException e) {
// ignore
}
@@ -575,7 +575,7 @@ public class BaseServlet extends HttpServlet implements ProvDataProvider {
private void checkHttpsRelaxation() {
if (!mailSendFlag) {
Properties p = (new DB()).getProperties();
- intlogger.info("HTTPS relaxatio: " + p.get("org.onap.dmaap.datarouter.provserver.https.relaxation"));
+ intlogger.info("HTTPS relaxation: " + p.get("org.onap.dmaap.datarouter.provserver.https.relaxation"));
if (p.get("org.onap.dmaap.datarouter.provserver.https.relaxation").equals("true")) {
try {
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/Main.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/Main.java
index 3afce990..87979be6 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/Main.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/Main.java
@@ -127,7 +127,6 @@ public class Main {
httpConfiguration.setSecurePort(httpsPort);
httpConfiguration.setOutputBufferSize(32768);
httpConfiguration.setRequestHeaderSize(2048);
- httpConfiguration.setIdleTimeout(300000);
httpConfiguration.setSendServerVersion(true);
httpConfiguration.setSendDateHeader(false);
@@ -146,6 +145,7 @@ public class Main {
new HttpConnectionFactory(httpConfiguration))) {
httpServerConnector.setPort(httpPort);
httpServerConnector.setAcceptQueueSize(2);
+ httpServerConnector.setIdleTimeout(300000);
// HTTPS configuration
HttpConfiguration httpsConfiguration = new HttpConfiguration(httpConfiguration);
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedAuthorization.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedAuthorization.java
index 16512d9f..a7213e09 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedAuthorization.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedAuthorization.java
@@ -25,6 +25,7 @@
package org.onap.dmaap.datarouter.provisioning.beans;
import java.util.HashSet;
+import java.util.Objects;
import java.util.Set;
import org.json.JSONArray;
@@ -101,4 +102,9 @@ public class FeedAuthorization implements JSONable {
return false;
return true;
}
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(classification, endpoint_ids, endpoint_addrs);
+ }
}
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedLinks.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedLinks.java
index 261e2741..77726bb4 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedLinks.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/FeedLinks.java
@@ -25,6 +25,7 @@
package org.onap.dmaap.datarouter.provisioning.beans;
import java.io.InvalidObjectException;
+import java.util.Objects;
import org.json.JSONObject;
@@ -109,4 +110,9 @@ public class FeedLinks implements JSONable {
return false;
return true;
}
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(self, publish, subscribe, log);
+ }
}
diff --git a/datarouter-prov/src/main/resources/docker-compose/prov_data/provserver.properties b/datarouter-prov/src/main/resources/docker-compose/prov_data/provserver.properties
index 10bb5eba..7758a64d 100644
--- a/datarouter-prov/src/main/resources/docker-compose/prov_data/provserver.properties
+++ b/datarouter-prov/src/main/resources/docker-compose/prov_data/provserver.properties
@@ -24,7 +24,7 @@
#Jetty Server properties
org.onap.dmaap.datarouter.provserver.http.port = 8080
org.onap.dmaap.datarouter.provserver.https.port = 8443
-org.onap.dmaap.datarouter.provserver.https.relaxation = false
+org.onap.dmaap.datarouter.provserver.https.relaxation = true
org.onap.dmaap.datarouter.provserver.keystore.type = jks
org.onap.dmaap.datarouter.provserver.keymanager.password = changeit
@@ -40,7 +40,7 @@ org.onap.dmaap.datarouter.provserver.logretention = 30
#DMAAP-597 (Tech Dept) REST request source IP auth
# relaxation to accommodate OOM kubernetes deploy
-org.onap.dmaap.datarouter.provserver.isaddressauthenabled = true
+org.onap.dmaap.datarouter.provserver.isaddressauthenabled = false
# Database access
org.onap.dmaap.datarouter.db.driver = org.mariadb.jdbc.Driver
diff --git a/datarouter-prov/src/main/resources/provserver.properties b/datarouter-prov/src/main/resources/provserver.properties
index 10bb5eba..7758a64d 100644
--- a/datarouter-prov/src/main/resources/provserver.properties
+++ b/datarouter-prov/src/main/resources/provserver.properties
@@ -24,7 +24,7 @@
#Jetty Server properties
org.onap.dmaap.datarouter.provserver.http.port = 8080
org.onap.dmaap.datarouter.provserver.https.port = 8443
-org.onap.dmaap.datarouter.provserver.https.relaxation = false
+org.onap.dmaap.datarouter.provserver.https.relaxation = true
org.onap.dmaap.datarouter.provserver.keystore.type = jks
org.onap.dmaap.datarouter.provserver.keymanager.password = changeit
@@ -40,7 +40,7 @@ org.onap.dmaap.datarouter.provserver.logretention = 30
#DMAAP-597 (Tech Dept) REST request source IP auth
# relaxation to accommodate OOM kubernetes deploy
-org.onap.dmaap.datarouter.provserver.isaddressauthenabled = true
+org.onap.dmaap.datarouter.provserver.isaddressauthenabled = false
# Database access
org.onap.dmaap.datarouter.db.driver = org.mariadb.jdbc.Driver
diff --git a/datarouter-prov/src/test/java/datarouter/provisioning/IntegrationTestInternalMisc.java b/datarouter-prov/src/test/java/datarouter/provisioning/IntegrationTestInternalMisc.java
index fd00ea51..bc724079 100644
--- a/datarouter-prov/src/test/java/datarouter/provisioning/IntegrationTestInternalMisc.java
+++ b/datarouter-prov/src/test/java/datarouter/provisioning/IntegrationTestInternalMisc.java
@@ -69,7 +69,7 @@ public class IntegrationTestInternalMisc extends IntegrationTestBase {
@Test
public void testInternalHalt() {
- String url = props.getProperty("test.host") + "/internal/halt";
+ String url = props.getProperty("test.host") + "/halt";
HttpGet httpPost = new HttpGet(url);
try {
httpPost.addHeader(FeedServlet.BEHALF_HEADER, "JUnit");
diff --git a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscribeServletTest.java b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscribeServletTest.java
index 9009b976..cdf96ba6 100755
--- a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscribeServletTest.java
+++ b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscribeServletTest.java
@@ -201,6 +201,7 @@ public class SubscribeServletTest extends DrServletTestBase {
public void Given_Request_Is_HTTP_POST_And_POST_Fails_Bad_Request_Response_Is_Generated() throws Exception {
PowerMockito.mockStatic(Subscription.class);
PowerMockito.when(Subscription.getSubscriptionMatching(mock(Subscription.class))).thenReturn(null);
+ PowerMockito.when(Subscription.countActiveSubscriptions()).thenReturn(0);
JSONObject JSObject = buildRequestJsonObject();
SubscribeServlet subscribeServlet = new SubscribeServlet() {
protected JSONObject getJSONfromInput(HttpServletRequest req) {