-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
/pki/tidy returns errors indicating that certificates are nil on some pki mounts #4177
Comments
I must admit I'm pretty stumped -- as you saw in the code, this should only happen if the actual underlying bytes for the value at that location in storage are empty. I think probably in this case we could warn and continue rather than error out, but if this function is seeing nil bytes, and fetching is seeing the full certs...I'm not sure. What storage are you using? Any chance that you're getting intermittent errors from it? |
See #4214 - if you have better ideas for how to handle this, without understanding why your entry is nil in the first place, let me know. |
Closing due to #4214, if you prefer another approach I can re-open. |
@jefferai sounds good! If I think of any other way to handle it then I'll let you know |
Environment:
Vault Config File:
Startup Log Output:
Partial output:
Expected Behavior:
Running
curl -X POST --header '...' https://${vault-server-address}:8200/v1/pki/tidy -d '{"safety_buffer": "1440h", "tidy_cert_store": true}'
should successfully clean up old certificates.Actual Behavior:
It looks like there's a single pki mount that is unable to tidy up all of the certificates. We keep seeing an error
Having read the code, I can't figure out why we'd be seeing an issue where certificates are nil, especially when you can read the cert with the cli or by curling the pki mount after the tidy operation fails. All I can think of is that Vault is not actually able to read all of the certificates from the store or the large amount of leases that we have is somehow interfering.
Steps to Reproduce:
See above
Important Factoids:
References:
The text was updated successfully, but these errors were encountered: