#992 pki cert-request-profile-find doesn't display list of profiles by default
Closed: Fixed None Opened 9 years ago by mrniranjan.

pki cert-request-profile-find doesn't display list of profile , it only displays the list of profiles when we specify at least one profile id

[root@dhcp207-176 dogtag]# pki cert-request-profile-find 
Error: Missing Profile ID.
usage: cert-request-profile-find <Profile ID> [OPTIONS...]
    --help            Show help options
    --size <size>     Page size
    --start <start>   Page start
[root@dhcp207-176 dogtag]# pki cert-request-profile-find --size 10
Error: Missing Profile ID.
usage: cert-request-profile-find <Profile ID> [OPTIONS...]
    --help            Show help options
    --size <size>     Page size
    --start <start>   Page start

When profile name is given it displays list of profiles,

[root@dhcp207-176 dogtag]# pki cert-request-profile-find caUserCert
------------------
27 entries matched
------------------
  Profile ID: caUserCert   
  Name: Manual User Dual-Use Certificate Enrollment
  Description: This certificate profile is for enrolling user certificates.

  Profile ID: caUserSMIMEcapCert
  Name: Manual User Dual-Use S/MIME capabilities Certificate Enrollment
  Description: This certificate profile is for enrolling user certificates with S/MIME capabilities extension - OID: 1.2.840.113549.1.9.15

  Profile ID: caDualCert   
  Name: Manual User Signing & Encryption Certificates Enrollment
  Description: This certificate profile is for enrolling dual user certificates. It works only with Netscape 7.0 or later.

  Profile ID: AdminCert
  Name: Manual Administrator Certificate Enrollment
  Description: This certificate profile is for enrolling Administrator's certificates suitable for use by clients such as browsers.

  Profile ID: caSignedLogCert
  Name: Manual Log Signing Certificate Enrollment
  Description: This profile is for enrolling audit log signing certificates

  Profile ID: caTPSCert
  Name: Manual TPS Server Certificate Enrollment
  Description: This certificate profile is for enrolling TPS server certificates.

It should display list of profiles by default when no Profile ID is mentioned.

Also what should be the output when the profileID is given, should it still display all the list of profiles. ?


Also i found that if i specify any random name in pki cert-request-profile-find dfakdlfkal i get the list of profiles , it would be better if the default is to list first 20 profiles by default (which pki cert-find does)

Per CS/DS meeting of 5/5/2014, it was suggested that this command is exhibiting correct behavior.

However, after looking at this ticket more closely, it actually appears to consist of an RFE, and suggests a potential problem:

(1) RFE: By default, display list of profiles rather than usage
         NOTE:  Only display the first 20 profiles (similar to pki cert-find).
         (this is based upon the observation that if any random name is provided,
          it simply dumps the entire list of profiles.)
(2) When a valid profileID is given, what should be displayed?
    (Currently, it just displays the entire list of profiles; if this command
     were similar to 'pki cert-find' which requires no arguments then this
     would make sense, but since a Profile ID is required, doesn't it make
     sense that this command would display something other than a list of
     profiles?)

I will leave this bug in TRIAGE until next week when we can determine if it should be broken into two separate tickets and potentially applied to separate milestones.

All the *-find commands other than cert-request-profile-find take no compulsory arguments.
I think we should not have a <Profile ID> argument for this command. (Getting information about a specific profile can be done using the cert-request-profile-show command).

I think the primary purpose of the command is to list all the available profiles.
There are no parameters to filter a list of profiles.
The output generated currently, is consistent with *-find commands.
It prints the total number of profiles present in the system - 27 entries matched, and then displays the first 20 profiles when the size is not specified.


Number of entries returned 20

So the fix for this ticket would be - updating the --help message to print usage as
usage: cert-request-profile-find [OPTIONS...]
--help Show help options
--size <size> Page size
--start <start> Page start

Do not accept any argument(like in cert-find), so a call like - pki cert-request-profile-find dfakdlfkal doesn't list any profiles.

Per the previous comment, moving this to 10.2 (May), and assigning it to mharmsen as I may have created the error during a previous check-in.

checked into 'master':
- 4214fb63e8fbee3e096c92b0555c9b8c3759b975

Metadata Update from @mrniranjan:
- Issue assigned to mharmsen
- Issue set to the milestone: 10.2 - 07/14 (July)

7 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/1558

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