ldez / traefik-certs-dumper

Dump ACME data from Traefik to certificates
Other
462 stars 30 forks source link

Exporting sans wildcard cert into a file name, replacing star (*). #177

Closed maxwowpow closed 2 years ago

maxwowpow commented 2 years ago

Currently, the filenames generated are

*.domain.com.key and *.domain.com.crt

Even though it's legit on linux/mac - * is used as a glob for searching etc. Notorious Windows does not allow stars at all, so it's problematic to work with GIT cross-platform.

As this is a one-way dump and the actual information in stored inside the files, it would be useful to support broader scenarios and environments by generating filenames without the *.

My proposal would be _SANS_.domain.com. or _WILDCARD_.domain.com

maxwowpow commented 2 years ago

Seems like this already supported to some extent.

https://github.com/ldez/traefik-certs-dumper/blob/master/dumper/v2/filename_windows.go

ldez commented 2 years ago

Hello,

I have already applied a substitution on Windows because it's the only OS that requires this kind of fix. I don't think that kind of substitution is expected on the other OS.

Storing certificates to use them again to a local computer (Windows) doesn't seem to be a good idea. What context asks to use production certificates in a local environment?

maxwowpow commented 2 years ago

They are part of the automatically synchronized configuration, partially for backup, partially to work from outside prod-server. But I guess if the dumped files are a byproduct of a main/reference file, I should consider them as ephemeral and exclude from the backup. Thank you for your input.