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

Enabling HTTPS on UI #270

Open
ManishYadav-SAP opened this issue Aug 7, 2023 · 2 comments
Open

Enabling HTTPS on UI #270

ManishYadav-SAP opened this issue Aug 7, 2023 · 2 comments
Assignees

Comments

@ManishYadav-SAP
Copy link

Hi @marcorosa / @SlimTrabelsi ,

Based on the instructions mentioned here - in order to enable HTTPS on UI we need to copy the signed certificate and a private key in the file path of wsgi.py but it is not working.

Can you please look into this?

@marcorosa
Copy link
Member

Hello @ManishYadav-SAP thanks for opening this issue.

The current HTTPS setting works when running docker containers, but it doesn't work when running directly the web server from terminal.
I test the code and take some note in this issue not to lose track.

@marcorosa
Copy link
Member

Notes on the issue:

  1. the .env must list certificate and private key with a path relative to wsgi.py for running in the docker container (because the Dockerfile copies the content of ui into /credential-digger-ui so these files would be lost), whereas these paths must be relative to the project root when running from the terminal.
  2. when running from the terminal, we run directly ui/server.py, whereas the Dockerfile works with entry point run.sh, that runs wsgi:app using gunicorn (both in case of https enabled or not)

Ideas on possible fix:

  • the certificate and private key, if set, have to be copied from dockerfile (and not dropped directly with COPY . /credential-digger-ui)
  • if running with docker, then we can't use local (absolute or relative) paths because the certificates have to be copied in the container. Then, we need to override the env variables.
  • wsgi.py and server.py should be unified (only server.py should stay), if possible. Keeping both of them is confusing and hard to maintain (indeed, we lost track of this after 1 or 2 years)
  • if we only keep server.py, then we need to define a ssl_context and pass it to app.run or the app configs

Once we decide how to fix this issue, we need to update the instructions in the wiki accordingly.

@marcorosa marcorosa self-assigned this Aug 9, 2023
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

2 participants