linuxserver / docker-unifi-network-application

GNU General Public License v3.0
553 stars 41 forks source link

Add support for Mongo TLS & Atlas #21

Closed mkrle closed 8 months ago

mkrle commented 9 months ago

Description:

I have added flags for TLS (tls) and authSource to the MongoDB URLs. The TLS flag is set to true depending on the MONGO_TLS variable. authSource is always set to admin.

Benefits of this PR and context:

This PR will do the following:

How Has This Been Tested?

I have tested with not defining MONGO_TLS variable and haven't noticed any change in behaviour. It would be good if we could get more volunteers to test. My test environment was linux (arm64) docker with Atlas as MongoDB backend.

Source / References:

https://www.mongodb.com/docs/v4.4/reference/connection-string/ https://stackoverflow.com/questions/38237663/mongo-atlas-connection-authentication-failed-with-custom-databases

LinuxServer-CI commented 9 months ago

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-unifi-network-application:7.5.176-pkg-3f48ad74-dev-76b26b72cdf462d75beb14f8af9cad331e6953a1-pr-21

tobiasfaust commented 8 months ago

can please somebody approve and merge this PR. This PR fixes #9 and lots of people are waiting for that ;)

trunet commented 8 months ago

there's no rush I guess... people waiting can just point to the image mentioned on this comment: https://github.com/linuxserver/docker-unifi-network-application/pull/21#issuecomment-1738236330

LinuxServer-CI commented 8 months ago

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-unifi-network-application:7.5.176-pkg-22c0bf17-dev-874e2dfe0459454c38d5695bd67361d9eb59e6a9-pr-21

tobiasfaust commented 8 months ago

hi, unfortunally it doesn´t work without modifications. By using authSource=unifi it works. I will describe it in details at #9

mkrle commented 8 months ago

Got your point @tobiasfaust. I've updated the PR to set authSource to MONGO_DBNAME by default, and then allow others (e.g. Atlas users) to set it to admin using MONGO_AUTHSOURCE variable. Please let me know if it works in your case.

LinuxServer-CI commented 8 months ago

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-unifi-network-application:7.5.176-pkg-22c0bf17-dev-525cb05f23fad0e830b2ce9198954279fdcf102d-pr-21

tobiasfaust commented 8 months ago

hi @mkrle, it works perfectly right now. I hope this PR would be merged as soon as possible into the master branch.

mkrle commented 8 months ago

That README section should be generated automatically from readme-vars.yml so should be taken care of.

mkrle commented 8 months ago

Please add an entry to the changelog in the readme summarising the changes.

Done. Also squashed the commits as they were growing in number. Thanks a lot for the feedback!

LinuxServer-CI commented 8 months ago

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-unifi-network-application:7.5.187-pkg-5959d60e-dev-6492326b25ff789d4f76fa023627442ca925bd33-pr-21

LinuxServer-CI commented 8 months ago

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-unifi-network-application:7.5.187-pkg-5959d60e-dev-6109b5698168a728503fdca3aa4955e1fff660f9-pr-21