-
Notifications
You must be signed in to change notification settings - Fork 166
Management interface: add /cert-status-by-serial/ endpoint #252
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
Conversation
|
I forgot: if Pebble doesn't know the certificate, or can't parse the serial as hex, it will return a 404 with no content. |
|
Looks promising! One interesting thing to get also (to build a complete OCSP responder for instance) would be the date since when the certificate has been revoked on Pebble side. It could be retrieved as a fourth parameter in the JSON response, if the status is I think it is doable to store this date in the What do you think of that @felixfontein? |
|
Yes, that should be doable. I would include a full timestamp and not just a date, though. And also the revocation code used. I'm trying it now... |
|
Now revocation timestamp and reason are stored with the revoked certificate, and returned by the endpoint (the reason only when available): |
|
I changed it a little so that the timestamp is returned in UTC: |
|
BTW (and unrelated): all requests to the management interface have a |
@felixfontein Good catch! #253 I'll try to review this PR in the next couple of days. |
9a39d1f to
bf6b045
Compare
|
Rebased to remove conflicts with #254. |
cpu
left a comment
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.
Thanks @felixfontein, this is a nice bit of work :-)
I left a few minor comments but I'm happy with the overall design. Thanks again!
|
@cpu thanks for your feedback! I hope I've adjusted everything correctly. At least it still works in my tests :) |
cpu
left a comment
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.
Thanks for integrating my last round of feedback @felixfontein. I left a couple of small comments. I think once those are resolved I'm ☑️ on this branch.
Co-Authored-By: Daniel McCarney <[email protected]>
Co-Authored-By: Daniel McCarney <[email protected]>
cpu
left a comment
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.
🎉
|
Thanks again @felixfontein. My goal is to cut a new Pebble release that will have this commit and some of the other new work next week (hopefully Monday). |
|
@cpu thanks again for reviewing and merging! :) |
https://github.com/letsencrypt/pebble/releases/tag/v2.2.1 🎉 |
This adds a
/cert-status-by-serial/endpoint to the management interface. The certificate is identified by its serial number (in hexadecimal). (It can be extracted with OpenSSL viaopenssl x509 -in cert.pem -noout -text | sed -En 's/.*Serial Number.*\(0x([0-9a-f]+)\)/\1/p'.) The endpoint returns the certificate itself (in PEM format), the serial (hexadecimal) and the revocation status (ValidorRevoked) as JSON.Example usage:
CC @adferrand