-
Notifications
You must be signed in to change notification settings - Fork 31
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
Acme parsing error - Multiple certificationResolvers
#62
Comments
Thank you for reporting. How can I reproduce it? |
I actually just updated traefik to version 2.10. After renewing of the certs this happened. I validated that I can extract them with I have no clue where to start how to simulate that. If you would lead me where this output is coming from "Could not read private key from" and where it is executed I will try to get more info why it is happening. |
Most likely it's this line:
|
Thanks I will try in few days. I will investigate and post results. |
@petrleocompel Do you have any updates? |
I will have to try tomorrow. Also certs should be renewing these days. Lets see if DNS challenge got back to normal and can be parsed. |
@petrleocompel Any updates on this? |
Sorry. Yes. So It few days ago it was looking like it still has issues. Currently I seems to be working fine. No clue why this happened. (There was no internet/power/system outage) Just started working and since then I have not done anything. |
Finally !! Found some more details. 1. There was a Selinux file permission problem.All my mounts have Since I always tested in [root@srv mail]# docker exec -it -u 102 mail-mailserver-1 bash
postfix@mail:/$ cd /etc/letsencrypt/acme/
bash: cd: /etc/letsencrypt/acme/: Permission denied [root@srv traefik]# ls -la
drw-------. 4 root root 4096 Dec 11 14:52 acme
[root@srv traefik]# ls -la acme/
-rw-------. 1 root root 65427 Jan 11 23:37 acme.json So after fixing this ... 2. Still happensI tested under
postfix@mail:/$ /usr/local/bin/dumpcerts.traefik.v2.sh /etc/letsencrypt/acme/acme.json /tmp/
Could not read private key from <stdin>
40179710417F0000:error:1E08010C:DECODER routines:OSSL_DECODER_from_bio:unsupported:../crypto/encode_decode/decoder_lib.c:101:No supported data to decode. Input type: PEM So investigated more... Finally I stumbled across the
click happened two So the problem is ... Multiple
It took me a year to figure this out.... |
certificationResolvers
@petrleocompel since you have the test case you are probably in the best postition to fix this. Would you like to submit a PR? |
@AndrewSav Probably I will. But is there a reason why to use custom script and not to use something like -> https://github.com/ldez/traefik-certs-dumper Currently in the script I do not know how would I fix that. |
I have to guess here, but I think the reasons could be that the output of that tool is not what mailserver wants, and that it's not a bash script which mailserver seems to use for scripting.
What is that you do not know? May be I can help, what is the problem?
It's very hard for me to tell because I have no idea of what input and output are. Can you post your file please? You can substitute all values for "redacted", we just need the structure. |
I was using it as fallback ssl export. Just exported the certs, renamed and moved to "fallback ssl folder" and mailserver found them. ./traefik-certs-dumper file --domain-subdir=true --source ./acme.json --version v2
cd dump/xx.xx/
mv certificate.crt cert.pem
mv privatekey.key privkey.pem
cd ..
cd mail.xx.xx/
mv privatekey.key privkey.pem
mv certificate.crt cert.pem
# example only
mv dump .../xxx/ssl-mount The whole script could be replaced by pre-bundled tool.
As explained
And
Not sure why do we even need to extract the
{
"http-acme": {
"Account": {
"Email": "redacted",
"Registration": {
"body": {
"status": "valid",
"contact": [
"mailto:redacted"
]
},
"uri": "redacted"
},
"PrivateKey": "redacted",
"KeyType": "4096"
},
"Certificates": [
{
"domain": {
"main": "mail.redacted"
},
"certificate": "redacted",
"key": "redacted",
"Store": "default"
}
]
},
"dns-acme": {
"Account": {
"Email": "redacted",
"Registration": {
"body": {
"status": "valid",
"contact": [
"mailto:redacted"
]
},
"uri": "redacted"
},
"PrivateKey": "redacted",
"KeyType": "4096"
},
"Certificates": [
{
"domain": {
"main": "redacted",
"sans": [
"*.redacted"
]
},
"certificate": "redacted",
"key": "redacted",
"Store": "default"
},
{
"domain": {
"main": "redacted"
},
"certificate": "redacted",
"key": "redacted",
"Store": "default"
}
]
}
} |
I think just by "not exporting" the |
@AndrewSav I commented out the line mailserver/rootfs/usr/local/bin/dumpcerts.traefik.v2.sh Lines 154 to 155 in 8cb6ee2
restarted docker container and it works.
❗ but the "extraction" of
|
I've create mailserver2/debian-mail-overlay#28 to add traefik-cert-dumper into the based image. Let's see how it goes, we also will need to build a new version of mailserver based on that image if it gets merged. After that we can switch to using that instead of the script. |
Classification
Reproducibility
Docker information
Description
Wildcard letsencrypt certificate cannot throws error in parsing.
Steps to reproduce
Expected results
Parsing correctly PEM
Actual results
Acme certificate is present in JSON but cannot be parsed..
Debugging information
dump.log
Configuration (docker-compose.yml, traefik.toml...etc)
docker-compose.yml
The text was updated successfully, but these errors were encountered: