summaryrefslogtreecommitdiffstats
path: root/cadi/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'cadi/core/src')
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java257
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_Get.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_GetAccess.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MultiGet.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_MultiGet.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfoC.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_SecurityInfoC.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_UsersDump.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_UsersDump.java)4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_FCGetTest.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/filter/JU_FCGetTest.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_ConfigPrincipal.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_ConfigPrincipal.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_LocalLur.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalPermission.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_LocalPermission.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_NullLur.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_NullLur.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_BasicPrincipal.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_BasicPrincipal.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_CachedBasicPrincipal.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_CachedBasicPrincipal.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_Kind.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_Kind.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_OAuth2FormPrincipal.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_OAuth2FormPrincipal.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_StringTagLookup.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_StringTagLookup.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TaggedPrincipal.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_TaggedPrincipal.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TrustPrincipal.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_TrustPrincipal.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_UnAuthPrincipal.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_UnAuthPrincipal.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_X509Principal.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/dos/JU_DenialOfServiceTaf.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_EpiTaf.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_NullTaf.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_NullTaf.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_PuntTafResp.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_PuntTafResp.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustNotTafResp.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_TrustNotTafResp.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustTafResp.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_TrustTafResp.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Chmod.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Chmod.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_FQI.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_FQI.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_JsonOutputStream.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_JsonOutputStream.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_MaskFormatException.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_MaskFormatException.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_NetMask.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_NetMask.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Pool.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Split.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Split.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_SubStandardConsole.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_SubStandardConsole.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_TheConsole.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_TheConsole.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_UserChainManip.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_UserChainManip.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Vars.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSE_Read.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/wsse/JU_WSSE_Read.java)2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_XReader.java (renamed from cadi/core/src/test/java/org/onap/aaf/cadi/test/wsse/JU_XReader.java)2
39 files changed, 177 insertions, 158 deletions
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java b/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java
index 30496d78..2d252ea9 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java
@@ -86,128 +86,24 @@ public class SecurityInfo {
try {
this.access = access;
// reuse DME2 Properties for convenience if specific Properties don't exist
- String keyStore = access.getProperty(Config.CADI_KEYSTORE,null);
- if(keyStore!=null && !new File(keyStore).exists()) {
- throw new CadiException(keyStore + " does not exist");
- }
- String keyStorePasswd = access.getProperty(Config.CADI_KEYSTORE_PASSWORD, null);
- keyStorePasswd = keyStorePasswd==null?null:access.decrypt(keyStorePasswd,false);
- String trustStore = access.getProperty(Config.CADI_TRUSTSTORE, null);
- if(trustStore!=null && !new File(trustStore).exists()) {
- throw new CadiException(trustStore + " does not exist");
- }
- String trustStorePasswd = access.getProperty(Config.CADI_TRUSTSTORE_PASSWORD, null);
- trustStorePasswd = trustStorePasswd==null?"changeit"/*defacto Java Trust Pass*/:access.decrypt(trustStorePasswd,false);
- default_alias = access.getProperty(Config.CADI_ALIAS,null);
- String keyPasswd = access.getProperty(Config.CADI_KEY_PASSWORD,null);
- keyPasswd = keyPasswd==null?keyStorePasswd:access.decrypt(keyPasswd,false);
- String tips=access.getProperty(Config.CADI_TRUST_MASKS, null);
- if(tips!=null) {
- access.log(Level.INIT,"Explicitly accepting valid X509s from",tips);
- String[] ipsplit = tips.split(REGEX_COMMA);
- trustMasks = new NetMask[ipsplit.length];
- for(int i=0;i<ipsplit.length;++i) {
- try {
- trustMasks[i]=new NetMask(ipsplit[i]);
- } catch (MaskFormatException e) {
- throw new AccessException("Invalid IP Mask in " + Config.CADI_TRUST_MASKS,e);
- }
- }
- }
- String https_protocols = Config.logProp(access,Config.CADI_PROTOCOLS,
- access.getProperty(HTTPS_PROTOCOLS,HTTPS_PROTOCOLS_DEFAULT)
+ initializeKeyManager();
+
+ initializeTrustManager();
+
+ default_alias = access.getProperty(Config.CADI_ALIAS, null);
+
+ initializeTrustMasks();
+
+ String https_protocols = Config.logProp(access, Config.CADI_PROTOCOLS,
+ access.getProperty(HTTPS_PROTOCOLS, HTTPS_PROTOCOLS_DEFAULT)
);
- System.setProperty(HTTPS_PROTOCOLS,https_protocols);
+ System.setProperty(HTTPS_PROTOCOLS, https_protocols);
System.setProperty(JDK_TLS_CLIENT_PROTOCOLS, https_protocols);
if("1.7".equals(System.getProperty("java.specification.version")) && https_protocols.contains("TLSv1.2")) {
System.setProperty(Config.HTTPS_CIPHER_SUITES, Config.HTTPS_CIPHER_SUITES_DEFAULT);
- }
-
- KeyManagerFactory kmf = KeyManagerFactory.getInstance(SslKeyManagerFactoryAlgorithm);
- File file;
-
-
- if(keyStore==null || keyStorePasswd == null) {
- km = new X509KeyManager[0];
- } else {
- ArrayList<X509KeyManager> kmal = new ArrayList<X509KeyManager>();
- for(String ksname : keyStore.split(REGEX_COMMA)) {
- file = new File(ksname);
- String keystoreFormat;
- if(ksname.endsWith(".p12") || ksname.endsWith(".pkcs12")) {
- keystoreFormat = "PKCS12";
- } else {
- keystoreFormat = "JKS";
- }
- if(file.exists()) {
- FileInputStream fis = new FileInputStream(file);
- try {
- KeyStore ks = KeyStore.getInstance(keystoreFormat);
- ks.load(fis, keyStorePasswd.toCharArray());
- kmf.init(ks, keyPasswd.toCharArray());
- } finally {
- fis.close();
- }
- }
- }
- for(KeyManager km : kmf.getKeyManagers()) {
- if(km instanceof X509KeyManager) {
- kmal.add((X509KeyManager)km);
- }
- }
- km = new X509KeyManager[kmal.size()];
- kmal.toArray(km);
- }
-
- TrustManagerFactory tmf = TrustManagerFactory.getInstance(SslKeyManagerFactoryAlgorithm);
- if(trustStore!=null) {
- for(String tsname : trustStore.split(REGEX_COMMA)) {
- file = new File(tsname);
- if(file.exists()) {
- FileInputStream fis = new FileInputStream(file);
- try {
- KeyStore ts = KeyStore.getInstance("JKS");
- ts.load(fis, trustStorePasswd.toCharArray());
- tmf.init(ts);
- } finally {
- fis.close();
- }
- }
- }
- TrustManager tms[] = tmf.getTrustManagers();
- if(tms!=null) {
- tm = new X509TrustManager[tms==null?0:tms.length];
- for(int i=0;i<tms.length;++i) {
- try {
- tm[i]=(X509TrustManager)tms[i];
- } catch (ClassCastException e) {
- access.log(Level.WARN, "Non X509 TrustManager", tm[i].getClass().getName(),"skipped in SecurityInfo");
- }
- }
- }
- }
-
- if(trustMasks!=null) {
- final HostnameVerifier origHV = HttpsURLConnection.getDefaultHostnameVerifier();
- HttpsURLConnection.setDefaultHostnameVerifier(maskHV = new HostnameVerifier() {
- @Override
- public boolean verify(final String urlHostName, final SSLSession session) {
- try {
- // This will pick up /etc/host entries as well as DNS
- InetAddress ia = InetAddress.getByName(session.getPeerHost());
- for(NetMask tmask : trustMasks) {
- if(tmask.isInNet(ia.getHostAddress())) {
- return true;
- }
- }
- } catch (UnknownHostException e) {
- // It's ok. do normal Verify
- }
- return origHV.verify(urlHostName,session);
- };
- });
- }
+ }
+
ctx = SSLContext.getInstance("TLS");
ctx.init(km, tm, null);
SSLContext.setDefault(ctx);
@@ -249,9 +145,134 @@ public class SecurityInfo {
public void setSocketFactoryOn(HttpsURLConnection hsuc) {
hsuc.setSSLSocketFactory(scf);
- if(maskHV!=null && !maskHV.equals(hsuc.getHostnameVerifier())) {
+ if(maskHV != null && !maskHV.equals(hsuc.getHostnameVerifier())) {
hsuc.setHostnameVerifier(maskHV);
}
}
+
+ protected void initializeKeyManager() throws CadiException, IOException, NoSuchAlgorithmException, KeyStoreException, CertificateException, UnrecoverableKeyException {
+ String keyStore = access.getProperty(Config.CADI_KEYSTORE, null);
+ if(keyStore != null && !new File(keyStore).exists()) {
+ throw new CadiException(keyStore + " does not exist");
+ }
+
+ String keyStorePasswd = access.getProperty(Config.CADI_KEYSTORE_PASSWORD, null);
+ keyStorePasswd = (keyStorePasswd == null) ? null : access.decrypt(keyStorePasswd, false);
+
+ String keyPasswd = access.getProperty(Config.CADI_KEY_PASSWORD, null);
+ keyPasswd = (keyPasswd == null) ? keyStorePasswd : access.decrypt(keyPasswd, false);
+
+ KeyManagerFactory kmf = KeyManagerFactory.getInstance(SslKeyManagerFactoryAlgorithm);
+ if(keyStore == null || keyStorePasswd == null) {
+ km = new X509KeyManager[0];
+ } else {
+ ArrayList<X509KeyManager> kmal = new ArrayList<X509KeyManager>();
+ File file;
+ for(String ksname : keyStore.split(REGEX_COMMA)) {
+ file = new File(ksname);
+ String keystoreFormat;
+ if(ksname.endsWith(".p12") || ksname.endsWith(".pkcs12")) {
+ keystoreFormat = "PKCS12";
+ } else {
+ keystoreFormat = "JKS";
+ }
+ if(file.exists()) {
+ FileInputStream fis = new FileInputStream(file);
+ try {
+ KeyStore ks = KeyStore.getInstance(keystoreFormat);
+ ks.load(fis, keyStorePasswd.toCharArray());
+ kmf.init(ks, keyPasswd.toCharArray());
+ } finally {
+ fis.close();
+ }
+ }
+ }
+ for(KeyManager km : kmf.getKeyManagers()) {
+ if(km instanceof X509KeyManager) {
+ kmal.add((X509KeyManager)km);
+ }
+ }
+ km = new X509KeyManager[kmal.size()];
+ kmal.toArray(km);
+ }
+ }
+
+ protected void initializeTrustManager() throws NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException, CadiException {
+ String trustStore = access.getProperty(Config.CADI_TRUSTSTORE, null);
+ if(trustStore != null && !new File(trustStore).exists()) {
+ throw new CadiException(trustStore + " does not exist");
+ }
+
+ String trustStorePasswd = access.getProperty(Config.CADI_TRUSTSTORE_PASSWORD, null);
+ trustStorePasswd = (trustStorePasswd == null) ? "changeit"/*defacto Java Trust Pass*/ : access.decrypt(trustStorePasswd, false);
+ TrustManagerFactory tmf = TrustManagerFactory.getInstance(SslKeyManagerFactoryAlgorithm);
+ if(trustStore != null) {
+ File file;
+ for(String tsname : trustStore.split(REGEX_COMMA)) {
+ file = new File(tsname);
+ if(file.exists()) {
+ FileInputStream fis = new FileInputStream(file);
+ try {
+ KeyStore ts = KeyStore.getInstance("JKS");
+ ts.load(fis, trustStorePasswd.toCharArray());
+ tmf.init(ts);
+ } finally {
+ fis.close();
+ }
+ }
+ }
+
+ TrustManager tms[] = tmf.getTrustManagers();
+ if(tms != null) {
+ tm = new X509TrustManager[(tms == null) ? 0 : tms.length];
+ for(int i = 0; i < tms.length; ++i) {
+ try {
+ tm[i] = (X509TrustManager)tms[i];
+ } catch (ClassCastException e) {
+ access.log(Level.WARN, "Non X509 TrustManager", tm[i].getClass().getName(), "skipped in SecurityInfo");
+ }
+ }
+ }
+ }
+
+ }
+
+ protected void initializeTrustMasks() throws AccessException {
+ String tips = access.getProperty(Config.CADI_TRUST_MASKS, null);
+ if(tips != null) {
+ access.log(Level.INIT, "Explicitly accepting valid X509s from", tips);
+ String[] ipsplit = tips.split(REGEX_COMMA);
+ trustMasks = new NetMask[ipsplit.length];
+ for(int i = 0; i < ipsplit.length; ++i) {
+ try {
+ trustMasks[i] = new NetMask(ipsplit[i]);
+ } catch (MaskFormatException e) {
+ throw new AccessException("Invalid IP Mask in " + Config.CADI_TRUST_MASKS, e);
+ }
+ }
+ }
+
+ if(trustMasks != null) {
+ final HostnameVerifier origHV = HttpsURLConnection.getDefaultHostnameVerifier();
+ HttpsURLConnection.setDefaultHostnameVerifier(maskHV = new HostnameVerifier() {
+ @Override
+ public boolean verify(final String urlHostName, final SSLSession session) {
+ try {
+ // This will pick up /etc/host entries as well as DNS
+ InetAddress ia = InetAddress.getByName(session.getPeerHost());
+ for(NetMask tmask : trustMasks) {
+ if(tmask.isInNet(ia.getHostAddress())) {
+ return true;
+ }
+ }
+ } catch (UnknownHostException e) {
+ // It's ok. do normal Verify
+ }
+ return origHV.verify(urlHostName, session);
+ };
+ });
+ }
+ }
+
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_Get.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java
index 5f89060e..586c50c7 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_Get.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java
@@ -19,7 +19,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.config;
+package org.onap.aaf.cadi.config.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_GetAccess.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java
index 5acd39f9..36da3073 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_GetAccess.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_GetAccess.java
@@ -19,7 +19,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.config;
+package org.onap.aaf.cadi.config.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_MultiGet.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MultiGet.java
index e678421c..6510bdcd 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_MultiGet.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MultiGet.java
@@ -19,7 +19,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.config;
+package org.onap.aaf.cadi.config.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_SecurityInfoC.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfoC.java
index ecd514fd..27014b9a 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_SecurityInfoC.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfoC.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.config;
+package org.onap.aaf.cadi.config.test;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_UsersDump.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_UsersDump.java
index f6e366a7..63b8cf2d 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_UsersDump.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_UsersDump.java
@@ -19,13 +19,11 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.config;
+package org.onap.aaf.cadi.config.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
-import static org.mockito.Mockito.*;
import org.junit.*;
-import org.mockito.*;
import java.io.ByteArrayOutputStream;
import java.io.File;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/filter/JU_FCGetTest.java b/cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_FCGetTest.java
index 967334ac..694c59e7 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/filter/JU_FCGetTest.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_FCGetTest.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.filter;
+package org.onap.aaf.cadi.filter.test;
import static org.junit.Assert.*;
import static org.mockito.Mockito.when;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_ConfigPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_ConfigPrincipal.java
index 897744ec..9853f88e 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_ConfigPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_ConfigPrincipal.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.lur;
+package org.onap.aaf.cadi.lur.test;
import org.junit.*;
import static org.junit.Assert.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_LocalLur.java b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java
index 8388fa5f..fd8e3575 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_LocalLur.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.lur;
+package org.onap.aaf.cadi.lur.test;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_LocalPermission.java b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalPermission.java
index abc178a8..f4b051a8 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_LocalPermission.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalPermission.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.lur;
+package org.onap.aaf.cadi.lur.test;
import static org.junit.Assert.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_NullLur.java b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_NullLur.java
index d5740b3a..1a7293d3 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/lur/JU_NullLur.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_NullLur.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.lur;
+package org.onap.aaf.cadi.lur.test;
import java.security.Principal;
import java.util.List;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_BasicPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_BasicPrincipal.java
index 0faaca1a..dee7fc21 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_BasicPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_BasicPrincipal.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.principal;
+package org.onap.aaf.cadi.principal.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_CachedBasicPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_CachedBasicPrincipal.java
index 39da6c09..aa9a01a5 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_CachedBasicPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_CachedBasicPrincipal.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.principal;
+package org.onap.aaf.cadi.principal.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_Kind.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_Kind.java
index c66539c4..e9bd799c 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_Kind.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_Kind.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.principal;
+package org.onap.aaf.cadi.principal.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_OAuth2FormPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_OAuth2FormPrincipal.java
index a7c14aa8..c0b1c2af 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_OAuth2FormPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_OAuth2FormPrincipal.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.principal;
+package org.onap.aaf.cadi.principal.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_StringTagLookup.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_StringTagLookup.java
index ff1f3f8a..cce86255 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_StringTagLookup.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_StringTagLookup.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.principal;
+package org.onap.aaf.cadi.principal.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_TaggedPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TaggedPrincipal.java
index 4674db70..2bbfee23 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_TaggedPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TaggedPrincipal.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.principal;
+package org.onap.aaf.cadi.principal.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_TrustPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TrustPrincipal.java
index 4a7333e2..12b4bc9f 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_TrustPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TrustPrincipal.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.principal;
+package org.onap.aaf.cadi.principal.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_UnAuthPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_UnAuthPrincipal.java
index 9d694a53..c0095131 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_UnAuthPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_UnAuthPrincipal.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.principal;
+package org.onap.aaf.cadi.principal.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_X509Principal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java
index a45ce24e..e62dda4f 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/principal/JU_X509Principal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.principal;
+package org.onap.aaf.cadi.principal.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/dos/JU_DenialOfServiceTaf.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java
index 40933b41..ce49654b 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/dos/JU_DenialOfServiceTaf.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.taf.dos;
+package org.onap.aaf.cadi.taf.dos.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_EpiTaf.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java
index baab0b6a..a1190590 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_EpiTaf.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.taf;
+package org.onap.aaf.cadi.taf.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_NullTaf.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_NullTaf.java
index 9131172e..f42184df 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_NullTaf.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_NullTaf.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.taf;
+package org.onap.aaf.cadi.taf.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_PuntTafResp.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_PuntTafResp.java
index 8c5397dc..516f4044 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_PuntTafResp.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_PuntTafResp.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.taf;
+package org.onap.aaf.cadi.taf.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_TrustNotTafResp.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustNotTafResp.java
index 798348e8..b032c020 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_TrustNotTafResp.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustNotTafResp.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.taf;
+package org.onap.aaf.cadi.taf.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_TrustTafResp.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustTafResp.java
index 04e3a1fc..10b5f146 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/taf/JU_TrustTafResp.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustTafResp.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.taf;
+package org.onap.aaf.cadi.taf.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Chmod.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Chmod.java
index 215980ff..62114189 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Chmod.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Chmod.java
@@ -18,7 +18,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_FQI.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_FQI.java
index 57177839..bcd2f776 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_FQI.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_FQI.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_JsonOutputStream.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_JsonOutputStream.java
index d07652a1..da3557cb 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_JsonOutputStream.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_JsonOutputStream.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_MaskFormatException.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_MaskFormatException.java
index 6a60df68..ea743430 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_MaskFormatException.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_MaskFormatException.java
@@ -20,7 +20,7 @@
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_NetMask.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_NetMask.java
index be3b1b32..403f1f1e 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_NetMask.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_NetMask.java
@@ -18,7 +18,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.assertEquals;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Pool.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java
index ef4bc687..79209322 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Pool.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java
@@ -18,7 +18,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Split.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Split.java
index e375f6c0..12be4e15 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Split.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Split.java
@@ -18,7 +18,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_SubStandardConsole.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_SubStandardConsole.java
index 9e6a175c..4d8e8f84 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_SubStandardConsole.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_SubStandardConsole.java
@@ -18,7 +18,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_TheConsole.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_TheConsole.java
index f168c7f4..40f88a3a 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_TheConsole.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_TheConsole.java
@@ -18,7 +18,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.assertEquals;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_UserChainManip.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_UserChainManip.java
index 949d034b..21f8c21b 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_UserChainManip.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_UserChainManip.java
@@ -18,7 +18,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Vars.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java
index 345c8ca2..32ca8f84 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Vars.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java
@@ -18,7 +18,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.util;
+package org.onap.aaf.cadi.util.test;
import static org.junit.Assert.assertEquals;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/wsse/JU_WSSE_Read.java b/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSE_Read.java
index 26dd43b1..599987d7 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/wsse/JU_WSSE_Read.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSE_Read.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.wsse;
+package org.onap.aaf.cadi.wsse.test;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/wsse/JU_XReader.java b/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_XReader.java
index dd90e220..15fe1145 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/wsse/JU_XReader.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_XReader.java
@@ -19,7 +19,7 @@
* *
* *
******************************************************************************/
-package org.onap.aaf.cadi.test.wsse;
+package org.onap.aaf.cadi.wsse.test;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;