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

GitProxy HTTPS support #546

Open
msagi opened this issue May 5, 2024 · 3 comments
Open

GitProxy HTTPS support #546

msagi opened this issue May 5, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@msagi
Copy link
Contributor

msagi commented May 5, 2024

Is your feature request related to a problem? Please describe.
GitProxy supports HTTP only for the git proxy interface. HTTP communication is not encrypted and therefore not secure to send sensitive information through.

Describe the solution you'd like
Add HTTPS support to the git proxy interface to increase overall security of the solution.

Describe alternatives you've considered
Running GitProxy locally only, so communication does not leave localhost... but this severely limits the usability of GitProxy as an enterprise gateway to open source hubs.

@maoo
Copy link
Member

maoo commented May 10, 2024

@msagi - I've played a bit on this and got something to work; let me explain.

Adding HTTPS support to express is trivial, so trivial that fits in a screenshot 😄

Screenshot 2024-05-10 at 16 12 06

The certificates were generated with one command:

openssl req -x509 -newkey rsa:4096 -keyout certs/key.pem -out certs/cert.pem -sha256 -days 3650 -nodes -subj "/C=US/ST=NY/L=New York/O=FINOS/OU=CTI/CN=localhost"

Of course, the path to certificates should be stored in (and fetched from) proxy.config.json, but that's a simple change.

In order to test it locally, using self-signed certificates, you'll have to add -c http.sslVerify=false to the git clone command; in the docs it's also worth mentioning that in a production environment it's probably best (and even easier) to delegate HTTPS to a reverse proxy like HAProxy or Nginx.

If you like what you see, I can work on a proper PR, with docs changes and proper configuration.

Eager to hear your feedback!

@JamieSlome JamieSlome added the enhancement New feature or request label May 10, 2024
maoo added a commit that referenced this issue May 10, 2024
@maoo
Copy link
Member

maoo commented May 10, 2024

@msagi - here's the code #558 ; I also invited you as a Git Proxy Contributor (a GitHub Team), to grant you Triage permissions , so that I can set you as PR reviewer.

JamieSlome added a commit that referenced this issue Jun 5, 2024
@JamieSlome
Copy link
Member

@maoo @msagi - #558 has been merged 👍 Are we happy to close this issue?

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

No branches or pull requests

3 participants