bjornsnoen / minica-api

GNU General Public License v3.0
15 stars 2 forks source link

Wildcard domains don't cover root #3

Closed johanjanssens closed 2 years ago

johanjanssens commented 2 years ago

Hi Bjorn, thanks for the wonderful little tool. Been implementing it in https://github.com/joomlatools/joomlatools-server and working great!

Little question, when generating a wildcard domain certificate for example for *.foo.test the certificate DNS name is set to *.foo.test which means the certificate works for any subdomain, like www.foo.test but not root, foo.test. For that to work foo.test would need to be added as an additional DNS Name.

Is this in anyway supported?

bjornsnoen commented 2 years ago

Hi! Very cool to hear how you're using it! That use case isn't supported, no. I remember running into something similar on a different project and I just manually added the root domain in addition to the wildcard domain there. If you think this is a useful feature I can look into adding functionality for it.

johanjanssens commented 2 years ago

Thanks for your reply, much appreciated.

Minica-api works great! Integration with Traefik is a breeze and the api endpoints you added make running it in a multi-container setup very easy. We added a little CLI commands that calls it through curl. Works perfect.

We solved the wildcard issue by generating both a www.foo.test and foo.test certificates for now, it would handy if it would indeed be possible to generate a real wildcard domain that includes both the root and subdomains, if you could add that, that would be great.

Thanks again for building this and making it available.

bjornsnoen commented 2 years ago

@johanjanssens I've just merged this feature, the docker image is building right now. The README has been updated to show how to use the feature. Hope this is implementation is satisfactory, and sorry it took so long to implement. Really appreciate the feedback :+1: