mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
RFE: create a symlink for each SAN #267
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TobyGoodwin on GitHub (Dec 11, 2017).
First, thanks for dehydrated - we use it extensively at my company.
I have a suggestion for a feature enhancement. Suppose you have a certificate with two names in it, so
domains.txtlooks something like this:then your apache (nginx / whatever) configuration will look something like
So this configuration snippet has to know that
firstis the certificate's Common Name. This is a violation of the "separation of concerns" principle, and can actually be quite a nuisance if you want to move things around at a later date.Idea: create a symlink for every SAN. For example
I could probably find time to implement this, if a PR were likely to be accepted :)
@TobyGoodwin commented on GitHub (Dec 11, 2017):
Incidentally, one of my colleagues pointed out a potential problem if
other.example.comalready exists and is a directory (presumably from some earlier configuration):ln -swill create a link inside the directory, namedother.example.com/first.example.com. So it's important to useln -sTwhich turns off the normal magic behaviour when the last argument is a directory.@jobe1986 commented on GitHub (Dec 11, 2017):
Another potential issue may be where you have a host name that appears as a SAN on more then one separate certificate. For example the certificate I use for openldap and the certificate I use for postfix/dovecot both include the servers own host name as well as their own individual names. Therefore the servers own host name as a SAN on both certs could not be symlinked to both certs.
@lukas2511 commented on GitHub (Dec 14, 2017):
For me it was always common practice that a virtual host in my webserver configuration mostly equals the altnames in a given certificate. I don't really see the reason behind making a big certificate to be used by multiple virtual hosts, as you said: seperation of concerns ;)
In the old times when certificates had to be registered by hand and cost a lot of money this made sense, but nowadays even for test-environments you can get a certificate with specific altnames for free in seconds.
If you really really want this I'd suggest adding a
deploy_certhook which creates the symlink. You can extract the domain names from thealtnamesenvironment variable.Should be as easy as something like this: