Allow for customized self signed cert#173
Allow for customized self signed cert#173porthorian wants to merge 2 commits intolinuxserver:mainfrom
Conversation
There was a problem hiding this comment.
Thanks for opening this pull request! Be sure to follow the pull request template!
|
I am a bot, here is the pushed image/manifest for this PR:
|
|
I am a bot, here is the pushed image/manifest for this PR:
|
a41b39f to
b2e9b74
Compare
|
I am a bot, here is the pushed image/manifest for this PR:
|
root/etc/s6-overlay/s6-rc.d/init-unifi-network-application-config/run
Outdated
Show resolved
Hide resolved
|
I am a bot, here is the pushed image/manifest for this PR:
|
|
I am a bot, here is the pushed image/manifest for this PR:
|
Before submitting a pull request please check the following
If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR
Ask yourself if this modification is something the whole userbase will benefit from, if this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/
That if the PR is addressing an existing issue include, closes # , in the body of the PR commit message
I have read the contributing guideline and understand that I have made the correct modifications
Description:
On the first initialization of the unifi network application via this application, it checks to see if there is a mounted keystore.jks file if there is, the script will proceed to importing that jks into the keystore. Rather then auto generating a unique key that is pretty hard to modify once the container is created if using kubernetes, or a different certificate that wasn't generated.
Benefits of this PR and context:
The benefits of this PR are in my opinion allow for no hack arounds to occur to get this to work with a reverse proxy that isn't traefik and encrypt the traffic via tls from the proxy to the controller.
This allows users to bring their own certificates as long as they are signed appropriately and will work with unifi.
An example of this is cert-manager.
This allows the user to create a self signed certificate that allows them to use this on a reverse proxy application for example. NGINX that is using the gatewapi implementation
BackendTLSPolicy.This is largely because there is no way at all to turn off insecure ski verfication for some ingress implementations.
https://docs.linuxserver.io/images/docker-unifi-network-application/#strict-reverse-proxies
This solves this problem altogether.
https://docs.linuxserver.io/images/docker-unifi-network-application/#strict-reverse-proxies
Users can now bring their own certificate and not have to worry about configuring it after the fact.
How Has This Been Tested?
Manual validation in Kubernetes with cert-manager:
Certificateresource (example above) withsecretName: unifi-signed-certand JKS keystore output enabled.unifi-signed-certsecret was created by cert-manager.In Kubernetes looks like this
Post Change
I have been running this in my homelab now with a pretty complicated unifi setup and have had no issues since, running behind a nginx proxy.
Updates to Documentation
/certs/keystore.jks.Source / References: