Remove legacy certificate handling
[sdc.git] / common-app-api / src / main / java / org / openecomp / sdc / be / config / Configuration.java
index b670bbd..f945402 100644 (file)
@@ -46,7 +46,6 @@ public class Configuration extends BasicConfiguration {
      * Requests from these Urls will not be logged by org.openecomp.sdc.be.filters.BeServletFilter.<br>
      **/
     private List<String> unLoggedUrls;
-
     /**
      * backend host
      */
@@ -67,7 +66,6 @@ public class Configuration extends BasicConfiguration {
      * backend protocol. http | https
      */
     private String beProtocol = "http";
-
     private Date released;
     private String version = "1111";
     private String toscaConformanceLevel = "3.0";
@@ -86,13 +84,11 @@ public class Configuration extends BasicConfiguration {
     private Long uebHealthCheckReconnectIntervalInSeconds;
     private Long uebHealthCheckReadTimeout;
     private List<Map<String, Map<String, String>>> defaultImports;
-
     private List<String> globalCsarImports;
     private List<String> resourceTypes;
     private List<String> excludeResourceCategory;
     private List<String> excludeResourceType;
     private Map<String, Set<String>> excludedPolicyTypesMapping;
-
     private Map<String, Set<String>> excludedGroupTypesMapping;
     private Map<String, Object> deploymentResourceArtifacts;
     private Map<String, Object> deploymentResourceInstanceArtifacts;
@@ -101,55 +97,33 @@ public class Configuration extends BasicConfiguration {
     private Map<String, Object> informationalServiceArtifacts;
     private Map<String, Object> serviceApiArtifacts;
     private List<String> excludeServiceCategory;
-
     private List<String> licenseTypes;
     private List<String> definedResourceNamespace;
     private List<String> directives;
-
+    private List<CustomToscaFunction> defaultCustomToscaFunctions;
     private Integer additionalInformationMaxNumberOfKeys;
     private HeatDeploymentArtifactTimeout heatArtifactDeploymentTimeout;
-
     private BeMonitoringConfig systemMonitoring;
     private CleanComponentsConfiguration cleanComponentsConfiguration;
-
     private String artifactsIndex;
-
     private String heatEnvArtifactHeader;
     private String heatEnvArtifactFooter;
-
     private String toscaFilesDir;
     private String heatTranslatorPath;
-
     private OnboardingConfig onboarding;
-
     private BasicAuthConfig basicAuth;
-
     private CassandrConfig cassandraConfig;
-
     private SwitchoverDetectorConfig switchoverDetector;
-
     private ApplicationL1CacheConfig applicationL1Cache;
-
     private ApplicationL2CacheConfig applicationL2Cache;
-
     private ToscaValidatorsConfig toscaValidators;
-
     private boolean disableAudit;
-
-    private Boolean consumerBusinessLogic;
-
     private Map<String, VfModuleProperty> vfModuleProperties;
-
     private Map<String, String> genericAssetNodeTypes;
-    private Map<String, String> serviceNodeTypes;
+    private Map<String, CategoryBaseTypeConfig> serviceBaseNodeTypes;
     private Map<String, Map<String, String>> resourceNodeTypes;
-
     private String appVersion;
     private String artifactGeneratorConfig;
-
-    private CadiFilterParams cadiFilterParams;
-
-    private Boolean aafAuthNeeded = false;
     private String autoHealingOwner;
     private boolean enableAutoHealing;
     private Map<String, List<String>> resourcesForUpgrade;
@@ -161,14 +135,17 @@ public class Configuration extends BasicConfiguration {
     private boolean supportAllottedResourcesAndProxy;
     private Integer deleteLockTimeoutInSeconds;
     private Integer maxDeleteComponents;
-    private CookieConfig authCookie;
-    private String aafNamespace;
     private String workloadContext;
     private EnvironmentContext environmentContext;
     private List<GabConfig> gabConfig;
     private EcompPortalConfig ecompPortal;
     private List<ArtifactConfiguration> artifacts;
     private Map<String, Map<String, List<String>>> componentAllowedInstanceTypes;
+    private ExternalCsarStore externalCsarStore;
+    private CsarFormat csarFormat;
+    private String componentInstanceCounterDelimiter;
+    private String dataValidatorFilterExcludedUrls; // Comma separated list of excluded URLs by the DataValidatorFilter
+    private String permittedAncestors; // Space separated list of permitted ancestors
 
     @SuppressWarnings("unchecked")
     private <K, V> Map<K, V> safeGetCapsInsensitiveMap(Map<K, V> map) {
@@ -191,31 +168,30 @@ public class Configuration extends BasicConfiguration {
         return safeGetCapsInsensitiveMap(excludedGroupTypesMapping);
     }
 
+    public List<Map<String, Map<String, String>>> getDefaultImports() {
+        return Collections.unmodifiableList(defaultImports);
+    }
+
     @Override
     public String toString() {
-        return new StringBuilder().append(format("backend host: %s%n", beFqdn))
-            .append(format("backend http port: %s%n", beHttpPort))
+        return new StringBuilder().append(format("backend host: %s%n", beFqdn)).append(format("backend http port: %s%n", beHttpPort))
             .append(format("backend ssl port: %s%n", beSslPort)).append(format("backend context: %s%n", beContext))
-            .append(format("backend protocol: %s%n", beProtocol)).append(format("Version: %s%n", version))
-            .append(format("Released: %s%n", released)).append(format("Supported protocols: %s%n", protocols))
-            .append(format("Users: %s%n", users)).append(format("Neo4j: %s%n", neo4j))
-            .append(format("JanusGraph Cfg File: %s%n", janusGraphCfgFile))
-            .append(format("JanusGraph In memory: %s%n", janusGraphInMemoryGraph))
+            .append(format("backend protocol: %s%n", beProtocol)).append(format("Version: %s%n", version)).append(format("Released: %s%n", released))
+            .append(format("Supported protocols: %s%n", protocols)).append(format("Users: %s%n", users)).append(format("Neo4j: %s%n", neo4j))
+            .append(format("JanusGraph Cfg File: %s%n", janusGraphCfgFile)).append(format("JanusGraph In memory: %s%n", janusGraphInMemoryGraph))
             .append(format("JanusGraph lock timeout: %s%n", janusGraphLockTimeout))
             .append(format("JanusGraph reconnect interval seconds: %s%n", janusGraphReconnectIntervalInSeconds))
             .append(format("excludeResourceCategory: %s%n", excludeResourceCategory))
             .append(format("informationalResourceArtifacts: %s%n", informationalResourceArtifacts))
             .append(format("deploymentResourceArtifacts: %s%n", deploymentResourceArtifacts))
             .append(format("informationalServiceArtifacts: %s%n", informationalServiceArtifacts))
-            .append(format("Supported artifacts types: %s%n", artifacts))
-            .append(format("Supported license types: %s%n", licenseTypes))
+            .append(format("Supported artifacts types: %s%n", artifacts)).append(format("Supported license types: %s%n", licenseTypes))
             .append(format("Additional information Maximum number of preoperties: %s%n", additionalInformationMaxNumberOfKeys))
             .append(format("Heat Artifact Timeout in Minutes: %s%n", heatArtifactDeploymentTimeout))
             .append(format("URLs For HTTP Requests that will not be automatically logged : %s%n", unLoggedUrls))
             .append(format("Service Api Artifacts: %s%n", serviceApiArtifacts))
             .append(format("heat env artifact header: %s%n", heatEnvArtifactHeader))
-            .append(format("heat env artifact footer: %s%n", heatEnvArtifactFooter))
-            .append(format("onboarding: %s%n", onboarding)).toString();
+            .append(format("heat env artifact footer: %s%n", heatEnvArtifactFooter)).append(format("onboarding: %s%n", onboarding)).toString();
     }
 
     public List<String> getGlobalCsarImports() {
@@ -225,32 +201,6 @@ public class Configuration extends BasicConfiguration {
         return globalCsarImports;
     }
 
-    @Getter
-    @Setter
-    @NoArgsConstructor
-    public static class CookieConfig {
-
-        private String securityKey = "";
-        private long maxSessionTimeOut = 600 * 1000L;
-        private long sessionIdleTimeOut = 30 * 1000L;
-        private String cookieName = "AuthenticationCookie";
-        private String redirectURL = "https://www.e-access.att.com/ecomp_portal_ist/ecompportal/process_csp";
-        private List<String> excludedUrls;
-        private List<String> onboardingExcludedUrls;
-        private String domain = "";
-        private String path = "";
-        private boolean isHttpOnly = true;
-
-        public boolean isHttpOnly() {
-            return isHttpOnly;
-        }
-
-        public void setIsHttpOnly(final boolean isHttpOnly) {
-            this.isHttpOnly = isHttpOnly;
-        }
-
-    }
-
     @Getter
     @Setter
     @NoArgsConstructor
@@ -284,7 +234,6 @@ public class Configuration extends BasicConfiguration {
             private String name;
             private String replicationStrategy;
             private List<String> replicationInfo;
-
         }
     }
 
@@ -330,7 +279,6 @@ public class Configuration extends BasicConfiguration {
 
             String changePriorityUrl;
             String changePriorityBody;
-
         }
     }
 
@@ -343,7 +291,6 @@ public class Configuration extends BasicConfiguration {
         private Integer defaultMinutes;
         private Integer minMinutes;
         private Integer maxMinutes;
-
     }
 
     @Getter
@@ -358,7 +305,6 @@ public class Configuration extends BasicConfiguration {
         public Integer getProbeIntervalInSeconds(int defaultVal) {
             return probeIntervalInSeconds == null ? defaultVal : probeIntervalInSeconds;
         }
-
     }
 
     @Getter
@@ -368,7 +314,6 @@ public class Configuration extends BasicConfiguration {
 
         private List<String> acceptedTypes;
         private List<String> validForResourceTypes;
-
     }
 
     @Getter
@@ -380,10 +325,12 @@ public class Configuration extends BasicConfiguration {
         private String protocol = "http";
         private String host;
         private Integer port;
-        private String downloadCsarUri;
+        private String getLatestVspPackageUri;
+        private String getVspPackageUri;
+        private String getVspUri;
+        private String getLatestVspUri;
         @ToString.Exclude
         private String healthCheckUri;
-
     }
 
     @Getter
@@ -395,7 +342,6 @@ public class Configuration extends BasicConfiguration {
         private String userName;
         private String userPass;
         private String excludedUrls;
-
     }
 
     @Getter
@@ -412,7 +358,6 @@ public class Configuration extends BasicConfiguration {
         private String defaultFunctionalMenu;
         private Integer pollingInterval;
         private Integer timeoutMs;
-
     }
 
     @Getter
@@ -422,7 +367,6 @@ public class Configuration extends BasicConfiguration {
     public static class ApplicationL1CacheConfig {
 
         private ApplicationL1CacheInfo datatypes;
-
     }
 
     @Getter
@@ -435,7 +379,6 @@ public class Configuration extends BasicConfiguration {
         private ApplicationL1CacheCatalogInfo catalogL1Cache;
         @ToString.Exclude
         private QueueInfo queue;
-
     }
 
     @Getter
@@ -445,7 +388,6 @@ public class Configuration extends BasicConfiguration {
     public static class ToscaValidatorsConfig {
 
         private Integer stringMaxLength;
-
     }
 
     @Getter
@@ -457,7 +399,6 @@ public class Configuration extends BasicConfiguration {
         private Boolean enabled;
         private Integer firstRunDelay;
         private Integer pollIntervalInSec;
-
     }
 
     @Getter
@@ -470,7 +411,6 @@ public class Configuration extends BasicConfiguration {
         private Integer resourcesSizeInCache;
         private Integer servicesSizeInCache;
         private Integer productsSizeInCache;
-
     }
 
     @Getter
@@ -482,7 +422,6 @@ public class Configuration extends BasicConfiguration {
         private Integer waitOnShutDownInMinutes;
         private Integer syncIntervalInSecondes;
         private Integer numberOfCacheWorkers;
-
     }
 
     @Getter
@@ -492,7 +431,6 @@ public class Configuration extends BasicConfiguration {
 
         private String defaultValue;
         private List<String> validValues;
-
     }
 
     @Getter
@@ -502,7 +440,6 @@ public class Configuration extends BasicConfiguration {
 
         private String forBaseModule;
         private String forNonBaseModule;
-
     }
 
     @Getter
@@ -513,7 +450,6 @@ public class Configuration extends BasicConfiguration {
         private String friendlyName;
         private String path;
         private Boolean searchable;
-
     }
 
     @Getter
@@ -523,7 +459,54 @@ public class Configuration extends BasicConfiguration {
 
         private String artifactType;
         private List<PathsAndNamesDefinition> pathsAndNamesDefinitions;
+    }
+
+    @Getter
+    @Setter
+    @NoArgsConstructor
+    public static class ExternalCsarStore {
+
+        private String storageType;
+        private Endpoint endpoint;
+        private Credentials credentials;
+        private String tempPath;
+        private int uploadPartSize;
+
+        @Getter
+        @Setter
+        @NoArgsConstructor
+        public static class Endpoint {
+
+            private String host;
+            private int port;
+            private boolean secure;
+        }
+
+        @Getter
+        @Setter
+        @NoArgsConstructor
+        public static class Credentials {
+
+            private String accessKey;
+            private String secretKey;
+        }
+    }
+
+    @Getter
+    @Setter
+    @NoArgsConstructor
+    public static class CsarFormat {
+
+        private String defaultFormat;
+    }
+
+    @Getter
+    @Setter
+    @NoArgsConstructor
+    public static class CustomToscaFunction {
 
+        private String name;
+        private String type;
     }
 
 }