diff options
Diffstat (limited to 'auth/auth-cmd')
10 files changed, 26 insertions, 30 deletions
diff --git a/auth/auth-cmd/pom.xml b/auth/auth-cmd/pom.xml index 6de09de5..2e7cb2d9 100644 --- a/auth/auth-cmd/pom.xml +++ b/auth/auth-cmd/pom.xml @@ -18,7 +18,7 @@ <parent> <groupId>org.onap.aaf.authz</groupId> <artifactId>authparent</artifactId> - <version>2.1.16-SNAPSHOT</version> + <version>2.1.17-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> @@ -58,22 +58,6 @@ </roles> </developer> <developer> - <name>Gabe Maurer</name> - <email>gabe.maurer@att.com</email> - <organization>ATT</organization> - <roles> - <role>Developer</role> - </roles> - </developer> - <developer> - <name>Ian Howell</name> - <email>ian.howell@att.com</email> - <organization>ATT</organization> - <roles> - <role>Developer</role> - </roles> - </developer> - <developer> <name>Sai Gandham</name> <email>sai.gandham@att.com</email> <organization>ATT</organization> diff --git a/auth/auth-cmd/src/assemble/auth-cmd.xml b/auth/auth-cmd/src/assemble/auth-cmd.xml index 013010b5..ba312423 100644 --- a/auth/auth-cmd/src/assemble/auth-cmd.xml +++ b/auth/auth-cmd/src/assemble/auth-cmd.xml @@ -42,6 +42,10 @@ <include>org.onap.aaf.authz:aaf-misc-env</include> <include>org.onap.aaf.authz:aaf-misc-rosetta</include> <include>jline:jline</include> + <include>javax.xml.bind:jaxb-api</include> + <include>org.glassfish.jaxb:jaxb-runtime</include> + <include>com.sun.istack:istack-commons-runtime</include> + <include>javax.activation:javax.activation-api</include> </includes> </dependencySet> diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Grant.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Grant.java index eb206970..3770a58c 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Grant.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Grant.java @@ -74,7 +74,7 @@ public class Grant extends Cmd { Future<RolePermRequest> frpr = null; - String[] roles = args[idx++].split(","); + String[] roles = args[idx].split(","); String strA; String strB; for (String role : roles) { @@ -110,7 +110,6 @@ public class Grant extends Cmd { pw().println(" Accepted, but requires Approvals before actualizing"); } else { error(frpr); - idx=Integer.MAX_VALUE; } } } diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java index 1a410088..9ef4c00a 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java @@ -132,11 +132,22 @@ public class Cred extends Cmd { // IMPORTANT! We do this backward, because it is looking for string // %1 or %13. If we replace %1 first, that messes up %13 + String var; for(int i=vars.size()-1;i>0;--i) { - text = text.replace("%"+(i+1), (i<10?" ":"") + i+") " + vars.get(i)); + var = vars.get(i); + if(aafcli.isTest()) { + int type = var.indexOf("U/P"); + if(type>0) { + var = var.substring(0,type+4) + " XXXX/XX/XX XX:XX UTC XXXXXXXXXXXXXXXXXX"; + } + } + text = text.replace("%"+(i+1), (i<10?" ":"") + i+") " + var); } text = text.replace("%1",vars.get(0)); + if(aafcli.isTest()) { + + } pw().println(text); } else if (fp.code()==406 && option==1) { pw().println("You cannot delete this Credential"); diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Delg.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Delg.java index f5cb4499..6e967286 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Delg.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Delg.java @@ -72,7 +72,7 @@ public class Delg extends BaseCmd<User> { if (option<2 && args.length>idx) { Date date; try { - date = Chrono.dateOnlyFmt.parse(args[idx++]); + date = Chrono.dateOnlyFmt.parse(args[idx]); } catch (ParseException e) { throw new CadiException(e); } diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListActivity.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListActivity.java index 30c71e55..485e6d18 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListActivity.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListActivity.java @@ -47,9 +47,8 @@ public class ListActivity extends Cmd { } @Override - public int _exec(int _idx, final String ... args) throws CadiException, APIException, LocatorException { - int idx = _idx; - final String user = fullID(args[idx++]); + public int _exec(final int idx, final String ... args) throws CadiException, APIException, LocatorException { + final String user = fullID(args[idx]); return same(new Retryable<Integer>() { @Override public Integer code(Rcli<?> client) throws CadiException, APIException { diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListApprovals.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListApprovals.java index 765bd0aa..17f3002a 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListApprovals.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListApprovals.java @@ -50,10 +50,10 @@ public class ListApprovals extends Cmd { @Override public int _exec(int _idx, final String ... args) throws CadiException, APIException, LocatorException { - int idx = _idx; + int idx = _idx; final String type = args[idx++]; int option = whichOption(options,type); - String value = args[idx++]; + String value = args[idx]; final String fullValue; if (option != 2) { fullValue = fullID(value); diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForCreds.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForCreds.java index 07a19d36..8502f398 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForCreds.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForCreds.java @@ -60,7 +60,7 @@ public class ListForCreds extends Cmd { int idx = idxParam; final int option = whichOption(options, args[idx++]); final String which = options[option]; - final String value = args[idx++]; + final String value = args[idx]; return same(new Retryable<Integer>() { @Override public Integer code(Rcli<?> client) throws CadiException, APIException { diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForPermission.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForPermission.java index 0ab24900..6b9c83f7 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForPermission.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForPermission.java @@ -64,7 +64,7 @@ public class ListForPermission extends Cmd { String type = args[idx++]; String instance = args[idx++]; if ("\\*".equals(instance))instance="*"; - String action = args[idx++]; + String action = args[idx]; if ("\\*".equals(action))action="*"; try { Future<Users> fp = client.read( diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java index 6fdf1628..13f0a00d 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/ListForRoles.java @@ -47,8 +47,7 @@ public class ListForRoles extends Cmd { @Override public int _exec(int _idx, final String ... args) throws CadiException, APIException, LocatorException { - int idx = _idx; - final String role = args[idx++]; + final String role = args[_idx]; return same(new Retryable<Integer>() { @Override public Integer code(Rcli<?> client) throws CadiException, APIException { |