SSL with internal web server #492
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why?
I know there are other methods such as reverse proxy or simply running a different web server but I think this is a simple and intuitive alternative which could make life easier for non-insignificant amount of server owners.
Drawbacks
Letsencrypt issues certificates for 90 days, and even the longest-lasting certificates are 398 days at most, this number shrinking to 47 days by 2029. Thus, the process of generating a keystore file and placing it into the plugin data directory could need to be automated, perhaps by a bash script, or we could eventually look into auto-renewal strategies using ACME and Letsencrypt.
The following would need to be added to docs/wiki:
In the folder containing your .pem certificates from Letsencrypt or any other provider, run this command:
openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out keystore.p12 -name undertow -password pass:to generate
keystore.p12file, which you can then place in/plugins/squaremap/folder and restart the server. Voilà