-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
security: support certificate revocation #29641
Comments
We probably need to support the standard protocols for compatibility with arbitrary user CAs, but we could also build in a system table to store revoked cert IDs similar to the |
It is time to revive this issue since we're planning on this for 20.2. Here are the step forwards:
Once we have some input we can move forward with a preliminary RFC. |
@vladdy says: "I want my certs inside the cluster's logical data. If the revocation data becomes unavailable, it's OK if it doesn't work. I prefer not to use k8s configmaps, and I prefer |
"prefer to fetch rev lists". The rest clearly captures my thoughts on the subject. Additionally, it is required to have a metric around how long ago the successful rev list update was (if the db will handle that) so that I can be aware if there are any problems with regular updates. |
The danger with URL-based revocation is that the HTTP request to retrieve the revocation list must be secured too. Then there's a chicken-and-egg problem. How does the server ascertain if the http request is secure? Consider the hypothetical scenario:
The option to disable TLS on that url is unpalatable because it introduces security vulnerabilitites. I wonder what the best practices are? |
I have a couple of issues with fetching the revocation list from a URL:
I would prefer CockroachDB expose a SQL interface for revoking certificates, and stores that data within the cluster. |
@DuskEagle assuming the SQL interface was available in either case, any motivation to prefer in-cluster storage over files in a directory outside of the cluster? |
A server restart is too heavy-handed. We support online certificate reloading (#1674), so let's suppose we used that. What are the potential problems with this approach?
|
@knz "The danger with URL-based revocation is that the HTTP request to retrieve the revocation list must be secured too" I don't think so. The list is signed by CA. I like the idea of having the list inside of the db as well as that allows us to have one process which handles the update for entire cluster instead of each node being updated separately. @DuskEagle the problem with storing static data reliable has been more or less solved. To begin we could start with some object storage as the hosting. |
I'm not sure I understand this. Are you proposing using the SQL interface to write data to a directory outside of the cluster? Whatever this data directory location is, it needs to be available to all nodes, including nodes that are launched in the future. That seems complicated compared to storing it within the cluster.
I'm thinking not just of the Cockroach Cloud team, but also of regular users of CockroachDB, who will also have to set up this static hosting for their CRL. This is also more complicated for them. CockroachDB is already a database for storing data, what's the advantage of relying on blob storage for this? |
If you host a real CA (i.e. an enterprise environment), you already publish your CRL anyway. This usually happens via HTTP(S). That's also the point why CRDB needs to just fetch it instead of relying on something what would be updating the db. This approach is easier to implement and integrate with. |
Just wanted to add that for something without the distribution point, we could implement something like |
Okay, that makes sense. How would you feel if CRDB supported fetching the CRL from an HTTP(S)/s3/nodelocal endpoint, and wrote the contents to a system table like @bdarnell suggested? This handles integrating with existing CA setups, "split-brain" problems where different nodes see different CRLs, and allows us, if needed, to revoke certificates even when the CRL location is unavailable? |
@DuskEagle that's what I fully support, if it is possible. |
From a industry standard position, the most widely deployed case is that of web browsers which generally reach out for CRLs but fail open if they don't hear back in time. Chrome addressed this issue by pushing CRLSets (https://dev.chromium.org/Home/chromium-security/crlsets) via application updates to ensure they could ensure key certificate revocation occurs in a manner that does not depend on the certs that might themselves be revoked. I like the approach @DuskEagle collected with the caveat that the operator should be able to configure if they want to always query the CRL or have that occur as a scheduled event to reduce operational load by shedding some security. |
Example Go code found here: |
RFC here: #50602 |
This adds support for certificate revocation for organizations who run an OCSP server for their CA. Closes cockroachdb#29641 Release note (security update): Certificate revocation is now supported via OSCP and the setting `security.ocsp.mode`.
This adds support for certificate revocation for organizations who run an OCSP server for their CA. Closes cockroachdb#29641 Release note (security update): Certificate revocation is now supported via OSCP and the setting `security.ocsp.mode`.
53218: security: Add support for OCSP r=knz a=bdarnell This adds support for certificate revocation for organizations who run an OCSP server for their CA. Closes #29641 Release note (security update): Certificate revocation is now supported via OSCP and the setting `security.ocsp.mode`. Still a WIP: includes the plumbing and the implementation, but I'm still working on tests. Co-authored-by: Ben Darnell <[email protected]>
Certificate are not currently checked for revocation, the only ways to revoke a specific certificate are:
client
certs only (we don't have alogin
attribute either)The former means that the user cannot be reused. The latter is incredibly disruptive.
We should support checking all certificates against CRLs (certificate revocation list, see RFC 5280, section 5).
There are a few issues:
cockroach cert
commands do not keep track of issued certificates, making it impossible to revoke themcockroach cert
toolsSummary: RFC required.
edit: RFC here 50602
CC: @kannanlakshmi, @bdarnell
The text was updated successfully, but these errors were encountered: