-
Notifications
You must be signed in to change notification settings - Fork 2
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
Upgrade to single ACME default certificate #72
Conversation
- Convert deprecated settings to v3 - (Re)generate config files for v3 - Mark config files for v3 - v2 -> v3 automated upgrade procedure
Remove entryPoints where a string value was used. Only a list value is allowed. The legacy string value produces duplicates of router configuration.
Only redirectscheme middleware is required by the http:// entrypoint.
Remove the tls.domains section from *-https routers, to avoid conflicts with other certificate settings. This change opens the way to certificates with SANs (wildcard included). BREAKING CHANGE: Change the way routes are expressed in Traefik's router configuration.
The rule syntax used by APIs is compatible with v3 and does not need the "v2" mark to require the deprecated parsing method. This fix applies the "v2" mark to custom routers definitions.
Use the same openssl command of the action validator to extract the Common Name of the certificate.
Switch to defaultGeneratedCert by merging all certificate names into a single certificate request. Names from HTTP routes are not considered.
If user's home is not the default /home, or if the volume has a custom path the acme.json file is not found. Move acme.json storage out of volume and make it accessible to actions from the module state/ directory.
Python library files do not need the executable bit.
3b2ea1c
to
d90942b
Compare
if fqdn in cert_helpers.read_custom_cert_names(): | ||
response = { | ||
"fqdn": fqdn, | ||
"type": "custom", | ||
"obtained": True, | ||
} | ||
elif fqdn in cert_helpers.read_default_cert_names(): | ||
response = { | ||
"fqdn": fqdn, | ||
"type": "internal", | ||
"obtained": cert_helpers.has_acmejson_name(fqdn), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if a custom certificate with the same name as one requested via set-certificate
is uploaded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should override the one from LE. At least from my tests it seems Traefik gives it priority over the default generated cert.
- Reimplement {set,get,delete}-certificate actions to request a single certificate with SANs. Use Traefik's defaultGeneratedCert. - Change list-certificates to list the ACME certificate host names and the custom/uploaded certs. BREAKING CHANGE: the Traefik configuration does not create certificate routers any more. Action data format is unchanged.
97b6175
to
54c98e5
Compare
This PR upgrades to Traefik v3 and changes the certificate configuration. While it aims to fix a bug of duplicated items from HTTP routers, it is the starting point for other bug fixes and new features.
.v2
files/dirs.Refs