use of com.unboundid.util.args.DNArgument in project ssam by pingidentity.
the class SSAMInstaller method addToolArguments.
/**
* {@inheritDoc}
*/
@Override
public void addToolArguments(ArgumentParser argumentParser) throws ArgumentException {
// //////////////////////////////////////////////////////////////////////////
// //
// Required arguments. //
// //
// //////////////////////////////////////////////////////////////////////////
serverRootArg = new FileArgument(null, "serverRoot", true, 1, "[directory]", "Absolute or relative path to the server to host SSAM, or path to a" + " Directory Server whose tools will be used to configure a backend server" + " server for SSAM access.", true, true, false, true);
argumentParser.addArgument(serverRootArg);
ldapPortArg = new IntegerArgument('p', "ldapPort", true, 1, "[port]", "LDAP or LDAPS port for communicating with the server.");
argumentParser.addArgument(ldapPortArg);
bindDNArg = new DNArgument('D', "bindDN", true, 1, "[dn]", "DN of an account used to manage the server's configuration.");
argumentParser.addArgument(bindDNArg);
bindPasswordArg = new StringArgument('w', "bindPassword", true, 1, "[password]", "Password of the account used to manage the server's configuration.");
argumentParser.addArgument(bindPasswordArg);
peopleBaseDNArg = new DNArgument(null, "peopleBaseDN", true, 1, "[dn]", "The pre-configured server base DN for user entries.");
argumentParser.addArgument(peopleBaseDNArg);
// //////////////////////////////////////////////////////////////////////////
// //
// SMTP arguments. //
// //
// //////////////////////////////////////////////////////////////////////////
// Required when configuring SSAM access.
smtpServerHostnameArg = new StringArgument(null, "smtpServerHostname", true, 1, "[hostname]", "Name of the SMTP host used to deliver email notifications.");
argumentParser.addArgument(smtpServerHostnameArg);
// Required when configuring SSAM access.
smtpSenderEmailAddressArg = new StringArgument(null, "smtpSenderEmailAddress", true, 1, "[email address]", "Email address used as the sender, when notifying users.");
argumentParser.addArgument(smtpSenderEmailAddressArg);
smtpServerUsernameArg = new StringArgument(null, "smtpServerUsername", false, 1, "[username]", "Username of the SMTP server account, if required by the SMTP server.");
argumentParser.addArgument(smtpServerUsernameArg);
smtpServerPasswordArg = new StringArgument(null, "smtpServerPassword", false, 1, "[password]", "Password of the SMTP server account, if required by the SMTP server.");
argumentParser.addArgument(smtpServerPasswordArg);
// SMTP username and password must be specified together.
argumentParser.addDependentArgumentSet(smtpServerUsernameArg, smtpServerPasswordArg);
argumentParser.addDependentArgumentSet(smtpServerPasswordArg, smtpServerUsernameArg);
// //////////////////////////////////////////////////////////////////////////
// //
// Optional connection arguments. //
// //
// //////////////////////////////////////////////////////////////////////////
useSSLArg = new BooleanArgument('Z', "useSSL", "Specifies use of SSL to secure communication with the server by" + " this tool, and also for SSAM.");
argumentParser.addArgument(useSSLArg);
useStartTLSArg = new BooleanArgument('q', "useStartTLS", "Use StartTLS to secure communication with the server by this tool," + " and also for SSAM.");
argumentParser.addArgument(useStartTLSArg);
trustAllArg = new BooleanArgument('X', "trustAll", "Trust all server SSL certificates.");
argumentParser.addArgument(trustAllArg);
trustStorePathArg = new FileArgument('P', "trustStorePath", false, 1, "[file]", "Path to the keystore used to establish trust between this tool" + " and the server. You can use /server-root/config/keystore.", true, true, true, false);
argumentParser.addArgument(trustStorePathArg);
ssamUserDNArg = new DNArgument(null, "ssamUserDN", false, 1, "[dn]", "DN of SSAM user account used to bind to the server.");
argumentParser.addArgument(ssamUserDNArg);
// Hidden for now until credentials management support is addressed.
ssamUserDNArg.setHidden(true);
ssamUserPasswordArg = new StringArgument(null, "ssamUserPassword", false, 1, "[password]", "Password for the SSAM user. If not specified in this option, nor " + "in a password file, a password will be generated if the SSAM user account " + "does not already exist.");
// todo: add to argument description later for proxy support
// "A specified password is required for Proxy installs."
argumentParser.addArgument(ssamUserPasswordArg);
ssamUserPasswordFileArg = new FileArgument(null, "ssamUserPasswordFile", false, 1, "[file]", "Path to the SSAM user password file.", true, true, true, false);
// todo: add to argument description later for proxy support-- ", required for Proxy installs"
argumentParser.addArgument(ssamUserPasswordFileArg);
// Hidden for now to obfuscate passwords being written to files in clear-text,
// since a generated password looks less like a password than a generated one.
ssamUserPasswordArg.setHidden(true);
ssamUserPasswordFileArg.setHidden(true);
argumentParser.addExclusiveArgumentSet(ssamUserPasswordArg, ssamUserPasswordFileArg);
resetSSAMUserPasswordArg = new BooleanArgument(null, "resetSSAMUserPassword", "Force a password reset of the SSAM user account if the SSAM user DN entry exists. " + "Not recommended if the SSAM user account is replicated, because the same password " + "must be used in all installations, instead the correct user password or the pin " + "file should be obtained from another server.");
argumentParser.addArgument(resetSSAMUserPasswordArg);
// SSL method and trust arguments are exclusive.
argumentParser.addExclusiveArgumentSet(useSSLArg, useStartTLSArg);
// If using StartTLS or SSL, if a trust store path is not specified,
// a trust-all trust manager will be used by this tool and configured
// for SSAM.
argumentParser.addExclusiveArgumentSet(trustAllArg, trustStorePathArg);
// The user must specify a trust argument if using SSL.
argumentParser.addDependentArgumentSet(useSSLArg, trustAllArg, trustStorePathArg);
argumentParser.addDependentArgumentSet(useStartTLSArg, trustAllArg, trustStorePathArg);
// //////////////////////////////////////////////////////////////////////////
// //
// Optional reCAPTCHA arguments. //
// //
// //////////////////////////////////////////////////////////////////////////
// Optional site key used for the Google reCAPTCHA human verification.
reCaptchaSiteKeyArg = new StringArgument(null, "reCaptchaSiteKey", false, 1, "[key]", "Optional site key used for the Google reCAPTCHA human verification.");
argumentParser.addArgument(reCaptchaSiteKeyArg);
// The secret key used for the Google reCAPTCHA human verification. May be empty.
reCaptchaSecretKeyArg = new StringArgument(null, "reCaptchaSecretKey", false, 1, "[key]", "Optional secret key used for the Google reCAPTCHA human verification.");
argumentParser.addArgument(reCaptchaSecretKeyArg);
// Both must be specified, or neither.
argumentParser.addDependentArgumentSet(reCaptchaSiteKeyArg, reCaptchaSecretKeyArg);
argumentParser.addDependentArgumentSet(reCaptchaSecretKeyArg, reCaptchaSiteKeyArg);
// //////////////////////////////////////////////////////////////////////////
// //
// Optional Ping arguments. //
// //
// //////////////////////////////////////////////////////////////////////////
pingAccessLogoutURLArg = new StringArgument(null, "pingAccessLogoutURL", false, 1, "[url]", "Optional URL used for logging out of PingAccess, for example https://<hostname>/pa/oidc/logout." + " Required if deploying SSAM with Ping. Note that the full URL must be used.");
argumentParser.addArgument(pingAccessLogoutURLArg);
pingFederateLogoutURLArg = new StringArgument(null, "pingFederateLogoutURL", false, 1, "[url]", "optional URL used for logging out of PingFederate, for example https://<hostname>:<PingFederatePort>/ext/logout." + " Required if deploying SSAM with Ping. Note that the full URL must be used.");
argumentParser.addArgument(pingFederateLogoutURLArg);
// Both must be specified, or neither.
argumentParser.addDependentArgumentSet(pingAccessLogoutURLArg, pingFederateLogoutURLArg);
argumentParser.addDependentArgumentSet(pingFederateLogoutURLArg, pingAccessLogoutURLArg);
// //////////////////////////////////////////////////////////////////////////
// //
// Miscellaneous optional arguments. //
// //
// //////////////////////////////////////////////////////////////////////////
noDeployArg = new BooleanArgument(null, "noDeploy", "Indicates that the server will be configured for" + " SSAM access, but SSAM will not be deployed on the server.");
argumentParser.addArgument(noDeployArg);
debugArg = new BooleanArgument(null, "debug", "Debug this installer application.");
argumentParser.addArgument(debugArg);
debugArg.setHidden(true);
}
Aggregations