MISP / misp-docker

A production ready Dockered MISP
GNU General Public License v3.0
169 stars 101 forks source link

MISP - How Disable Redirect http to https #20

Closed gritty-Kitty closed 8 months ago

gritty-Kitty commented 8 months ago

Is there a way to disable MISP http redirect to https? We disabled tcp/443 within docker-compose.yml and are not able to get MISP to respond to http tcp/80 requests.

We are using MISP in MIcrosoft Azure with an Application Gateway that will be performing SSL Offloading and do not require https redirection on the backend, but... we are receiving Gateway 504 errors, i.e., backend timeouts... and we suspect it is related to what appears to be a "baked in" MISP http redirect to https that we would like to disable.

We see a MISP and MISP80 configuration within the misp-misp-core-1, but are not sure this is related to our request.

Any suggestions to remediate are greatly appreciated.


https://www.circl.lu/doc/misp/administration/#how-to-redirect-http-to-https

https://github.com/MISP/MISP/issues/4405 (user claims they were able to disable https redirect and self-signed certificate, but does not include details on how)

https://githubhelp.com/harvard-itsecurity/docker-misp/issues/47 https://web.archive.org/web/20200910000555/https://github.com/harvard-itsecurity/docker-misp/issues/47

https://eugit.opencloud.lu/MISP/misp-docker/commit/c57f2669ec8f34a934fc089b2c263f607dc4bbc6#diff-35b8c13cf2eb2a194eada000eb310d65aed53b2a

ostefano commented 8 months ago

That option is not there anymore and needs to be reimplemented. I believe some folks came up with alternative approaches in the gitter/matrix chat. I would try asking there.

gritty-Kitty commented 8 months ago

Thank you very much for the prompt response. I have seen some of your postings referencing Gitter, but must admit I am not familiar (yet). Any hint on how to get started with Gitter related to this project is greatly appreciated. Thank you for the GitHub project, and your hard work.

alexshively commented 8 months ago

I'm attempting to do something similar in AWS with an ALB. I blanked out the misp nginx conf, and changed the misp80 conf to route properly. It kind of works but temporarily at random times will not load. I'm basically in the same boat. Any help/advice or pointing to references would be great. I'm not able to find this gitter/matrix chat if you could point to that, I'd appreciate it as well.

ostefano commented 8 months ago

Try here: https://gitter.im/MISP/Docker

gritty-Kitty commented 8 months ago

Thank you very much for the references. Greatly appreciated.

ostefano commented 8 months ago

@gritty-Kitty @alexshively I believe the best way forward here is to add an env variable that disable the redirect, and some logic that switches the nginx configuration for the service running on port 80.

Happy to review and merge PRs in this direction.

ostefano commented 8 months ago

Had a spare cycle and put together a quick PR: https://github.com/MISP/misp-docker/pull/21

Let me know if that works. If it does, we can merge it.

ostefano commented 8 months ago

@gritty-Kitty @alexshively did you have a chance to test it?

gritty-Kitty commented 8 months ago

Good evening, reviewing your response. I was distracted and struggling for the past 3-days to get our 3rd Party Entrust certificates auto-ingested from Ubuntu 22.04 LTS into the Docker instance and recognized by the MISP core application.

gritty-Kitty commented 8 months ago

Good afternoon,

Firstly, thank you for your continued support and proactivity.

I triggered a redeployment of the docker-compose.yml from within Portainer, and after ~4 minutes, I received notice of a SUCCESSFUL deployment.

For validation locally, Chrome and Edge appeared to remember about switching from http to https (cache), but externally from the internet, Chrome was able to hit the MISP installation on HTTP through the Microsoft Azure Application Gateway. We will now work on SSL Termination/Offloading at the Application Gateway and test further.

Thank you.