From 3505a52ac853c134ecaf40f2977667de8770ec59 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Thu, 31 Jan 2019 14:49:24 -0600 Subject: Implement public private locator Issue-ID: AAF-723 Change-Id: Ib5507ccaab0b7e565c98a16733d1b42dfb608095 Signed-off-by: Instrumental --- .../java/org/onap/aaf/auth/server/AbsService.java | 4 +- .../onap/aaf/auth/server/JettyServiceStarter.java | 2 +- .../java/org/onap/aaf/auth/server/TestKill.java | 65 ---------------------- 3 files changed, 3 insertions(+), 68 deletions(-) delete mode 100644 auth/auth-core/src/main/java/org/onap/aaf/auth/server/TestKill.java (limited to 'auth/auth-core/src/main') 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 9ece4847..e2317a52 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 @@ -62,10 +62,10 @@ public abstract class AbsService exte this.access = access; this.env = env; - String str = access.getProperty(Config.AAF_LOCATOR_NAMES, null); + String str = access.getProperty(Config.AAF_LOCATOR_ENTRIES, null); String[] scomp = Split.splitTrim(',', str); if(scomp.length==0) { - throw new CadiException(Config.AAF_LOCATOR_NAMES + " must be defined."); + throw new CadiException(Config.AAF_LOCATOR_ENTRIES + " must be defined."); } else { str = ROOT_NS + '.' + scomp[0]; } diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java index d29b8f26..413b7919 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java @@ -130,7 +130,7 @@ public class JettyServiceStarter ex throw new CadiException("No Truststore Password configured for " + truststore); } sslContextFactory.setTrustStorePath(truststore); - sslContextFactory.setTrustStorePassword(access().decrypt(truststorePassword, true)); + sslContextFactory.setTrustStorePassword(access().decrypt(truststorePassword, false)); } // Be able to accept only certain protocols, i.e. TLSv1.1+ String subprotocols = access().getProperty(Config.CADI_PROTOCOLS, SecurityInfo.HTTPS_PROTOCOLS_DEFAULT); diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/TestKill.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/TestKill.java deleted file mode 100644 index 78172a22..00000000 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/TestKill.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * ============LICENSE_START==================================================== - * org.onap.aaf - * =========================================================================== - * Copyright (c) 2018 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==================================================== - */ - -package org.onap.aaf.auth.server; - -import java.io.IOException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; - -public class TestKill implements Runnable { - - public static void main(String[] args) { - ExecutorService es = Executors.newSingleThreadExecutor(); - TestKill tk = new TestKill(); - Future app = es.submit(tk); - Runtime.getRuntime().addShutdownHook(new Thread() { - @Override - public void run() { - System.out.println("Shutdown Hook, thread: setting interrupt"); - app.cancel(true); - tk.longProcess(); - es.shutdown(); - } - }); - System.out.println("Service Start"); - System.out.print("Hit to end:"); - try { - System.in.read(); - System.exit(0); - } catch (IOException e) { - } - } - - @Override - public void run() { - } - - private void longProcess() { - System.out.println("Starting long cleanup process"); - try { - Thread.sleep(10000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - System.out.println("Ending long cleanup process"); - } -} -- cgit 1.2.3-korg