-
-
Notifications
You must be signed in to change notification settings - Fork 117
Enhancement: manual IP specification during server:ca:install
command
#584
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
base: main
Are you sure you want to change the base?
Conversation
Just got around to testing locally. I downloaded the most recent release artifact from my PR locally and instead of running the following in my dockerfile:
I substituted it with:
With the custom binary installed, I ran:
Which produced a certificate with the 4 IPs listed correctly: I tested without the ips flag specified and got an error, so marking as draft while I figure that out. |
… array When running without --ips="..." flag, ips is "" rather than being sourced by the DefaultText attribute as previously thought. I restored the previous hardcoded string array and use the ips value if it evaluates to as truthy.
Look away my lack of go experience is showing
Ready for review but could use an additional test, see remaining section belowI resolved the issue and repeated my build process to generate a cert without the flag being set and produced the following cert: Use caseMy use case for this mostly stems from using a separate devices to host and access my dev environments. I'm exploring progressive web app related work, so the baked in path for https in a single command was very nice. Only issue is that accessing the site from an external client instead of localhost will generate a cert error since it's not being served over a valid ip. With this PR, I can add the additional IP to resolve the cert error to simply a cert authority error, which can be resolved with adding the cert locally. I'm unsure if this functionality is really applicable to many or best practice. Some conversation on that wouldn't hurt, but this achieves what I need it to. RemainingI'm a little unfamiliar with go, but if someone could point me to where the |
I’m not sure I would recommend adding the certificates we generate on another system that the local system where it has been generated. Also, the Additionally, the remote IP can change at any time, with this implementation it means we need to make possible to regenerate it when needed. Finally, supporting this in IF we follow this path I think I would rather generate a certificate on the fly based on the listenIP to avoid any conflicts or user errors. However, I might have a solution for you: the HTTPS proxy usage seems to cover your use case as it’s reachable on other IPs and the certificate generation based on DNS names means no issue with IP change. would that work for you? |
Hi, all.
I hit a bit of an admittedly fringe issue during some dev work and needed to be able to add a local IP to the list of ips added to the cert generated during the
server:ca:install
go script. I extended the go script with an additional StringFlag with a default value matching the current hardcoded value to preserve the current functionality.