X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2FBaseServlet.java;h=047043b1d89f37c43493674af9c054965b88b725;hb=ce5518a60269499bc1bc77ac7ac48d844db7359a;hp=6ed5d8b623dee489a4716be3ab1b8cecf0bb4df9;hpb=e06737d701ff5b3dcab311f4337ce40be52c966e;p=dmaap%2Fdatarouter.git 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 old mode 100644 new mode 100755 index 6ed5d8b6..047043b1 --- 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 } @@ -319,7 +319,7 @@ public class BaseServlet extends HttpServlet implements ProvDataProvider { * @return an error string, or null if all is OK */ String isAuthorizedForProvisioning(HttpServletRequest request) { - if (Boolean.parseBoolean(isAddressAuthEnabled)) { + if (!Boolean.parseBoolean(isAddressAuthEnabled)) { return null; } // Is the request https? @@ -369,7 +369,7 @@ public class BaseServlet extends HttpServlet implements ProvDataProvider { boolean isAuthorizedForInternal(HttpServletRequest request) { try { - if (Boolean.parseBoolean(isAddressAuthEnabled)) { + if (!Boolean.parseBoolean(isAddressAuthEnabled)) { return true; } InetAddress ip = InetAddress.getByName(request.getRemoteAddr()); @@ -492,9 +492,6 @@ public class BaseServlet extends HttpServlet implements ProvDataProvider { // Normalize the nodes, and fill in nodeAddresses InetAddress[] na = new InetAddress[nodes.length]; for (int i = 0; i < nodes.length; i++) { - if (nodes[i].indexOf('.') < 0) { - nodes[i] += "." + provDomain; - } try { na[i] = InetAddress.getByName(nodes[i]); intlogger.debug("PROV0003 DNS lookup: " + nodes[i] + " => " + na[i].toString()); @@ -520,9 +517,6 @@ public class BaseServlet extends HttpServlet implements ProvDataProvider { String[] pods = getPods(); na = new InetAddress[pods.length]; for (int i = 0; i < pods.length; i++) { - if (pods[i].indexOf('.') < 0) { - pods[i] += "." + provDomain; - } try { na[i] = InetAddress.getByName(pods[i]); intlogger.debug("PROV0003 DNS lookup: " + pods[i] + " => " + na[i].toString()); @@ -575,7 +569,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 {