summaryrefslogtreecommitdiffstats
path: root/auth/auth-core/src/main/java
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-03-07 12:58:39 -0600
committerInstrumental <jonathan.gathman@att.com>2019-03-07 12:58:54 -0600
commita174f8ddbc5eb78a648fb68b33ef18cb64d81fda (patch)
treed27c01bcd63fd6a7bff00687c6f33423a3a40e8c /auth/auth-core/src/main/java
parent9dc1cd2632d1dda9c8f072e99616e73e0517f1aa (diff)
Improve Batches
Issue-ID: AAF-740 Change-Id: Ib3e8a3f977964eed2e992dc02154dd3bc90492df Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-core/src/main/java')
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTrans.java2
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/org/FileMailer.java3
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/server/JettyServiceStarter.java14
3 files changed, 12 insertions, 7 deletions
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTrans.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTrans.java
index 5f7fa410..2bae29b5 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTrans.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTrans.java
@@ -33,7 +33,7 @@ import org.onap.aaf.misc.env.LogTarget;
import org.onap.aaf.misc.env.TransStore;
public interface AuthzTrans extends TransStore {
- public enum REQD_TYPE {future(1),force(2),move(4),ns(8);
+ public enum REQD_TYPE {future(1),force(2),move(4),ns(8),detail(16);
public final int bit;
REQD_TYPE(int bit) {
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/FileMailer.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/FileMailer.java
index 1db11985..2e3801ed 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/FileMailer.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/FileMailer.java
@@ -58,7 +58,8 @@ public class FileMailer implements Mailer {
}
boolean dryrun = Boolean.parseBoolean(access.getProperty("DRY_RUN","false"));
- int maxEmail = Integer.parseInt(access.getProperty("MAX_EMAIL", "-1"));
+ String str = access.getProperty("MAX_EMAIL", null);
+ int maxEmail = str==null || str.isEmpty()?Integer.MAX_VALUE:Integer.parseInt(str);
if(dryrun && maxEmail==1) {
testName = "email_test";
} else {
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 2d0a82a8..1256c601 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
@@ -45,11 +45,10 @@ import org.eclipse.jetty.server.handler.AbstractHandler;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.onap.aaf.auth.org.OrganizationException;
import org.onap.aaf.auth.rserv.RServlet;
+import org.onap.aaf.cadi.Access.Level;
import org.onap.aaf.cadi.CadiException;
import org.onap.aaf.cadi.LocatorException;
-import org.onap.aaf.cadi.Access.Level;
import org.onap.aaf.cadi.config.Config;
-import org.onap.aaf.cadi.config.SecurityInfo;
import org.onap.aaf.misc.env.Trans;
import org.onap.aaf.misc.env.util.Split;
import org.onap.aaf.misc.rosetta.env.RosettaEnv;
@@ -81,7 +80,7 @@ public class JettyServiceStarter<ENV extends RosettaEnv, TRANS extends Trans> ex
// Critical - if no Security Protocols set, then set it. We'll just get messed up if not
if ((httpproto=props.get(Config.CADI_PROTOCOLS))==null) {
if ((httpproto=props.get(Config.HTTPS_PROTOCOLS))==null) {
- props.put(Config.CADI_PROTOCOLS, (httpproto=SecurityInfo.HTTPS_PROTOCOLS_DEFAULT));
+ props.put(Config.CADI_PROTOCOLS, (httpproto=Config.HTTPS_PROTOCOLS_DEFAULT));
} else {
props.put(Config.CADI_PROTOCOLS, httpproto);
}
@@ -133,7 +132,7 @@ public class JettyServiceStarter<ENV extends RosettaEnv, TRANS extends Trans> ex
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);
+ String subprotocols = access().getProperty(Config.CADI_PROTOCOLS, Config.HTTPS_PROTOCOLS_DEFAULT);
service.setSubprotocol(subprotocols);
final String[] protocols = Split.splitTrim(',', subprotocols);
sslContextFactory.setIncludeProtocols(protocols);
@@ -215,7 +214,12 @@ public class JettyServiceStarter<ENV extends RosettaEnv, TRANS extends Trans> ex
}
}
try {
- register(service.registrants(port));
+ String no_register = env().getProperty("aaf_no_register",null);
+ if(no_register==null) {
+ register(service.registrants(port));
+ } else {
+ access().printf(Level.INIT,"'aaf_no_register' is set. %s will not be registered with Locator", service.app_name);
+ }
access().printf(Level.INIT, "Starting Jetty Service for %s, version %s, on %s://%s:%d", service.app_name,service.app_version,protocol,hostname,port);
//server.join();
} catch (Exception e) {