-
Notifications
You must be signed in to change notification settings - Fork 29
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
Role breaks without warning (and continues on "normally") if SAN misconfigured #103
Comments
I agree that the whole setup is very fragile and hard to debug. The You cannot use CIDR prefixes in certificates that way, so at least you know where the error originates from. |
Your system is still much more robust than any others I've seen. Does bash read the whole Maybe Also, is there an easy way to regenerate realms/certs that I'm missing? Currently, I'm manually deleting the realm on the host and in the secrets dir, and re-running. (For example changing the SAN doesn't trigger the role to regenerate the certs) |
The Maybe the whole setup could fare better as a separate project with kind of a client-server architecture... But there are a few of these already, with focus on a server side, but not on a client side (PKI realms). And implementing this differently would require changes on Ansible Controller that I'm trying to avoid. Oh well, maybe some other time. Currently there's no other way to recreate the certificates than removing the PKI realm directory. It should be safe, everything that's inside is expected to be re-created by the role or sourced from the I wanted the |
Keep an eye on https://github.com/kubernetes/contrib/tree/master/ansible (and the contrib repo there in general). They have mentioned working on simple go tools to help with cert generation, and I bet we'll see them sometime this year |
Wow, their To be honest, X.509 certificate generation is a solved problem; it can be done by one shell command at this point. The issue is sane management of key/certificate pair in a filesystem, so that other software can get to it. Another anchor, certbot or cfssl won't help when their result is dumped on the user to deal with, each tool having its own idea of how the directory layout should look like. |
Do you know of any open source certificate management tools? It seems like there must be already a project for this. Then you have a debops role/set-of-roles to bootstrap a certificate server, then the rest of certificates are handled through an API that debops-pki-v2.0 can call |
And yeah, I've been working on combining their ansible roles with yours for a nicer bootstrap from zero to kubernetes experience. Your ansible is much cleaner, but you also have the advantage of debian-only |
Sure.
The last one is probably the best bet at the moment. DebOps can securely install it right now using When Vault is available, |
Small note on
Beside of @drybjed mentioned EJBCA, DogTag and Hashicorp Vault there is As well there are some ACME "derivate" in Debian. |
I had a typo in a script of mine that accidentally passed a CIDR ip range instead of an IP as a subject_alt_name.
Everything seemed to run normally, except the generated certs never appeared on the host. The request file was left as request.pem.tmp. The issue is that the role appears to complete successfully, influencing later roles, and making debugging quite difficult.
Result after completing a broken run:
I would guess the issue is in one of these lines , given that that's where request.pem.tmp is created.
Maybe there is a better way to get the exit status from
certtool
, or perhaps first check the validity of the generated file?The exact line in my gnutls.conf that caused the error was:
ip_address = "123.123.123.123/16"
when it should have beenip_address = "123.123.123.123"
The text was updated successfully, but these errors were encountered: