Skip to content
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

Add documentation how to setup dedicated SKF and documentation for Docker using IP or Hostname #384

Closed
ghost opened this issue Jan 3, 2018 · 14 comments

Comments

@ghost
Copy link

ghost commented Jan 3, 2018

Docker file obliges me to run SKF on https://localhost. I tried following commands and having errors.

I want to install SKF on an internal server of my company so that everybody can reach but I couldn't succeed.

docker -D run -e "ORIGIN=10.58.12.22" -e "JWT_SECRET=88a9e1bc-2c64-4eb8-9a54-e69cbf7fbffc" -e "HTTPS=false" -d -p 10.58.12.22:8230:80 --name=security-knowledge-framework-poc --restart=always blabla1337/skf-flask

docker -D run -e "ORIGIN=10.58.12.22" -e "JWT_SECRET=88a9e1bc-2c64-4eb8-9a54-e69cbf7fbffc" -d -p 10.58.12.22:8230:443 --name=security-knowledge-framework-poc --restart=always blabla1337/skf-flask

I startup SKF with the commands above and "http://10.58.12.22:8230/" and "https://10.58.12.22:8230/" gives me "Invalid Host Header" error.

How can I start the docker image on a server ip?

@blabla1337
Copy link
Owner

Hi @HakanBilgin,

It's more then that you need to do, we will rewrite this ticket to include some documentation to setup a dedicated / IP / hostname based and release it in the SKF repo.

We will describe the steps that we used ourselves for the https://demo.securityknowledgeframework.org

@blabla1337 blabla1337 changed the title Can't run docker file with "my_server_ip:port" config Add documentation how to setup dedicated SKF and documentation for Docker using IP or Hostname Jan 9, 2018
@ghost
Copy link
Author

ghost commented Jan 10, 2018

Thanks a lot. I will be following this github page for the documentation. It can be great if you can update this ticket when the documentation is ready. Thanks again.

@martinmarsicano
Copy link
Collaborator

Hi all.
For a local run without Docker I grab the bash files located in the docker folder and modify them to run locally. I also have to modify the site-tls.con and site.conf because my nginx installation takes a different sintax (I don't know if it is because of the OS or some new version of nginx).

If what I do is valid, I could give a hand with this issue. Maybe creating a folder as Docker, but named Local and putting the files I use with the local references.

@omerlh
Copy link

omerlh commented Feb 12, 2018

Any update on this? This is a really awesome project and I would like to run it using docker...

@ghost
Copy link
Author

ghost commented Mar 9, 2018

Any updates? Me and my company is impatient to use this tool as a dedicated installation.

@martinmarsicano
Copy link
Collaborator

martinmarsicano commented Mar 10, 2018

@HakanBilgin @omerlh , there is a Local installation documentation, since #440 , is that what you need? Also you can install It as localhost in some server and rewrite the URL with the reverse proxy of your company (Apache, nginx).

@omerlh
Copy link

omerlh commented Mar 11, 2018

Does this will work somehow with docker compose? Becuase in order for this to work on docker compose, it will need to listen on something different than localhost, and that what I'm looking for.
Also, is there an option to use Let's Encrypt or something else to change the TLS certificate?

1 similar comment
@omerlh
Copy link

omerlh commented Mar 11, 2018

Does this will work somehow with docker compose? Becuase in order for this to work on docker compose, it will need to listen on something different than localhost, and that what I'm looking for.
Also, is there an option to use Let's Encrypt or something else to change the TLS certificate?

@Mason-Fan
Copy link

any update on this?

@uzzzval
Copy link

uzzzval commented May 23, 2018

I am facing a similar issue. Any update on this ?

@hakan-bilgin
Copy link

Any updates for the installation on a dedicated server?

@blabla1337
Copy link
Owner

Hi Guys,

I created the dedicated how to steps documentation. I hope this will help with the Docker and dedicated configurations. We also use the same approach for the demo.securityknowledgeframework.org so it should help you all. Please check it here:
https://github.com/blabla1337/skf-flask/blob/master/README.md#installing

@aarvee11
Copy link

Easiest thing to do is to replace the Host Header with "localhost" if you are hosting it behind a load balancer that has L7 Request Rewrite Capabilities. For eg. in HAPROXY, you can use the rule as given below:

http-request replace-value Host skf.example.com localhost

@hakan-bilgin
Copy link

I think I found the solution. Problem is with skf-angular.sh file. I thınk hostname should be passed to ng serve command. See here: angular/angular-cli#6349

I updated the skf-angular.sh with:

ng serve --configuration=production --host 0.0.0.0 --disable-host-check

and re-built the docker image and no more Invalid Header error.

I can now set up a dedicated skf with my docker image but still can't use port 80. Because all XHR calls of the application are hard coded as https.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants