aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-webseal.conf.erb1
-rw-r--r--utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java1
-rw-r--r--utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java22
3 files changed, 17 insertions, 7 deletions
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-webseal.conf.erb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-webseal.conf.erb
index e4c5d753fa..4cdd4fbfba 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-webseal.conf.erb
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/templates/default/SDC-Simulator-webseal.conf.erb
@@ -1,6 +1,7 @@
{
webseal {
fe="<%= @fe_url %>"
+ portalCookieName="EPService"
users = [
{
userId="cs0008"
diff --git a/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java b/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java
index 4c807f4912..9780c09936 100644
--- a/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java
+++ b/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/Login.java
@@ -148,6 +148,7 @@ public class Login extends HttpServlet {
response.addCookie(cookieLastName);
response.addCookie(cookieRemoteAddress);
response.addCookie(cookieWsType);
+ response.addCookie(new Cookie(Conf.getInstance().getPortalCookieName(), "portal"));
response.sendRedirect("/sdc1");
}
diff --git a/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java b/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java
index 6b5103f51c..449fe62f49 100644
--- a/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java
+++ b/utils/webseal-simulator/src/main/java/org/openecomp/sdc/webseal/simulator/conf/Conf.java
@@ -31,10 +31,19 @@ import java.util.Map;
public class Conf {
- private static Conf conf= null;
+ private static Conf conf = new Conf();
private String feHost;
- Map<String,User> users = new HashMap<String,User>();
-
+ private Map<String,User> users = new HashMap<String,User>();
+ private String portalCookieName;
+
+ private void setPortalCookieName(String portalCookieName) {
+ this.portalCookieName = portalCookieName;
+ }
+
+ public String getPortalCookieName() {
+ return portalCookieName;
+ }
+
private Conf(){
initConf();
}
@@ -50,7 +59,9 @@ public class Conf {
Config confFile = ConfigFactory.parseFileAnySyntax(new File(confPath));
Config resolve = confFile.resolve();
setFeHost(resolve.getString("webseal.fe"));
- List<? extends Config> list = resolve.getConfigList("webseal.users");
+ setPortalCookieName(resolve.getString("webseal.portalCookieName"));
+ List<? extends Config> list = resolve.getConfigList("webseal.users");
+
for (Config conf : list ){
String userId = conf.getString("userId");
String password = conf.getString("password");
@@ -67,9 +78,6 @@ public class Conf {
}
public static Conf getInstance(){
- if (conf == null){
- conf = new Conf();
- }
return conf;
}