summaryrefslogtreecommitdiffstats
path: root/cadi/core
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-07-12 17:01:40 -0500
committerInstrumental <jonathan.gathman@att.com>2019-07-12 17:01:46 -0500
commit1338680ef142f9a33ee32a00b07c7d2ae658cb3a (patch)
tree4b05af9107eecf94a043db218edd01ca3d3080e5 /cadi/core
parentd0d6604a0371457d84eceb56d9fff668e865253f (diff)
Adjust Agent for none K8s
Issue-ID: AAF-857 Change-Id: Iae6ab3800376465deb69d735d1ab38c931b46688 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi/core')
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/CmdLine.java6
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java3
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java1
3 files changed, 8 insertions, 2 deletions
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/CmdLine.java b/cadi/core/src/main/java/org/onap/aaf/cadi/CmdLine.java
index 68a8db05..0a1f38db 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/CmdLine.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/CmdLine.java
@@ -113,7 +113,8 @@ public class CmdLine {
// Jonathan. Oh, well, Deployment services need this behavior. I will put this code in, but leave it undocumented.
// One still needs access to the keyfile to read.
// July 2016 - thought of a tool "CMPass" to regurgitate from properties, but only if allowed.
- } else if ("regurgitate".equalsIgnoreCase(args[0]) && args.length>2) {
+ } else if (("regurgitate".equalsIgnoreCase(args[0]) || "undigest".equalsIgnoreCase(args[0]))
+ && args.length>2) {
try {
Symm symm;
FileInputStream fis = new FileInputStream(args[2]);
@@ -188,7 +189,7 @@ public class CmdLine {
System.out.flush();
return;
} catch (IOException e) {
- System.err.println("Cannot regurgitate password");
+ System.err.println("Cannot undigest password");
System.err.println(" \""+ e.getMessage() + '"');
}
} else if ("encode64".equalsIgnoreCase(args[0]) && args.length>1) {
@@ -334,6 +335,7 @@ public class CmdLine {
System.out.println(" digest [<passwd>|-i|] <keyfile> (Encrypts Password with \"keyfile\"");
System.out.println(" if passwd = -i, will read StdIn");
System.out.println(" if passwd is blank, will ask securely)");
+ System.out.println(" undigest <enc:...> <keyfile> (Decrypts Encoded with \"keyfile\")");
System.out.println(" passgen <digits> (Generate Password of given size)");
System.out.println(" urlgen <digits> (Generate URL field of given size)");
System.out.println(" encode64 <your text> (Encodes to Base64)");
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java b/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java
index 2655b4ce..48f5e2d1 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/config/Config.java
@@ -228,6 +228,9 @@ public class Config {
public static final String AAF_URL_CM_DEF = "https://AAF_LOCATE_URL/AAF_NS.cm:"+AAF_DEFAULT_API_VERSION;
public static final String AAF_URL_HELLO = "aaf_url_hello";
public static final String CM_TRUSTED_CAS = "cm_trusted_cas";
+ // let NS Owners choose with <ns>.certman aaf ignoreIPs" to ignoreIP Check for Configs
+ // Probably only want to allow in a DEV Env.
+ public static final String CM_ALLOW_IGNORE_IPS="cm_allow_ignore_ips";
public static final String PATHFILTER_URLPATTERN = "pathfilter_urlpattern";
public static final String PATHFILTER_STACK = "pathfilter_stack";
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java
index 967bf221..859f9a25 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java
@@ -235,6 +235,7 @@ public class JU_CmdLine {
" digest [<passwd>|-i|] <keyfile> (Encrypts Password with \"keyfile\"" + lineSeparator +
" if passwd = -i, will read StdIn" + lineSeparator +
" if passwd is blank, will ask securely)" + lineSeparator +
+ " undigest <enc:...> <keyfile> (Decrypts Encoded with \"keyfile\")" + lineSeparator +
" passgen <digits> (Generate Password of given size)" + lineSeparator +
" urlgen <digits> (Generate URL field of given size)" + lineSeparator +
" encode64 <your text> (Encodes to Base64)" + lineSeparator +