Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-IssuedRequest implement order by property parameter #88

Open
PatrickOnGit opened this issue Aug 28, 2019 · 7 comments
Open

Get-IssuedRequest implement order by property parameter #88

PatrickOnGit opened this issue Aug 28, 2019 · 7 comments
Labels
enhancement This is a new feature request. Not a bug really.

Comments

@PatrickOnGit
Copy link

Hi Vadims

as discussed, I propose to implement a new parameter to allow for sorting.

-OrderBy
defines the property used to sort. Only some attributes are possible, specified as enum. Default order by descending, default property RequestID
-Ascending
change the order to be Descending.
-Descending
may not be required if default is assumed.

Alternative:

-OrderByDescending
Sets the order and property. An alias "-Descending" should be allowed.
-OrderByAscending
Sets the order and property. An alias "-Ascending" should be allowed.

@Crypt32
Copy link
Collaborator

Crypt32 commented Aug 29, 2019

I believe, that default sorting should be ascending. At least, it is convenient.

@Crypt32 Crypt32 added the enhancement This is a new feature request. Not a bug really. label Aug 29, 2019
@PatrickOnGit
Copy link
Author

PatrickOnGit commented Sep 2, 2019

Dear Vadims,
well, the first thing I always do, GUI or command line is setting descending, newest to older.
this way I get the latest issued requests.
When troubleshooting I search for the newest issued request, when checking if the CA had issued something and therefore is working, I'm interested in the newest processed certificates or failures. Otherwise I have to use a date where to start.
The only time I use Ascending order is when syncing CA DB with a SQL DB for reporting.
At least for me defaulting to Ascending is much less convenient and would require 9 out of 10 times an additional parameter to sort descending, newest to oldest.
best regards
Patrick

@Crypt32
Copy link
Collaborator

Crypt32 commented Sep 2, 2019

the first thing I always do, GUI or command line is setting descending, newest to older

is it common? I personally, rarely use sorting in MMC.

When troubleshooting I search for the newest issued request, when checking if the CA had issued something and therefore is working, I'm interested in the newest processed certificates or failures.

Relying on RequestID may have side effects and works stable only for pending requests. For other cert states this may not work. When certificate request is submitted, a unique request ID is associated with particular request entry. And when request state is changed (issued, revoked, denied) its ID is not changed, thus after changing the state won't place request as topmost entry in particular folder in all cases. Thus, different columns should be used by default in every request category to reflect latest actions.

@PatrickOnGit
Copy link
Author

I'll avoid using MMC, as it is slow, but yes, usually I sort it first using RequestID. knowing it might not be the most ideal start.

You're right, depending what you are looking for, different attributes are off interest, and even exist.

Now, nothing prevents using different attribute for sorting for different views:

  • Issued Request.ResolvedWhen or NotBefore
  • Revoked Request.RevokedWhen
  • Pending Request.SubmittedWhen
  • Failed Request.SubmittedWhen
  • Any (unspecified) RequestID

@PatrickOnGit
Copy link
Author

Hello Vadims

is there an intend to work on this request?
If I would implement this, would you allow this to be merged into your code? Of course only if the code withstand your quality requirements. I would not want to spend time on this with no chance to be used in your module.

@Crypt32
Copy link
Collaborator

Crypt32 commented Aug 4, 2020

Not yet. I will pass this to next major update. I spent too much time on OCSP and DCOM stuff. It is till in my todo list.

@PatrickOnGit
Copy link
Author

thank you for your quick feedback.
let me know if I can be of any help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is a new feature request. Not a bug really.
Projects
None yet
Development

No branches or pull requests

2 participants