From 969de61a99e22244ef1a678b248a899798c3c2f3 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 14 Jul 2015 11:17:30 -0400 Subject: Added pki-tps-profile man page. A new man page has been added for the pki tps-profile CLI. The CLI has been modified to refer to the new man page. Some other man pages have been cleaned up as well. https://fedorahosted.org/pki/ticket/1271 --- base/java-tools/man/man1/pki-ca-profile.1 | 54 ++++---- base/java-tools/man/man1/pki-tps-profile.1 | 152 +++++++++++++++++++++ .../netscape/cmstools/tps/profile/ProfileCLI.java | 5 + .../cmstools/tps/profile/ProfileModifyCLI.java | 2 +- 4 files changed, 185 insertions(+), 28 deletions(-) create mode 100644 base/java-tools/man/man1/pki-tps-profile.1 (limited to 'base/java-tools') diff --git a/base/java-tools/man/man1/pki-ca-profile.1 b/base/java-tools/man/man1/pki-ca-profile.1 index 851e7d7e3..74b9b51b8 100644 --- a/base/java-tools/man/man1/pki-ca-profile.1 +++ b/base/java-tools/man/man1/pki-ca-profile.1 @@ -1,7 +1,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH pki-profile 1 "Sep 30, 2014" "version 10.2" "PKI Profile Management Commands" Dogtag Team +.TH pki-ca-profile 1 "Sep 30, 2014" "version 10.2" "PKI CA Profile Management Commands" Dogtag Team .\" Please adjust this date whenever revising the man page. .\" .\" Some roff macros, for reference: @@ -15,18 +15,18 @@ .\" .sp insert n+1 empty lines .\" for man page specific macros, see man(7) .SH NAME -pki-profile \- Command-Line Interface for managing Certificate System profiles. +pki-profile \- Command-Line Interface for managing Certificate System CA profiles. .SH SYNOPSIS .nf \fBpki\fR [CLI options] \fBca-profile\fR \fBpki\fR [CLI options] \fBca-profile-find\fR [command options] -\fBpki\fR [CLI options] \fBca-profile-show \fR [command options] -\fBpki\fR [CLI options] \fBca-profile-add \fR [command options] -\fBpki\fR [CLI options] \fBca-profile-mod \fR [command options] -\fBpki\fR [CLI options] \fBca-profile-del \fR [command options] -\fBpki\fR [CLI options] \fBca-profile-enable \fR [command options] -\fBpki\fR [CLI options] \fBca-profile-disable \fR [command options] +\fBpki\fR [CLI options] \fBca-profile-show \fR [command options] +\fBpki\fR [CLI options] \fBca-profile-add \fR [command options] +\fBpki\fR [CLI options] \fBca-profile-mod \fR [command options] +\fBpki\fR [CLI options] \fBca-profile-del \fR [command options] +\fBpki\fR [CLI options] \fBca-profile-enable \fR [command options] +\fBpki\fR [CLI options] \fBca-profile-disable \fR [command options] .fi .SH DESCRIPTION @@ -39,35 +39,36 @@ The \fBpki ca-profile\fR commands provide command-line interfaces to manage prof This command is to list the profiles. .RE .PP -\fBpki\fR [CLI options] \fBca-profile-show \fR [command options] +\fBpki\fR [CLI options] \fBca-profile-show \fR [command options] .RS 4 This command is to view the details of a profile. .RE .PP -\fBpki\fR [CLI options] \fBca-profile-add\fR [command options] +\fBpki\fR [CLI options] \fBca-profile-add \fR [command options] .RS 4 This command is to create a new profile. .RE .PP -\fBpki\fR [CLI options] \fBca-profile-mod \fR [command options] +\fBpki\fR [CLI options] \fBca-profile-mod \fR [command options] .RS 4 This command is to modify an existing profile. .RE .PP -\fBpki\fR [CLI options] \fBca-profile-del\fR [command options] +\fBpki\fR [CLI options] \fBca-profile-del \fR [command options] .RS 4 This command is to delete a profile. .RE .PP -\fBpki\fR [CLI options] \fBca-profile-enable\fR [command options] +\fBpki\fR [CLI options] \fBca-profile-enable \fR [command options] .RS 4 This command is to enable a profile. .RE .PP -\fBpki\fR [CLI options] \fBca-profile-disable\fR [command options] +\fBpki\fR [CLI options] \fBca-profile-disable \fR [command options] .RS 4 This command is to disable a profile. .RE + .SH OPTIONS The CLI options are described in \fBpki\fR(1). @@ -75,24 +76,24 @@ The CLI options are described in \fBpki\fR(1). To view available profile commands, type \fBpki ca-profile\fP. To view each command's usage, type \fB pki ca-profile- \-\-help\fP. -All the ca-profile commands require agent authentication. +All the ca-profile commands require CA agent authentication. .SS Viewing the profiles -.B pki ca-profile-find +.B pki ca-profile-find -The \fBstart\fR and \fBsize\fR options can be used to specify the beginning and the size of the list. +The results can be paged using the \fB--start\fR and \fB--size\fR options described in \fBpki\fR(1). To view the contents of a profile: A set of profile inputs, profile outputs, authenticators, policies and constraints are defined in a profile. These contents can be viewed using the following command: -.B pki ca-profile-show +.B pki ca-profile-show To store the output of the above operation, the output option must be specified. -.B pki ca-profile-show --output +.B pki ca-profile-show --output This output file can be used for modifying the profile. It can be used as a template for certificate enrollment as well but, a more suitable template can be fetched using the \fBpki cert-request-profile-show\fR command. @@ -100,35 +101,35 @@ The \fBpki cert-request-profile-show\fR command does not require an agent/admini .SS Add/Modify/Delete a profile -.B pki ca-profile-add +.B pki ca-profile-add -The contents of the input file must be in an XML format returned by the profile-show command. +The contents of the input file must be in an XML format returned by the ca-profile-show command. This data will be marshaled by the CLI client to create a new profile in the CA. The profile must be disabled before it is modified. It must be enabled after modification to be used for certificate enrollment. To modify an existing profile: -.B pki ca-profile-mod +.B pki ca-profile-mod -The profile data can be retrieved using the profile-show command and after editing the file, +The profile data can be retrieved using the ca-profile-show command and after editing the file, it can be provided to the profile-mod command to modify an existing profile. To delete a profile in the CA: -.B pki ca-profile-del +.B pki ca-profile-del .SS Enabling/Disabling a profile in the CA To enable a profile in the CA: -.B pki ca-profile-enable +.B pki ca-profile-enable A profile must be enabled before it can be used. To disable a profile in the CA: -.B pki ca-profile-disable +.B pki ca-profile-disable A profile must be disabled before it can be modified. @@ -144,5 +145,4 @@ Abhishek Koneru . Copyright (c) 2014 Red Hat, Inc. This is licensed under the GNU General Public License, version 2 (GPLv2). A copy of this license is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. .SH SEE ALSO -.BR pkispawn(8), .BR pki(1) diff --git a/base/java-tools/man/man1/pki-tps-profile.1 b/base/java-tools/man/man1/pki-tps-profile.1 new file mode 100644 index 000000000..2a524b4b4 --- /dev/null +++ b/base/java-tools/man/man1/pki-tps-profile.1 @@ -0,0 +1,152 @@ +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH pki-tps-profile 1 "Jul 14, 2015" "version 10.2" "PKI TPS Profile Management Commands" Dogtag Team +.\" Please adjust this date whenever revising the man page. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for man page specific macros, see man(7) +.SH NAME +pki-tps-profile \- Command-Line Interface for managing Certificate System TPS profiles. + +.SH SYNOPSIS +.nf +\fBpki\fR [CLI options] \fBtps-profile\fR +\fBpki\fR [CLI options] \fBtps-profile-find\fR [command options] +\fBpki\fR [CLI options] \fBtps-profile-show \fR [command options] +\fBpki\fR [CLI options] \fBtps-profile-add --input \fR [command options] +\fBpki\fR [CLI options] \fBtps-profile-mod \ --action \fR [command options] +\fBpki\fR [CLI options] \fBtps-profile-mod \ --input \fR [command options] +\fBpki\fR [CLI options] \fBtps-profile-del \fR [command options] +.fi + +.SH DESCRIPTION +.PP +The \fBpki tps-profile\fR commands provide command-line interfaces to manage profiles on the TPS. + +.PP +\fBpki\fR [CLI options] \fBtps-profile-find\fR [command options] +.RS 4 +This command is to list the profiles. +.RE +.PP +\fBpki\fR [CLI options] \fBtps-profile-show \fR [command options] +.RS 4 +This command is to view the details of a profile. +.RE +.PP +\fBpki\fR [CLI options] \fBtps-profile-add --input \fR [command options] +.RS 4 +This command is to create a new profile. +.RE +.PP +\fBpki\fR [CLI options] \fBtps-profile-mod \ --action \fR [command options] +.RS 4 +This command is to change the status of a profile. +.RE +.PP +\fBpki\fR [CLI options] \fBtps-profile-mod \ --input \fR [command options] +.RS 4 +This command is to modify an existing profile. +.RE +.PP +\fBpki\fR [CLI options] \fBtps-profile-del \fR [command options] +.RS 4 +This command is to delete a profile. +.RE + +.SH OPTIONS +The CLI options are described in \fBpki\fR(1). + +.SH OPERATIONS + +To view available profile commands, type \fBpki tps-profile\fP. To view each command's usage, type \fB pki tps-profile- \-\-help\fP. + +All the tps-profile commands require TPS admin or agent authentication. + +.SS Listing profiles + +To list all profile: + +.B pki tps-profile-find + +The results can be paged using the \fB--start\fR and \fB--size\fR options described in \fBpki\fR(1). + +.SS Viewing a profile + +To view the status and properties of a profile: + +.B pki tps-profile-show + +To store the output of the above operation into a file: + +.B pki tps-profile-show --output + +.SS Adding a profile + +To add a new profile, prepare an input file specifying the +profile properties in the following format: + +.IP +.nf + + + + ... + ... + + +.fi + +.PP +The profile properties are described in \fBpki-tps-profile\fR(5). +Then execute the following command: + +.B pki tps-profile-add --input + +.SS Changing profile status + +To change the profile status execute the following command: + +.B pki tps-profile-mod --action + +Available actions for admins: submit, cancel. +Available actions for agents: approve, reject. +Available actions for users with both admin and agent rights: enable, disable. + +.SS Modifying a profile + +To modify a profile, first disable the profile using the \fBtps-profile-mod +--action disable\fP command. Then download the current profile properties +using the \fBtps-profile-show --output\fP command. Make the modifications in +the file, then upload the updated file using the following command: + +.B pki tps-profile-mod --input + +Finally, the profile should be re-enabled using the \fBtps-profile-mod +--action enable\fP command. + +.SS Deleting a profile + +To delete a profile, first disable the profile using the \fBtps-profile-mod +--action disable\fP command, then execute: + +.B pki tps-profile-del + +.SH AUTHORS +Endi S. Dewata . + +.SH COPYRIGHT +Copyright (c) 2015 Red Hat, Inc. This is licensed under the GNU General Public License, version 2 (GPLv2). A copy of this license is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. + +.SH SEE ALSO +.BR pki(1), +.BR pki-tps-profile(5) diff --git a/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileCLI.java index b27578ffc..7c68c8ebb 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileCLI.java @@ -46,6 +46,11 @@ public class ProfileCLI extends CLI { addModule(new ProfileMappingCLI(this)); } + @Override + public String getManPage() { + return "pki-tps-profile"; + } + public void execute(String[] args) throws Exception { client = parent.getClient(); diff --git a/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileModifyCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileModifyCLI.java index 87580cdaf..c042552ab 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileModifyCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/profile/ProfileModifyCLI.java @@ -50,7 +50,7 @@ public class ProfileModifyCLI extends CLI { } public void createOptions() { - Option option = new Option(null, "action", true, "Action: update (default), approve, reject, enable, disable."); + Option option = new Option(null, "action", true, "Action: update (default), submit, cancel, approve, reject, enable, disable."); option.setArgName("action"); options.addOption(option); -- cgit