-
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
enhancement: issuing certificates via a pki backend without storing them? #2511
Comments
Hi @slingamn , Which storage backend and what do you consider "very large"? What performance problems are you seeing? Also, what version of Vault? You can remove expired certificates via hitting the pki/tidy path with |
This is Vault 0.6.2 with Zookeeper as the storage backend. I'm using |
Prior to Vault 0.7.0 the PKI backend issues leases for certs, which requires, in addition to storing the certs, keeping lease entries in storage and tracking state in memory. We made them unleased by default in 0.7.0 (although you need to rewrite the role, see upgrade notes) for exactly this kind of use-case, so upgrading will likely help. I should also note that anecdotal evidence suggests (but I don't have direct experience with) that ZK is one of the worst storage layers to use in terms of scaling. You may be required to stick with it but other backends will likely scale better. |
Thanks very much! I'll give that a try. |
Thanks very much for the suggestion --- the issues with memory consumption are gone under 0.7.0. However:
Would a no-store option be problematic for security reasons, or because of the added code complexity? |
It's not really problematic at all although it would make it tricky or impossible to support CRLs. Mostly just a matter of time. |
I can see a couple options:
1 seems viable by itself with 2 left as a follow-up. Thoughts? |
I think (1) is fine and not convinced (2) is ever necessary, so (1) is definitely fine by itself. |
Fixed in #2565 |
My use case is something like this. I'm using Vault's PKI backend to issue certificates. I'm relying on Vault's ability to protect the signing certificate at rest, and also on its ability to enforce
allowed_domains
for the leaf certificates. However, because all theallowed_domains
are non-sensitive, there is never a need to revoke an issued certificate, or to list the currently valid certificates. Meanwhile, I'm experiencing performance problems with my storage backend when many certificates are issued near-simultaneously, or a very large number of certificates are simultaneously valid.It would help a lot if I could tell Vault "issue a certificate according to role X, but don't store it". I can see a few implementation possibilities:
no_store
property of the role that can be set at role creation time (via an optional parameter to the/pki/roles
endpoint)allow_forgetting
property to the role that's set at creation time, then adding an optionalforget
parameter to the/pki/issue
endpointWould this contradict Vault's design goals? If not, would you be interested in a patch implementing one of these solutions? (Alternately, maybe you can see a way to avoid the problem entirely? :-)
Thanks for your time!
The text was updated successfully, but these errors were encountered: