Bug 1777032 - pki kra-key-mod help text requires --status
Summary: pki kra-key-mod help text requires --status
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pki-core
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Endi Sukma Dewata
QA Contact: PKI QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-26 19:13 UTC by Alex Scheel
Modified: 2020-04-28 15:46 UTC (History)
3 users (show)

Fixed In Version: pki-core-10.6-8020020191213175607.c7c3114f
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:45:20 UTC
Type: ---
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:1644 0 None None None 2020-04-28 15:46:04 UTC

Description Alex Scheel 2019-11-26 19:13:17 UTC
Description of problem:

Per Geetika:

2. Change in behavior of help messages.

Earlier, the way it used to work is it always show all the "--help"
options.

# pki kra-key-mod --help
usage: kra-key-mod <Key ID> --status <status> [OPTIONS...]
    --help              Show help options
    --status <status>   Status of the key.
                        Valid values: active, inactive

Now, we have to give status option and it's value,  then only "--help"
option works. A new user might find it difficult to know possible value
of status.

_cmd 1_: # pki -d /opt/pki/certdb -P http -p 21080 -h pki1.example.com
-c SECret.123 -n "PKI KRA Administrator for Example.Org" kra-key-mod --help

SEVERE: MissingOptionException: Missing required option: status


_cmd 2:_ # pki -d /opt/pki/certdb -P http -p 21080 -h pki1.example.com
-c SECret.123 -n "PKI KRA Administrator for Example.Org" kra-key-mod
--status --help

SEVERE: MissingArgumentException: Missing argument for option: status

_cmd 3:_ # pki -d /opt/pki/certdb -P http -p 21080 -h pki1.example.com
-c SECret.123 -n "PKI KRA Administrator for Example.Org" kra-key-mod
--status abc --help

usage: kra-key-mod <Key ID> --status <status> [OPTIONS...]
    --debug             Run in debug mode.
    --help              Show help message.
    --status <status>   Status of the key.
                        Valid values: active, inactive
 -v,--verbose           Run in verbose mode.



Version-Release number of selected component (if applicable):

10.8.0-alpha0

How reproducible:

Very

Steps to Reproduce:

1. See above

Actual results:

Doesn't display help text without --status

Expected results:

Should display help text without --status.

Additional info:

Detected by gating.

Comment 1 Endi Sukma Dewata 2019-12-05 17:53:06 UTC
Fixed in master branch (10.8):
* https://github.com/dogtagpki/pki/commit/ffe79e85b9e4abc114c42f8181dd8a190f5e65b4

Comment 3 Pritam Singh 2020-01-16 10:56:02 UTC
Tested in version:

[root@pki1 ~]# rpm -qi pki-kra
Name        : pki-kra
Version     : 10.8.0
Release     : 0.4.module+el8.2.0+5228+a2bc7b32
Architecture: noarch
Install Date: Fri 10 Jan 2020 10:53:42 PM IST
Group       : Unspecified
Size        : 536468
License     : GPLv2 and LGPLv2
Signature   : RSA/SHA256, Sat 14 Dec 2019 02:59:03 AM IST, Key ID 199e2f91fd431d51
Source RPM  : pki-core-10.8.0-0.4.module+el8.2.0+5228+a2bc7b32.src.rpm
Build Date  : Sat 14 Dec 2019 12:26:29 AM IST
Build Host  : arm64-036.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://www.dogtagpki.org/
Summary     : PKI KRA Package


Test Procedure:
https://bugzilla.redhat.com/show_bug.cgi?id=1777032#c0

Proof of concept:
[root@pki1 ~]# pki -d /root/nssdb/ -c SECret.123 -P http -p 21080 -n "PKI KRA Administrator for Example.Org" kra-key-mod --help
usage: kra-key-mod <Key ID> --status <status> [OPTIONS...]
    --debug             Run in debug mode.
    --help              Show help message.
    --status <status>   Status of the key.
                        Valid values: active, inactive
 -v,--verbose           Run in verbose mode.


Now, The fix can display help text without --status parameter.
Hence, Marking this Bugzilla as Verified.

Comment 5 errata-xmlrpc 2020-04-28 15:45:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1644


Note You need to log in before you can comment on or make changes to this bug.