-
Notifications
You must be signed in to change notification settings - Fork 461
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
Certs import flawed, no import of new certs during runtime #207
Comments
Any comments? This is a real bug we should try to solve. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Still relevant. |
Putting it on my list to look at. With the new 7.0.x release coming soon I'm doing some housekeeping as I prepare for it. |
One thought: Maybe the .md5 file could be saved to a location that gets discarded when the container is destroyed? Maybe /tmp/? It's not as good as checking the source of truth (the key store), but may be an easy improvement? |
@jacobalberty did you ever find the chance to think about this in more detail? Beyond the issue here I wonder if the whole method of importing a certificate could be improved so that the provided certificates are the primary source of truth, i.e. are regularly checked and re-imported. This would solve another issue I had to face over the years: Expired and reissued certificates (Let's Encrypt certs are only valid for 3m) are not automatically imported by the running docker container. Of course the container restart can be handled from outside but in good faith of containerization an internal less-destructive solution would be a lot cleaner and prefered. Proposed solution:
What do you think? I'd be happy to provide a PR. |
@jacobalberty another ping.
|
Posting this here for reference. I am using dnsrobocert to generate certificate files and a script similar to the one linked can be added to |
Hey guys! After setting up the system and playing around a bit (everything seems fine, incl. SSL certificate by Let's Encrypt) I went to test the emergency case. Deleted everything (
docker-compose down -v --rmi all --remove-orphans
) and restored as if I migrated to a new host.The containers came back up and I was able to restore an autobackup. So far perfect. Sadly the previously provided certificate is not used anymore. I am back at the snakeoil certificate.
In the logs I can find:
Assumption/Question: After checking the sourcecode of the import_cert script I realize that I could have deleted the md5 file to solve the "bug" on my system.
Please be aware that I changed the default
docker-compose.yml
to mount the certs folder locally, see below.To summarize: This seems to be a functional bug. The cert file shouldn't only be checked against the md5 but also against the internal cert. Is there any reason to doing the md5 check instead of always importing the cert? What if the md5 file existed from another source?
All the best!
Host operating system
Ubuntu
What tag are you using
latest (UniFi 5.10.24)
Complete docker-compose.yml
Note: Pay attention to the local mount of
cert
, might be related.The text was updated successfully, but these errors were encountered: