summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-06-06 19:33:19 -0500
committerInstrumental <jonathan.gathman@att.com>2019-06-08 09:24:31 -0500
commit355b886d817295d2bca5af28f01576bf4a3ded18 (patch)
tree354ac6cb61ebc5f5eba23d2e1720c45771968caa /auth
parentfbcac9be97567ca19b1018861d1ab37d2dea769f (diff)
Agent correctly sort Cert Chain/Truststore
GUI fix Issue-ID: AAF-852 Change-Id: Ie703b7aee0a77074fac5c1aab3bdf402862243ac 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/DirectRegistrar.java2
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java10
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java11
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java2
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java2
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/AAF_GUI.java2
-rw-r--r--auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/service/LocateServiceImpl.java3
-rw-r--r--auth/docker/dbash.sh2
-rw-r--r--auth/docker/dinstall.sh29
-rw-r--r--auth/docker/drun.sh1
-rw-r--r--auth/helm/aaf/Chart.yaml2
-rw-r--r--auth/helm/aaf/templates/aaf-gui.yaml2
-rw-r--r--auth/sample/bin/service.sh2
13 files changed, 45 insertions, 25 deletions
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java
index ec5449df..99421097 100644
--- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java
+++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/direct/DirectRegistrar.java
@@ -49,7 +49,7 @@ public class DirectRegistrar implements Registrant<AuthzEnv> {
ldd.add(convert(me));
}
}
-
+
private LocateDAO.Data convert(MgmtEndpoint me) {
LocateDAO.Data out = new LocateDAO.Data();
out.name=me.getName();
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java
index 6d993284..7daa51fb 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java
@@ -62,14 +62,12 @@ public class List extends BaseCmd<User> {
if (!aafcli.isTest()) {
date = Chrono.dateOnlyStamp(user.getExpires());
}
- String tag=null;
- if(user.getType()<200) {
- tag = user.getTag();
- } else {
- tag = "\n\tfingerprint: " + user.getTag();
- }
+ String tag=user.getTag();
+ Integer type = user.getType();
if(tag==null) {
tag="";
+ } else if(type!=null && type>=200) {
+ tag = "\n\tfingerprint: " + tag;
}
pw().format(format,
count? (Integer.valueOf(++idx) + ") " + user.getId()): user.getId(),
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java
index b534240b..4e539ac2 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java
@@ -21,9 +21,6 @@
package org.onap.aaf.auth.cmd.user;
-import java.util.Collections;
-import java.util.Comparator;
-
import org.onap.aaf.auth.cmd.AAFcli;
import org.onap.aaf.auth.cmd.Cmd;
import org.onap.aaf.auth.cmd.Param;
@@ -36,7 +33,6 @@ import org.onap.aaf.cadi.client.Retryable;
import org.onap.aaf.misc.env.APIException;
import aaf.v2_0.Users;
-import aaf.v2_0.Users.User;
/**
* p
@@ -61,13 +57,6 @@ public class ListForRoles extends Cmd {
getDF(Users.class)
);
if (fp.get(AAFcli.timeout())) {
- if (aafcli.isTest())
- Collections.sort(fp.value.getUser(), new Comparator<User>() {
- @Override
- public int compare(User u1, User u2) {
- return u1.getId().compareTo(u2.getId());
- }
- });
((org.onap.aaf.auth.cmd.user.List)parent).report(fp.value,false, HEADER,role);
if (fp.code()==404)return 200;
} else {
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java
index 02d93512..5fbb951b 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java
@@ -76,7 +76,7 @@ public abstract class AbsService<ENV extends BasicEnv, TRANS extends Trans> exte
str = Defaults.AAF_VERSION;
env.setProperty(Config.AAF_LOCATOR_VERSION, str);
}
- app_version = str;
+ app_version = access.getProperty(Config.AAF_DEPLOYED_VERSION, str);
// Print Cipher Suites Available
if (access.willLog(Level.DEBUG)) {
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java
index 0e8cb78d..56eea435 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java
@@ -56,7 +56,6 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
// do_register - this is used for specialty Debug Situations. Developer can create an Instance for a remote system
// for Debugging purposes without fear that real clients will start to call your debug instance
do_register = !"TRUE".equalsIgnoreCase(access().getProperty("aaf_locate_no_register",null));
- _propertyAdjustment();
hostname = access().getProperty(Config.HOSTNAME, null);
if (hostname==null) {
try {
@@ -65,6 +64,7 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
hostname= "cannotBeDetermined";
}
}
+ _propertyAdjustment();
}
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/AAF_GUI.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/AAF_GUI.java
index f8aeb11b..c33f3d69 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/AAF_GUI.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/AAF_GUI.java
@@ -128,7 +128,7 @@ public class AAF_GUI extends AbsService<AuthzEnv, AuthzTrans> implements State<E
}
slot_httpServletRequest = env.slot(HTTP_SERVLET_REQUEST);
- deployedVersion = access.getProperty(Config.AAF_RELEASE, "N/A:2.x");
+ deployedVersion = app_version;
// Certificate Manager
String aaf_url_cm = env.getProperty(Config.AAF_URL_CM,Config.AAF_URL_CM_DEF);
diff --git a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/service/LocateServiceImpl.java b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/service/LocateServiceImpl.java
index 6d96ded3..b6e4dfa8 100644
--- a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/service/LocateServiceImpl.java
+++ b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/service/LocateServiceImpl.java
@@ -128,6 +128,8 @@ public class LocateServiceImpl<IN,OUT,ERROR>
///// ADDED v1_1
/* (non-Javadoc)
* @see org.onap.aaf.auth.locate.service.LocateService#getConfig(org.onap.aaf.auth.env.AuthzTrans, java.lang.String, java.lang.String)
+ *
+ * Note: "id" is put in, in case we need to filter, or direct data change in the future by Permission
*/
@Override
public Result<Configuration> getConfig(AuthzTrans trans, String id, String type) {
@@ -145,7 +147,6 @@ public class LocateServiceImpl<IN,OUT,ERROR>
}
}
return Result.ok(c);
- //return Result.err(Result.ERR_NotImplemented,"not done yet");
}
diff --git a/auth/docker/dbash.sh b/auth/docker/dbash.sh
index a9c90f99..81e96b4d 100644
--- a/auth/docker/dbash.sh
+++ b/auth/docker/dbash.sh
@@ -20,4 +20,4 @@
#
. ./d.props
-${DOCKER:=docker} exec -it aaf-$1 bash -c "cd /opt/app/osaaf/logs && exec bash"
+${DOCKER:=docker} exec -it aaf-$1 bash -c "cd /opt/app && exec bash"
diff --git a/auth/docker/dinstall.sh b/auth/docker/dinstall.sh
new file mode 100644
index 00000000..22ea4c91
--- /dev/null
+++ b/auth/docker/dinstall.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+#########
+# ============LICENSE_START====================================================
+# org.onap.aaf
+# ===========================================================================
+# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# ===========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END====================================================
+#
+# This is only called from HEAT, as it needs a single check and wait for Cassandra to be ready
+#
+cd ../auth-cass/docker
+. dinstall.sh $@
+cd -
+if [ "$1" = "publish" ]; then
+ shift
+fi
+. drun.sh
diff --git a/auth/docker/drun.sh b/auth/docker/drun.sh
index 648c497a..1910f4a2 100644
--- a/auth/docker/drun.sh
+++ b/auth/docker/drun.sh
@@ -106,6 +106,7 @@ for AAF_COMPONENT in ${AAF_COMPONENTS}; do
--env aaf_locator_container_ns=${NAMESPACE} \
--env aaf_locator_fqdn=${HOSTNAME} \
--env aaf_locator_public_fqdn=${HOSTNAME} \
+ --env aaf_deployed_version=${VERSION} \
--env LATITUDE=${LATITUDE} \
--env LONGITUDE=${LONGITUDE} \
--env CASSANDRA_CLUSTER=${CASSANDRA_CLUSTER} \
diff --git a/auth/helm/aaf/Chart.yaml b/auth/helm/aaf/Chart.yaml
index 0f0f2761..d0a1d286 100644
--- a/auth/helm/aaf/Chart.yaml
+++ b/auth/helm/aaf/Chart.yaml
@@ -22,4 +22,4 @@ apiVersion: v1
appVersion: "1.0"
description: AAF Helm Chart
name: aaf
-version: 2.1.12-SNAPSHOT
+version: 2.1.14-SNAPSHOT
diff --git a/auth/helm/aaf/templates/aaf-gui.yaml b/auth/helm/aaf/templates/aaf-gui.yaml
index c31496fc..4c540778 100644
--- a/auth/helm/aaf/templates/aaf-gui.yaml
+++ b/auth/helm/aaf/templates/aaf-gui.yaml
@@ -90,6 +90,8 @@ spec:
value: "{{.Values.services.aaf_locator_name}}"
- name: aaf_locator_name_helm
value: "{{.Values.services.aaf_locator_name_helm}}"
+ - name: aaf_deployed_version
+ value: "{{ .Values.image.version }}"
- name: CASSANDRA_CLUSTER
value: "{{.Values.services.cass.fqdn}}.{{.Values.services.ns}}"
# - name: CASSANDRA_USER
diff --git a/auth/sample/bin/service.sh b/auth/sample/bin/service.sh
index 29d9f967..c14754ae 100644
--- a/auth/sample/bin/service.sh
+++ b/auth/sample/bin/service.sh
@@ -33,7 +33,7 @@ echo "# Properties passed in"
# Set from CAP Based PROPS, if necessary
aaf_env=${aaf_env:-"${AAF_ENV}"}
-aaf_release=${aaf_release:-"${VERSION}"}
+aaf_deployed_version=${aaf_deployed_version:-"${VERSION}"}
cadi_latitude=${cadi_latitude:-"${LATITUDE}"}
cadi_longitude=${cadi_longitude:-"${LONGITUDE}"}
cadi_x509_issuers=${cadi_x509_issuers:-"${CADI_X509_ISSUERS}"}