aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ncomp-sirius-manager-base/.gitignore1
-rw-r--r--ncomp-sirius-manager-camunda/pom.xml5
-rw-r--r--ncomp-sirius-manager-console/pom.xml5
-rw-r--r--ncomp-sirius-manager-drools/pom.xml2
-rw-r--r--ncomp-sirius-manager-generator/pom.xml5
-rw-r--r--ncomp-sirius-manager-server/pom.xml5
-rw-r--r--ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiModelUtils.java4
-rw-r--r--ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/JavaHttpClient.java28
-rw-r--r--ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServer.java17
9 files changed, 47 insertions, 25 deletions
diff --git a/ncomp-sirius-manager-base/.gitignore b/ncomp-sirius-manager-base/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/ncomp-sirius-manager-base/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/ncomp-sirius-manager-camunda/pom.xml b/ncomp-sirius-manager-camunda/pom.xml
index 639b180..9433bcc 100644
--- a/ncomp-sirius-manager-camunda/pom.xml
+++ b/ncomp-sirius-manager-camunda/pom.xml
@@ -9,6 +9,10 @@
+
+
+
+
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.7</maven.compiler.target>
@@ -28,7 +32,6 @@
-
<build>
<plugins>
diff --git a/ncomp-sirius-manager-console/pom.xml b/ncomp-sirius-manager-console/pom.xml
index 820d593..6c3a01a 100644
--- a/ncomp-sirius-manager-console/pom.xml
+++ b/ncomp-sirius-manager-console/pom.xml
@@ -10,6 +10,10 @@
+
+
+
+
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.7</maven.compiler.target>
@@ -29,7 +33,6 @@
-
<build>
<sourceDirectory>src/main/groovy</sourceDirectory>
diff --git a/ncomp-sirius-manager-drools/pom.xml b/ncomp-sirius-manager-drools/pom.xml
index 9870de8..21325dd 100644
--- a/ncomp-sirius-manager-drools/pom.xml
+++ b/ncomp-sirius-manager-drools/pom.xml
@@ -9,7 +9,6 @@
-
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.7</maven.compiler.target>
@@ -29,7 +28,6 @@
-
<build>
<plugins>
diff --git a/ncomp-sirius-manager-generator/pom.xml b/ncomp-sirius-manager-generator/pom.xml
index 0af6982..d05b0d1 100644
--- a/ncomp-sirius-manager-generator/pom.xml
+++ b/ncomp-sirius-manager-generator/pom.xml
@@ -10,6 +10,10 @@
+
+
+
+
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.7</maven.compiler.target>
@@ -29,7 +33,6 @@
-
<build>
<sourceDirectory>src/main/groovy</sourceDirectory>
diff --git a/ncomp-sirius-manager-server/pom.xml b/ncomp-sirius-manager-server/pom.xml
index 74c9d73..75d6c70 100644
--- a/ncomp-sirius-manager-server/pom.xml
+++ b/ncomp-sirius-manager-server/pom.xml
@@ -10,6 +10,10 @@
+
+
+
+
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.7</maven.compiler.target>
@@ -30,7 +34,6 @@
-
<build>
<plugins>
<plugin>
diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiModelUtils.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiModelUtils.java
index f94c946..a36205c 100644
--- a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiModelUtils.java
+++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiModelUtils.java
@@ -514,12 +514,12 @@ public class GuiModelUtils {
for (EObject row : s.findAll(path)) {
if (ii.isRecursive()) {
for (EObject r : ManagementServer.object2containedObjects(row)) {
- if (FunctionUtils.evaluate(r, ii.getFilter()).toLowerCase().equals("true"))
+ if (FunctionUtils.evaluate(r, ii.getFilter()).equalsIgnoreCase("true"))
tableAddRow(s,r,table,t);
}
}
else {
- if (FunctionUtils.evaluate(row, ii.getFilter()).toLowerCase().equals("true"))
+ if (FunctionUtils.evaluate(row, ii.getFilter()).equalsIgnoreCase("true"))
tableAddRow(s,row,table,t);
}
}
diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/JavaHttpClient.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/JavaHttpClient.java
index 59dfeb3..b97053c 100644
--- a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/JavaHttpClient.java
+++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/JavaHttpClient.java
@@ -35,6 +35,7 @@ import org.openecomp.ncomp.sirius.manager.logging.ManagementServerOperationEnum;
import org.openecomp.ncomp.sirius.manager.logging.NcompLogger;
import org.openecomp.ncomp.utils.CryptoUtils;
import org.openecomp.ncomp.utils.PropertyUtil;
+import org.openecomp.ncomp.utils.SecurityUtils;
import org.openecomp.ncomp.webservice.utils.FileUtils;
public class JavaHttpClient extends AbstractClient {
@@ -49,7 +50,7 @@ public class JavaHttpClient extends AbstractClient {
props = PropertyUtil.getPropertiesFromClasspath(fileName);
setBaseAddress(props.getProperty(endpoint + ".endpoint"));
if (getBaseAddress() == null) {
- logger.error("unable to determine baseAddress for endpoint: " + endpoint + " in " + fileName);
+ logger.error("unable to determine baseAddress for endpoint: " + p(endpoint) + " in " + p(fileName));
throw new RuntimeException("unable to determine baseAddress for endpoint: " + endpoint + " in "
+ fileName);
}
@@ -66,6 +67,10 @@ public class JavaHttpClient extends AbstractClient {
}
}
+ private String p(String v) {
+ return SecurityUtils.logForcingProtection(v);
+ }
+
public static String decryptPassword(String s) {
if (s == null) return s;
if (s.startsWith("rsa:")) {
@@ -75,16 +80,17 @@ public class JavaHttpClient extends AbstractClient {
}
public static String decryptEmbeddedPassword(String s) {
- if (s == null) return s;
- int i1 = s.indexOf("rsa:::");
- int i2 = s.indexOf("rsa:::rsa:");
- int i3 = s.indexOf(":::rsa");
- int i4 = i1 + 6;
- if (i2 < i1) {
- i1 = i2;
- i4 = i1 + 10;
- }
- if (i1 == -1) return s;
+ if (s == null) return s;
+ int i1 = s.indexOf("rsa:::");
+ int i2 = s.indexOf("rsa:::rsa:");
+ int i4 = i1 + 6;
+ if (i2 != -1 && i2 == i1) {
+ i1 = i2;
+ i4 = i1 + 10;
+ }
+ if (i1 == -1) return s;
+ int i3 = s.indexOf(":::rsa",i4);
+
String pw = CryptoUtils.decryptPrivate(CryptoUtils.getKey("config/server.private"), s.substring(i4,i3));
if (s.startsWith("rsa:")) {
diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServer.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServer.java
index a2aa2d9..98421d3 100644
--- a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServer.java
+++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServer.java
@@ -91,6 +91,7 @@ import org.openecomp.ncomp.sirius.manager.server.ServerFactory;
import org.openecomp.ncomp.sirius.manager.server.ServerPackage;
import org.openecomp.ncomp.sirius.manager.server.VersionConfiguration;
import org.openecomp.ncomp.utils.PropertyUtil;
+import org.openecomp.ncomp.utils.SecurityUtils;
import org.openecomp.ncomp.utils.SortUtil;
import org.openecomp.ncomp.webservice.utils.FileUtils;
import org.openecomp.ncomp.webservice.utils.JsonUtils;
@@ -192,7 +193,7 @@ public class ManagementServer implements IRequestHandler, ISiriusServer, ISwagge
r.put("path", resourcePath);
r.put("req", json);
r.put("context", context);
- logger2.info(r.toString());
+ logger2.info(p(r.toString()));
}
if (!pe.permit(userName, action, resourcePath)) {
handleJsonReportResult(reqId, start, null, "NOT_PERMITTED", logger2, clientVersion);
@@ -294,6 +295,10 @@ public class ManagementServer implements IRequestHandler, ISiriusServer, ISwagge
return res;
}
+ private String p(Object s) {
+ return SecurityUtils.logForcingProtection(s);
+ }
+
private void transformResult(Subject subject, String action, Object res) {
String a = (subject != null && subject.o != null) ? ( subject.o.eClass().getInstanceClassName() + "@" + action ) : action;
// System.out.println("KKKKKKK:" + subject + " " + action + " " + a);
@@ -543,8 +548,8 @@ public class ManagementServer implements IRequestHandler, ISiriusServer, ISwagge
}
EClass c = (EClass) f.getEPackage().getEClassifier(cName);
if (c == null) {
- logger.error("unable to create class: " + cName + " using factory " + f.getEPackage().getName() + " "
- + json.toString(2));
+ logger.error("unable to create class: " + p(cName) + " using factory " + f.getEPackage().getName() + " "
+ + p(json.toString(2)));
throw new RuntimeException("Unable to create class " + cName + " using factory "
+ f.getEPackage().getName());
}
@@ -713,7 +718,7 @@ public class ManagementServer implements IRequestHandler, ISiriusServer, ISwagge
}
if (k.equals("$nosave"))
continue;
- logger.warn("JSON value not used: " + k + " " + f.getEPackage().getName() + "." + cName + " " + json.get(k));
+ logger.warn("JSON value not used: " + p(k) + " " + f.getEPackage().getName() + "." + p(cName) + " " + p(json.get(k)));
}
return o;
}
@@ -1778,7 +1783,7 @@ public class ManagementServer implements IRequestHandler, ISiriusServer, ISwagge
continue;
}
if (!json.has(p.getName())) {
- logger.warn("Operation " + PropertyUtil.replaceForLogForcingProtection(action) + " has missing parameter:" + p.getName());
+ logger.warn("Operation " + p(action) + " has missing parameter:" + p.getName());
}
Object oo = null;
if (p.isMany()) {
@@ -2246,7 +2251,7 @@ public class ManagementServer implements IRequestHandler, ISiriusServer, ISwagge
}
Subject s = find(root1, path);
if (s == null || s.ref != null) {
- logger.warn("Unable to determine reference for:" + PropertyUtil.replaceForLogForcingProtection(path));
+ logger.warn("Unable to determine reference for:" + p(path));
continue;
}
if (x.ref.isMany()) {