aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/dcae/ApplicationSettings.java
diff options
context:
space:
mode:
authorZlatko Murgoski <zlatko.murgoski@nokia.com>2019-03-05 11:31:48 +0100
committerZlatko Murgoski <zlatko.murgoski@nokia.com>2019-03-15 20:06:59 +0100
commit0f2c2039cd9d9b26482fc7488ae1bdf99f2544f5 (patch)
tree77bf8a43c44e5bb5ad991324f806b990f67edcee /src/main/java/org/onap/dcae/ApplicationSettings.java
parent4b8692b6fed457a9d194557abe681832fad4f576 (diff)
Collector authentication enhancement
Collector authentication enhancement Change-Id: I03a05cb83dd8c498fb218e82e9b3958348fbb4ac Issue-ID: DCAEGEN2-1101 Signed-off-by: Zlatko Murgoski <zlatko.murgoski@nokia.com>
Diffstat (limited to 'src/main/java/org/onap/dcae/ApplicationSettings.java')
-rw-r--r--src/main/java/org/onap/dcae/ApplicationSettings.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main/java/org/onap/dcae/ApplicationSettings.java b/src/main/java/org/onap/dcae/ApplicationSettings.java
index 7a2bff97..c4f2c063 100644
--- a/src/main/java/org/onap/dcae/ApplicationSettings.java
+++ b/src/main/java/org/onap/dcae/ApplicationSettings.java
@@ -43,6 +43,7 @@ import javax.annotation.Nullable;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.json.JSONObject;
+import org.onap.dcae.common.configuration.AuthMethodType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -119,10 +120,6 @@ public class ApplicationSettings {
return properties.getInt("collector.schema.checkflag", -1) > 0;
}
- public boolean authorizationEnabled() {
- return properties.getInt("header.authflag", 0) > 0;
- }
-
public JsonSchema jsonSchema(String version) {
return loadedJsonSchemas.get(version)
.orElse(loadedJsonSchemas.get(FALLBACK_VES_VERSION))
@@ -175,10 +172,6 @@ public class ApplicationSettings {
return prependWithUserDirOnRelative(properties.getString("collector.keystore.file.location", "etc/keystore"));
}
- public boolean clientTlsAuthenticationEnabled() {
- return httpsEnabled() && properties.getInt("collector.service.secure.clientauth", 0) > 0;
- }
-
public String truststorePasswordFileLocation() {
return prependWithUserDirOnRelative(properties.getString("collector.truststore.passwordfile", "etc/trustpasswordfile"));
}
@@ -195,6 +188,10 @@ public class ApplicationSettings {
return prependWithUserDirOnRelative(properties.getString("collector.dmaapfile", "etc/DmaapConfig.json"));
}
+ public String authMethod(){
+ return properties.getString("auth.method", AuthMethodType.NO_AUTH.value());
+ }
+
public Map<String, String[]> dMaaPStreamsMapping() {
String streamIdsProperty = properties.getString("collector.dmaap.streamid", null);
if (streamIdsProperty == null) {