-
Notifications
You must be signed in to change notification settings - Fork 27
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
Issues with custom certificate #41
Comments
Sounds like unms is not the owner of cert/custom.key and therefore can't access it because of the 600 file permission. They should look something like this:
|
I’m out of town currently will try to look at this next week and report
back.
…On Tue, Nov 24, 2020 at 16:37 Nico640 ***@***.***> wrote:
Sounds like unms is not the owner of cert/custom.key and therefore can't
access it because of the 600 file permission.
Could you take a look at the /config/cert and /config/usercert directories
from inside the container? (docker exec -it unms-controller /bin/bash)
They should look something like this:
ls -l /config/usercert/
-rw-rw-rw- 1 root root 1038 Nov 24 22:30 custom.crt
-rw-rw-rw- 1 root root 1679 Nov 24 22:30 custom.key
ls -l /config/cert
-rw-r--r-- 1 unms unms 1038 Nov 24 22:30 custom.crt
-rw------- 1 unms unms 1679 Nov 24 22:30 custom.key
lrwxrwxrwx 1 unms nogroup 12 Nov 24 22:31 live.crt -> ./custom.crt
lrwxrwxrwx 1 unms nogroup 12 Nov 24 22:31 live.key -> ./custom.key
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALEIAFFORID2GMNQFKHQEMTSRQRQJANCNFSM4UAGTVKQ>
.
|
@g4m3r7ag did you have the chance to get back in town yet |
To be honest I completely got side tracked. I should have time to mess with
it tonight. I only have one site in UNMS so it’s easy to forget about.
Apologies.
…On Wed, Apr 14, 2021 at 15:30 Artiik373 ***@***.***> wrote:
@g4m3r7ag <https://github.com/g4m3r7ag> did you have the chance to get
back in town yet
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALEIAFDQN4ZFUQ2WQ22B4EDTIXUMDANCNFSM4UAGTVKQ>
.
|
I spun up a new container to test this. I created the usercert directory and placed my cert and key there before the initial run. Ran the container and it assigned the proper permissions to the file assuming the unms uid/gid would be 1001 as it's not showing me the name because those users don't exist on my host. However the cert doesn't seem to be loading properly as I still get a certificate error, but better then before as it at least is letting me bypass the error now. Maybe if there was a way to specify the UID/GID to run the services as?
Compose file
Edit: I do see where it's creating user unms as 1001 so the permissions seem to be correct however it's still giving an error when trying to load the cert
However it does actually create the custom.crt file with contents of my crt file from the usercert folder. The custom.key file though is created and when viewed with sudo has the correct contents. I stopped the container and changed the permissions on it to
Restarted the container and it read the contents of the key file without error
However I'm still getting a invalid certificate error. When I view the certificate it shows it's my certificate, but when viewing the details it doesn't show the hierarchy like it does viewing the details on the certificates on my other services. It just shows the cert it self not the root or sub ca. Like it's still not importing something correctly. Unfortunately I'm not versed enough in certs to verify that though. |
I run into the same issue with the 2.3.57 version, did you manage to solve this ? |
Here is an example from my compose file. This setup works well for me. I'm using a third-party-signed cert. I'm using the full chain as well. My unms.crt contains my signed cert at the top of unms.crt and intermediate/root at the bottom of unms.crt. Also, I'm using ecdsa key, so you know it will will work rsa keys or ecdsa keys. Contents of unms.crt
Compose file
|
I can't seem to get this to work with a custom SSL cert. I created the self-signed cert using my CA in pfSense. That CA is trusted on my browser as I can access services using self-signed certs without an SSL error. I created the following directories
/docker-data/unms
/docker-data/unms/usercert
I downloaded the CRT and KEY files from pfSense and placed them in /docker-data/unms/usercert
These directories and files show ownership as administrator:administrator (my default user on this host). The files are named custom.crt and custom.key and have permissions equal to 664 (-rw-rw-r--)
Here is my compose file
And the ls -l of the directories just for clarity
After running the compose file the directory structure looks like this
So the UNMS directory changes to 911:911, the cert directory gets created as administrator:administrator, and the custom.key file gets copied into the cert directory and has permissions as 600.
The links in the this directory are administrator:nogroup
The logs show during startup
And trying to access the controller after that results in a privacy error "NET::ERR_CERT_INVALID" and when I click advanced there is no option to proceed anyway and it states
192.168.1.30 normally uses encryption to protect your information. When Google Chrome tried to connect to 192.168.1.30 this time, the website sent back unusual and incorrect credentials. This may happen when an attacker is trying to pretend to be 192.168.1.30, or a Wi-Fi sign-in screen has interrupted the connection. Your information is still secure because Google Chrome stopped the connection before any data was exchanged.
You cannot visit 192.168.1.30 right now because the website sent scrambled credentials that Google Chrome cannot process. Network errors and attacks are usually temporary, so this page will probably work later.
The cert that was created has a common name of unms.ad.mydomain.com with an alternate name of 192.168.1.30. This is how I created my other certs and accessing them via fqdn or IP results in no SSL warnings.
If I attempt to connect via the fqdn I get the same thing
unms.ad.mydomain.com normally uses encryption to protect your information. When Google Chrome tried to connect to unms.ad.mydomain.com this time, the website sent back unusual and incorrect credentials. This may happen when an attacker is trying to pretend to be unms.ad.mydomain.com, or a Wi-Fi sign-in screen has interrupted the connection. Your information is still secure because Google Chrome stopped the connection before any data was exchanged.
You cannot visit unms.ad.mydomain.com right now because the website sent scrambled credentials that Google Chrome cannot process. Network errors and attacks are usually temporary, so this page will probably work later.
I'm assuming it's some sort of permissions error with all the different ownership and permissions that are created when the container is first run but I am unsure. If I run the container without the custom SSL env variables it creates a localhost self signed cert and I am able to connect to the controller via IP (after clicking proceed anyway on the SSL warning) however after a couple of minutes the session seems to disconnect, there's a warning popup on the controller that the connection has been lost and if I refresh the page I am presented with the SSL warning again. Seems to happen ever 2-3 minutes.
The text was updated successfully, but these errors were encountered: