#787 pki command-line tool should return 'invalid command message'
Closed: fixed 5 years ago by cipherboy. Opened 10 years ago by mharmsen.

While working on TRAC Ticket #689 - Unable to add KRA users to a group using CA admin cert, it was discovered that previously an invalid command threw an exception:

# pki -d /tmp/tmp.N0YVPa7edJ/nssdb
-n "PKI Administrator for rhts.eng.bos.redhat.com"
-c Password -t kra group-add-member Administrators
KRA_adminV
PKIException: CertProcessor?: authority is null

While this issue has been fixed such that the invalid command group-add-member no longer throws an exception, it does display a rather confusing error message as it appears to mis-interpret the invalid group-add-member command as the valid group-add command:

# pki -d /tmp/client_db -n "PKI Administrator for example.com"
-t kra group-add-member Administrators foobar 
Error: Missing required option: description
usage: group-add <Group ID> [OPTIONS...]
    --description <description>   Description

Ideally, a message should be displayed which informs the user that group-add-member is an invalid command.


[06/04/2014] - Moving to Milestone 10.3 due to schedule restrictions.

Metadata Update from @mharmsen:
- Issue set to the milestone: UNTRIAGED

7 years ago

This has been fixed as far as I can tell:

[root@idm ~]# pki group-add-member
WARNING: pki group has been deprecated. Use pki <subsystem>-group instead.
Error: Invalid module "group-add-member".
[root@idm ~]# pki ca-group-add-member # Known failure
Error: Invalid module "ca-group-add-member".
[root@idm ~]# pki ca-group-add # Known success
Error: No Group ID specified.

Metadata Update from @cipherboy:
- Custom field reviewer adjusted to None
- Custom field version adjusted to None
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1354

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Login to comment on this ticket.

Metadata