diff options
author | xuegao <xue.gao@intl.att.com> | 2020-12-09 16:01:22 +0100 |
---|---|---|
committer | Christophe Closset <christophe.closset@intl.att.com> | 2021-01-19 13:51:47 +0000 |
commit | 27fa75194efcf77c93b645ef7b412668ac3f5d38 (patch) | |
tree | 123dbbf734355299ed0643a77781a0542df03888 /common-app-api | |
parent | 5b9a4251a7bce56895ca80b867ee7537e7382320 (diff) |
Add basic auth
Adding basic auth for SDC apis.
Issue-ID: OJSI-90
Signed-off-by: xuegao <xue.gao@intl.att.com>
Change-Id: Ie84e6bab8d8526f7f4d21a36bba52d8fe9abebbb
Signed-off-by: xuegao <xue.gao@intl.att.com>
Diffstat (limited to 'common-app-api')
-rw-r--r-- | common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java | 49 | ||||
-rw-r--r-- | common-app-api/src/main/java/org/openecomp/sdc/fe/config/Configuration.java | 40 |
2 files changed, 89 insertions, 0 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java index 4ec7a16a5c..4ebacffa0e 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java @@ -118,6 +118,8 @@ public class Configuration extends BasicConfiguration { private DcaeConfig dcae; + private BasicAuthConfig basicAuth; + private CassandrConfig cassandraConfig; private SwitchoverDetectorConfig switchoverDetector; @@ -1175,6 +1177,53 @@ public class Configuration extends BasicConfiguration { } + public BasicAuthConfig getBasicAuth() { + return basicAuth; + } + + public void setBasicAuth(BasicAuthConfig basicAuth) { + this.basicAuth = basicAuth; + } + + public static class BasicAuthConfig { + boolean enabled; + String userName; + String userPass; + String excludedUrls; + + public boolean getEnabled() { + return enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserPass() { + return userPass; + } + + public void setUserPass(String userPass) { + this.userPass = userPass; + } + + public String getExcludedUrls() { + return excludedUrls; + } + + public void setExcludedUrls(String excludedUrls) { + this.excludedUrls = excludedUrls; + } + } + public DcaeConfig getDcae() { return dcae; } diff --git a/common-app-api/src/main/java/org/openecomp/sdc/fe/config/Configuration.java b/common-app-api/src/main/java/org/openecomp/sdc/fe/config/Configuration.java index b2e58f5766..e437034ea0 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/fe/config/Configuration.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/fe/config/Configuration.java @@ -61,6 +61,8 @@ public class Configuration extends BasicConfiguration { private CookieConfig authCookie; + private BasicAuthConfig basicAuth; + private CatalogFacadeMsConfig catalogFacadeMs; /** * be http context @@ -265,6 +267,14 @@ public class Configuration extends BasicConfiguration { this.authCookie = authCookie; } + public BasicAuthConfig getBasicAuth() { + return basicAuth; + } + + public void setBasicAuth(BasicAuthConfig basicAuth) { + this.basicAuth = basicAuth; + } + @Override public String toString() { return new StringBuilder().append(format("backend host: %s%n", beHost)) @@ -456,6 +466,36 @@ public class Configuration extends BasicConfiguration { } } + public static class BasicAuthConfig { + boolean enabled = false; + String userName = ""; + String userPass = ""; + + public boolean getEnabled() { + return enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserPass() {return userPass; + } + + public void setUserPass(String userPass) { + this.userPass = userPass; + } + + } + public static class CatalogFacadeMsConfig { String protocol; String host; |