@@ -175,7+175,7 @@ public class NotifyApprovals extends Batch {
email.addTo(user.email());
msg.line(LINE);
msg.line("Why are you receiving this Notification?\n");
email.addTo(user.email());
msg.line(LINE);
msg.line("Why are you receiving this Notification?\n");
- if(isSupervisor) {
+ if(isSupervisor) {
msg.line("%sYou are the supervisor of one or more employees who need access to tools which are protected by AAF. " +
"Your employees may ask for access to various tools and applications to do their jobs. ASPR requires "
+ "that you are notified and approve their requests. The details of each need is provided when you click "
msg.line("%sYou are the supervisor of one or more employees who need access to tools which are protected by AAF. " +
"Your employees may ask for access to various tools and applications to do their jobs. ASPR requires "
+ "that you are notified and approve their requests. The details of each need is provided when you click "
@@ -183,7+183,7 @@ public class NotifyApprovals extends Batch {
msg.line("Your participation in this process fulfills the ASPR requirement to re-authorize users in roles on a regular basis.\n\n");
}
msg.line("Your participation in this process fulfills the ASPR requirement to re-authorize users in roles on a regular basis.\n\n");
}
- if(isOwner) {
+ if(isOwner) {
msg.line("%sYou are the listed owner of one or more AAF Namespaces. ASPR requires that those responsible for "
+ "applications and their access review them regularly for accuracy. The AAF WIKI page for AT&T is https://wiki.web.att.com/display/aaf. "
+ "More info regarding questions of being a Namespace Owner is available at https://wiki.web.att.com/pages/viewpage.action?pageId=594741363\n",isSupervisor?"2) ":"");
msg.line("%sYou are the listed owner of one or more AAF Namespaces. ASPR requires that those responsible for "
+ "applications and their access review them regularly for accuracy. The AAF WIKI page for AT&T is https://wiki.web.att.com/display/aaf. "
+ "More info regarding questions of being a Namespace Owner is available at https://wiki.web.att.com/pages/viewpage.action?pageId=594741363\n",isSupervisor?"2) ":"");
@@ -208,9+208,9 @@ public class NotifyApprovals extends Batch {
@@ -92,55+92,55 @@ public class LocalCA extends CA {
serial = new BigInteger(64,random);
serial = new BigInteger(64,random);
- if(params.length<1 || params[0].length<2) {
+ if(params.length<1 || params[0].length<2) {
throw new IOException("LocalCA expects cm_ca.<ca name>=org.onap.aaf.auth.cm.ca.LocalCA,<full path to key file>[;<Full Path to Trust Chain, ending with actual CA>]+");
}
// Read in the Private Key
String configured;
File f = new File(params[0][0]);
throw new IOException("LocalCA expects cm_ca.<ca name>=org.onap.aaf.auth.cm.ca.LocalCA,<full path to key file>[;<Full Path to Trust Chain, ending with actual CA>]+");
throw new CadiException("AAF Component must include the " + Config.AAF_COMPONENT + " property, <fully qualified service name>:<full deployed version (i.e. 2.1.3.13)");
}
final String[] version = Split.splitTrim('.', locator_deploy[1]);
throw new CadiException("AAF Component must include the " + Config.AAF_COMPONENT + " property, <fully qualified service name>:<full deployed version (i.e. 2.1.3.13)");
}
final String[] version = Split.splitTrim('.', locator_deploy[1]);
- if(version==null || version.length<2) {
+ if(version==null || version.length<2) {
throw new CadiException("AAF Component Version must have at least Major.Minor version");
}
app_name = Define.varReplace(locator_deploy[0]);
throw new CadiException("AAF Component Version must have at least Major.Minor version");
}
app_name = Define.varReplace(locator_deploy[0]);
@@ -83,7+83,7 @@ public abstract class AbsService<ENV extends BasicEnv, TRANS extends Trans> exte
access.log(Level.INFO, "AAF Alternative OAUTH2 requires",Config.AAF_ALT_OAUTH2_TOKEN_URL, "OAuth2 tests to", tokenURL, "will not be conducted... Continuing");
} else {
try {
access.log(Level.INFO, "AAF Alternative OAUTH2 requires",Config.AAF_ALT_OAUTH2_TOKEN_URL, "OAuth2 tests to", tokenURL, "will not be conducted... Continuing");
private static void directedPut(final PropAccess orig, final Symm symm, final Map<String,String> main, final Map<String,String> secured, final String tag, final String value) throws IOException {
private static void directedPut(final PropAccess orig, final Symm symm, final Map<String,String> main, final Map<String,String> secured, final String tag, final String value) throws IOException {
- for(Entry<String, ?> es : persist.tmap.entrySet()) {
+ for(Entry<String, ?> es : persist.tmap.entrySet()) {
++metrics.mexists;
Persistable<?> p = (Persistable<?>)es.getValue();
++metrics.mexists;
Persistable<?> p = (Persistable<?>)es.getValue();
- if(p.checkSyncTime()) {
- if(p.count()==0) {
+ if(p.checkSyncTime()) {
+ if(p.count()==0) {
++metrics.mremoved;
persist.tmap.remove(es.getKey());
access.printf(Level.DEBUG, "Persist: removed cached item %s from memory\n", es.getKey());
} else {
p.clearCount();
}
++metrics.mremoved;
persist.tmap.remove(es.getKey());
access.printf(Level.DEBUG, "Persist: removed cached item %s from memory\n", es.getKey());
} else {
p.clearCount();
}
- } else if(Files.exists(p.path())) {
+ } else if(Files.exists(p.path())) {
}
}
}
}
@@ -220,19+220,19 @@ public abstract class Persist<T,CT extends Persistable<T>> extends PersistFile {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
- if(attrs.isRegularFile()) {
+ if(attrs.isRegularFile()) {
++metrics.dexists;
try {
long exp = persist.readExpiration(file)*1000; // readExpiration is seconds from 1970
++metrics.dexists;
try {
long exp = persist.readExpiration(file)*1000; // readExpiration is seconds from 1970
- if(now > exp) { // cover for bad token
+ if(now > exp) { // cover for bad token
sb.append("\n\tFile ");
sb.append(file.getFileName());
sb.append(" expired ");
sb.append(Chrono.dateTime(new Date(exp)));
persist.deleteFromDisk(file);
++metrics.dremoved;
sb.append("\n\tFile ");
sb.append(file.getFileName());
sb.append(" expired ");
sb.append(Chrono.dateTime(new Date(exp)));
persist.deleteFromDisk(file);
++metrics.dremoved;
- } else if(exp > dayFromNow) {
+ } else if(exp > dayFromNow) {
sb.append("\n\tFile ");
sb.append(file.toString());
sb.append(" data corrupted.");
sb.append("\n\tFile ");
sb.append(file.toString());
sb.append(" data corrupted.");
@@ -273,14+273,14 @@ public abstract class Persist<T,CT extends Persistable<T>> extends PersistFile {
// We want to print some activity of Persistence Check at least hourly, even if no activity has occurred, but not litter the log if nothing is happening
boolean go=false;
Level level=Level.WARN;
// We want to print some activity of Persistence Check at least hourly, even if no activity has occurred, but not litter the log if nothing is happening
boolean go=false;
Level level=Level.WARN;
- if(access.willLog(Level.INFO)) {
+ if(access.willLog(Level.INFO)) {
go = true;
level=Level.INFO;
go = true;
level=Level.INFO;
- } else if(access.willLog(Level.WARN)) {
+ } else if(access.willLog(Level.WARN)) {
go = metrics.mremoved>0 || metrics.dremoved>0 || --hourly <= 0;
}
go = metrics.mremoved>0 || metrics.dremoved>0 || --hourly <= 0;
}
- if(go) {
+ if(go) {
access.printf(level, "Persist Cache: removed %d of %d items from memory and %d of %d from disk",
public <T> T readDisk(final RosettaDF<T> df, final byte[] cred, final String filename,final Holder<Path> hp, final Holder<Long> hl) throws CadiException {
}
public <T> T readDisk(final RosettaDF<T> df, final byte[] cred, final String filename,final Holder<Path> hp, final Holder<Long> hl) throws CadiException {
- if(!dir.exists())throw new APIException("Schema Directory " + schemaDir + " does not exist. You can set this with " + EnvFactory.SCHEMA_DIR + " property");\r
+ if(!dir.exists())throw new APIException("Schema Directory " + schemaDir + " does not exist. You can set this with " + EnvFactory.SCHEMA_DIR + " property");\r
FileInputStream[] fis = new FileInputStream[filenames.length];\r
Source[] sources = new Source[filenames.length];\r
File f; \r
FileInputStream[] fis = new FileInputStream[filenames.length];\r
Source[] sources = new Source[filenames.length];\r