-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cli: fix tls ca create
command with -domain
#19892
Conversation
bdd0214
to
c89742a
Compare
The current implementation of the `nomad tls ca create` command ovierrides the value of the `-domain` flag with `"nomad"` if no additional customization is provided. This results in a certificate for the wrong domain or an error if the `-name-constraint` flag is also used. THe logic for `IsCustom()` also seemed reversed. If all custom fields are empty then the certificate is _not_ customized, so `IsCustom()` should return false.
c89742a
to
90f33cb
Compare
Does this also fix the issue that when you overwrite the organization details, the validity of the CA is set to 0 days? |
Hi @jonashaag 👋 I'm not sure, do you happen to have an issue that describes the problem? You can also test these changes from our latest CI build (it's all the way down the page 😅): Just keep in mind that these are development builds and should be used for any production code. |
Thanks, I just gave it a try. It seems to be fixed in that build. With v1.7.4:
|
Nice, thanks for testing it. So we got a two-for-one deal on this PR 😄 The fix is available on Nomad 1.7.5 and 1.6.8 that were just released. |
The current implementation of the
nomad tls ca create
command ovierrides the value of the-domain
flag with"nomad"
if no additional customization is provided.This results in a certificate for the wrong domain or an error if the
-name-constraint
flag is also used.The logic for
IsCustom()
also seemed reversed. If all custom fields are empty then the certificate is not customized, soIsCustom()
should return false.Closes #19836