summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-05-31 15:08:37 -0500
committerInstrumental <jonathan.gathman@att.com>2019-05-31 15:13:25 -0500
commitdbec47530c91b6cd586fb05b44fd27444301e04a (patch)
tree85bd688449a2ea3d52d585e2b3dbd84a6168e861 /auth
parent98adb75e5e627d28ecdf659f4c8ed640ce53ed5e (diff)
Switch to new Locate Features
Issue-ID: AAF-839 Change-Id: I3122d32330c7e0fab533db8355183dbff68f7cc7 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth')
-rw-r--r--auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectAAFLocator.java6
-rw-r--r--auth/auth-fs/src/main/java/org/onap/aaf/auth/fs/AAF_FS.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java4
-rw-r--r--auth/docker/dbash.sh2
-rw-r--r--auth/sample/etc/org.osaaf.aaf.cm.props1
-rw-r--r--auth/sample/etc/org.osaaf.aaf.fs.props1
-rw-r--r--auth/sample/etc/org.osaaf.aaf.gui.props3
-rw-r--r--auth/sample/etc/org.osaaf.aaf.hello.props1
-rw-r--r--auth/sample/etc/org.osaaf.aaf.locate.props1
-rw-r--r--auth/sample/etc/org.osaaf.aaf.oauth.props1
-rw-r--r--auth/sample/etc/org.osaaf.aaf.service.props1
-rw-r--r--auth/sample/local/initialConfig.props15
12 files changed, 22 insertions, 16 deletions
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectAAFLocator.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectAAFLocator.java
index bd77bee6..98459672 100644
--- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectAAFLocator.java
+++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectAAFLocator.java
@@ -75,10 +75,10 @@ public class DirectAAFLocator extends AbsAAFLocator<AuthzTrans> {
try {
String aaf_url = access.getProperty(Config.AAF_URL, null);
if(aaf_url==null) {
- RegistrationPropHolder rph = new RegistrationPropHolder(access,0);
- aaf_url = rph.replacements(getClass().getSimpleName(),"https://"+Config.AAF_LOCATE_URL_TAG+"/%NS."+name, null,null);
+ aaf_url = "https://"+Config.AAF_LOCATE_URL_TAG+"/%NS."+name;
}
- //access.getProperty("/locate/"+name+':'+version;
+ RegistrationPropHolder rph = new RegistrationPropHolder(access,0);
+ aaf_url = rph.replacements(getClass().getSimpleName(),aaf_url, null,null);
access.printf(Level.INIT,"Creating DirectAAFLocator to %s",aaf_url);
uri = new URI(aaf_url);
} catch (URISyntaxException | UnknownHostException | CadiException e) {
diff --git a/auth/auth-fs/src/main/java/org/onap/aaf/auth/fs/AAF_FS.java b/auth/auth-fs/src/main/java/org/onap/aaf/auth/fs/AAF_FS.java
index 76041cef..b56fc03e 100644
--- a/auth/auth-fs/src/main/java/org/onap/aaf/auth/fs/AAF_FS.java
+++ b/auth/auth-fs/src/main/java/org/onap/aaf/auth/fs/AAF_FS.java
@@ -60,7 +60,7 @@ public class AAF_FS extends AbsService<AuthzEnv, AuthzTrans> {
CachingFileAccess<AuthzTrans> cfa = new CachingFileAccess<AuthzTrans>(env);
route(env,GET,"/:key*", cfa);
- final String aaf_locate_url = access.getProperty(Config.AAF_LOCATE_URL, null);
+ final String aaf_locate_url = Config.getAAFLocateUrl(access);
if (aaf_locate_url == null) {
access.printf(Level.WARN, "Redirection requires property %s",Config.AAF_LOCATE_URL);
} else {
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java
index 8924ba26..5b6eb016 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/Page.java
@@ -261,7 +261,7 @@ public class Page extends HTMLCacheGen {
});
hgen.html();
final String title = env.getProperty(AAF_GUI_TITLE,"Authentication/Authorization Framework");
- final String defaultTheme = env.get(sTheme);
+ final String defaultTheme = env.get(sTheme,"onap");
final Holder<String> hTheme = new Holder<>(defaultTheme);
Mark head = hgen.head();
@@ -368,7 +368,7 @@ public class Page extends HTMLCacheGen {
cache.dynamic(hgen, new DynamicCode<HTMLGen,AAF_GUI,AuthzTrans>() {
@Override
public void code(AAF_GUI state, AuthzTrans trans,Cache<HTMLGen> cache, HTMLGen xgen) throws APIException, IOException {
- Properties props = themeProps.get(hTheme.get());
+ Properties props = themeProps==null?null:themeProps.get(hTheme.get());
if(props!=null && "TRUE".equalsIgnoreCase(props.getProperty("main_menu_in_nav"))) {
xgen.incr("h2").text("Navigation").end();
Mark mark = new Mark();
diff --git a/auth/docker/dbash.sh b/auth/docker/dbash.sh
index f3bb26a0..a9c90f99 100644
--- a/auth/docker/dbash.sh
+++ b/auth/docker/dbash.sh
@@ -20,4 +20,4 @@
#
. ./d.props
-${DOCKER:=docker} exec -it aaf-$1 bash
+${DOCKER:=docker} exec -it aaf-$1 bash -c "cd /opt/app/osaaf/logs && exec bash"
diff --git a/auth/sample/etc/org.osaaf.aaf.cm.props b/auth/sample/etc/org.osaaf.aaf.cm.props
index c8e383c2..9afba43d 100644
--- a/auth/sample/etc/org.osaaf.aaf.cm.props
+++ b/auth/sample/etc/org.osaaf.aaf.cm.props
@@ -24,6 +24,7 @@
##
cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props:/opt/app/osaaf/local/org.osaaf.aaf.cassandra.props:/opt/app/osaaf/etc/org.osaaf.aaf.orgs.props:/opt/app/osaaf/local/org.osaaf.aaf.cm.ca.props
aaf_locator_entries=cm
+aaf_locator_protocol=https
port=8150
aaf_locator_public_port.helm=30084
aaf_locator_public_port.oom=31114
diff --git a/auth/sample/etc/org.osaaf.aaf.fs.props b/auth/sample/etc/org.osaaf.aaf.fs.props
index 8233d020..6743f746 100644
--- a/auth/sample/etc/org.osaaf.aaf.fs.props
+++ b/auth/sample/etc/org.osaaf.aaf.fs.props
@@ -23,6 +23,7 @@
##
cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props
aaf_locator_entries=fs
+aaf_locator_protocol=http
port=8096
aaf_locator_public_port.helm=30085
aaf_locator_public_port.oom=31115
diff --git a/auth/sample/etc/org.osaaf.aaf.gui.props b/auth/sample/etc/org.osaaf.aaf.gui.props
index ce2b6bee..ca667422 100644
--- a/auth/sample/etc/org.osaaf.aaf.gui.props
+++ b/auth/sample/etc/org.osaaf.aaf.gui.props
@@ -23,13 +23,14 @@
##
cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props:/opt/app/osaaf/etc/org.osaaf.aaf.orgs.props
aaf_locator_entries=gui
+aaf_locator_protocol=https
port=8200
aaf_locator_public_port.helm=30083
aaf_locator_public_port.oom=31113
aaf_gui_title=AAF
aaf_gui_copyright=(c) 2018 AT&T Intellectual Property. All rights reserved.
-aaf_gui_theme=theme/onap
+aaf_gui_theme=onap
cadi_loginpage_url=https://AAF_LOCATE_URL/%CNS.%AAF_NS.gui:2.0/login
# GUI URLS and Help URLS
diff --git a/auth/sample/etc/org.osaaf.aaf.hello.props b/auth/sample/etc/org.osaaf.aaf.hello.props
index 89434685..47143186 100644
--- a/auth/sample/etc/org.osaaf.aaf.hello.props
+++ b/auth/sample/etc/org.osaaf.aaf.hello.props
@@ -23,6 +23,7 @@
##
cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props
aaf_locator_entries=hello
+aaf_locator_protocol=https
port=8130
aaf_locator_public_port.helm=30086
aaf_locator_public_port.oom=31116
diff --git a/auth/sample/etc/org.osaaf.aaf.locate.props b/auth/sample/etc/org.osaaf.aaf.locate.props
index 0290a2ec..3f75f6f9 100644
--- a/auth/sample/etc/org.osaaf.aaf.locate.props
+++ b/auth/sample/etc/org.osaaf.aaf.locate.props
@@ -23,6 +23,7 @@
##
cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props:/opt/app/osaaf/etc/org.osaaf.aaf.orgs.props:/opt/app/osaaf/local/org.osaaf.aaf.cassandra.props
aaf_locator_entries=locate
+aaf_locator_protocol=https
port=8095
aaf_locator_public_port.helm=30081
aaf_locator_public_port.oom=31111
diff --git a/auth/sample/etc/org.osaaf.aaf.oauth.props b/auth/sample/etc/org.osaaf.aaf.oauth.props
index a2d5fc56..10ab72e5 100644
--- a/auth/sample/etc/org.osaaf.aaf.oauth.props
+++ b/auth/sample/etc/org.osaaf.aaf.oauth.props
@@ -24,6 +24,7 @@ cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.
aaf_locator_entries=oauth,token,introspect
aaf_locator_fqdn.helm=aaf-oauth.%CNS
aaf_locator_fqdn.oom=aaf-oauth.%CNS
+aaf_locator_protocol=https
port=8140
aaf_locator_public_port.helm=30082
aaf_locator_public_port.oom=31112
diff --git a/auth/sample/etc/org.osaaf.aaf.service.props b/auth/sample/etc/org.osaaf.aaf.service.props
index 3af5f808..6318336c 100644
--- a/auth/sample/etc/org.osaaf.aaf.service.props
+++ b/auth/sample/etc/org.osaaf.aaf.service.props
@@ -23,6 +23,7 @@
##
cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props:/opt/app/osaaf/local/org.osaaf.aaf.cassandra.props:/opt/app/osaaf/etc/org.osaaf.aaf.orgs.props
aaf_locator_entries=service
+aaf_locator_protocol=https
port=8100
aaf_locator_public_port.helm=30080
aaf_locator_public_port.oom=31110
diff --git a/auth/sample/local/initialConfig.props b/auth/sample/local/initialConfig.props
index 8b01d951..7c03e052 100644
--- a/auth/sample/local/initialConfig.props
+++ b/auth/sample/local/initialConfig.props
@@ -26,20 +26,19 @@
# 3) Helm (Kubernetes and Helm)
# 4) OOM (Kubernetes with OOM)
################################
+aaf_locate_url.docker=https://aaf-locate:8095
+aaf_locate_url.helm=https://aaf-locate.%CNS:8095
+aaf_locate_url.oom=https://aaf-locate.%CNS:8095
+
aaf_locator_app_ns=%AAF_NS
aaf_locator_name=%NS.%N
aaf_locator_name.docker=%CNS.%NS.%N
aaf_root_ns=org.osaaf.aaf
-# Dublin
-aaf_locator_name.oom=%NS.%N
-aaf_locator_name.helm=%NS.%N
-aaf_locator_public_name.oom=public.%NS.%N
-aaf_locator_public_name.helm=public.%NS.%N
-
# EL Alto and beyond
-# aaf_locator_name.oom=%CNS.%NS.%N
-# aaf_locator_name.helm=%CNS.%NS.%N
+aaf_locator_name.docker=%CNS.%NS.%N
+aaf_locator_name.oom=%CNS.%NS.%N
+aaf_locator_name.helm=%CNS.%NS.%N
aaf_locator_fqdn.docker=aaf-%N
aaf_locator_fqdn.helm=aaf-%N.%CNS