CLI progress

Cantor, Scott cantor.2 at osu.edu
Tue Sep 30 21:38:53 EDT 2014


I just checked in a bunch of shell scripts for command line tools, mostly
all just running a driver script to locate bin/java and run a class with
the jars on the classpath.

Rod, I don't know if you're maintaining a file manifest somewhere? I'm
assuming probably in WiX if nothing else, but the ones I just did are for
bash, so they wouldn't need to be installed by the MSI anyway.

Need to look at batch files for Windows, but I haven't done that yet.

What I did was create a Java command line engine to run any web-based URL
we want and plug in parameter processing for each tool by inheriting a
base class I wrote. The actual command line shell script will just be a 3
liner like the aacli and status examples I just did.

For now I'm just using java.net.URL() to open connections because the main
goal here is just to talk to localhost in 99% of cases, but it can be
overridden to use a different URL base, plus there's support for Java's
trustStore system properties for https access.


e.g. to use the testbed:

bin/aacli.sh -u https://localhost:8443 -ts idp-userfacing.p12 -tt PKCS12
-tp changeit -n jdoe -r https://sp.example.org --saml2

Works pretty well. Any admin flows we build will be really easy to build a
command line driver for, just takes a few minutes declaring JCommander
parameters and implementing a method that transforms the parameters passed
into a URL query string to append.


-- Scott



More information about the dev mailing list