-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add new API to PKI to list revoked certificates #17779
Add new API to PKI to list revoked certificates #17779
Conversation
- A new API that will return the list of serial numbers of revoked certificates on the local cluster.
|
||
| Method | Path | | ||
|:-------|:------------------| | ||
| `LIST` | `/certs/revoked` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `LIST` | `/certs/revoked` | | |
| `LIST` | `/certs/revoked` | |
I'm sorry, it just annoys me :-D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops yup will fix this, thanks for catching it!
@@ -1216,3 +1216,12 @@ func (sc *storageContext) writeAutoTidyConfig(config *tidyConfig) error { | |||
|
|||
return sc.Storage.Put(sc.Context, entry) | |||
} | |||
|
|||
func (sc *storageContext) listRevokedCerts() ([]string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah cool, we should use this elsewhere eventually :)
requireSuccessNonNilResponse(t, resp, err, "error revoking cert 2") | ||
|
||
// Test that we get back the expected serial numbers. | ||
resp, err = CBList(b, s, "certs/revoked") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanna also make sure we see these serial numbers in the regular list too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By regular list are you referring to LIST /certs
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pefect, looks great!
A new API that will return the list of serial numbers of revoked certificates on the local cluster.