-
Notifications
You must be signed in to change notification settings - Fork 177
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
Perceval behind a firewall #388
Comments
This is a little weird. Do you have problems cloning git repositories using |
no, no problems with git at all. In fact, I git cloned the perceval repo to try to figure out the problem, but it is still beyond me. |
I don't know if this can help, but you could try to:
|
Just a suggestion to try to figure out where the problem is: could you ensure you can clone the git repo * with the same link Perceval is using*? That is, just run:
Just to ensure that we don't have a problem on that side (since there are several ways of cloning a git repo, just to discard scenarios). This said, the connection problem could be related to your firewall using their own CA (I assume it is not only its own CA, but a complete re-encryption, providing a fake certificate to the client), because maybe git is not being able of establishing a SSL connection because the check of the certificate is failing. BTW, I assume the firewall is doing all of this transparently, right? All this said, I suggest that you use the advice in w3c/epubcheck#771 . In short:
You should run git config in the same account that you later run Perceval. |
The "git clone..." line does work. Hmmm... the git config might have fixed that part. At least, the python script (above) doesn't crash now. |
Ok, I know nothing at all about pipermail, but it seems to have the same proxy problems as perceval had with git. Should I open a different thread about that, or is the answer simple enough that it can be tacked onto this? |
I've been researching a bit about this, and it seems using environment variables could be a solution, at least in some cases. I've done some testing and it seems to work with the 'grimoire/full' Docker image, although I'm not sure if my proxy setup is comparable to yours. Would you mind trying to run the container as:
(but instead of If this works, it should work for git, github, mail archives, and very likely for other data sources (most Linux-based tools honor these environment variables). Could you please try this, and let us know how it worked? |
It looks like even with the explicit proxy definition I still get both proxy errors in pipermail and ssl certificate errors due to the corporate firewall examination and re-signing of ssl packets.
|
To avoid Hope this helps |
How would I get that parameter into the docker container? Or, for that matter, where would it be added to the dashboard set up when running outside of docker? |
SInce you are using the grimoire/full docker image, I guess you won't have the latest version of Perceval (right, @jgbarah?). |
I didn't produce container images for 18.05-03 because of a bug in Mordred which prevents from having a working configuration with grimoirelab/secured. But, @pixelpshr I could produce a container image for you if you can have a spin at it, so we can check if it works with that kind of firewalls. However, very likely 18.05-04 will be out in two days, I'm planning to produce container images right afterwards. |
Do you have access to the firewall signing CA certificate? I'm thinking that another (safest) option would be to install that certificate in the container image... If you do, let me know, and I can have a look at that. I'm a bit limited in testing, I'm not sure how to setup a testing environment like that (but I can try). |
I don't think there is any need to rush the process. I can either grab a container for testing, or wait until the next release. I'll leave it up to you. |
I do have the addition *.pem file that would need to be added to the container to work in my environment. (But, I'm sure that I cannot distribute it.) I have been trying to figure out how to build some sort of wrapper around the grimoirelab/full container that would allow me to insert the certs, but having no luck. |
Finally, I had to produce a container image for testing some other stuff, so I uploaded that image to DockerHub as grimoirelab/full:testing. It is produced with the head of the master branch for all GrimoireLab modules, so it should include the patch you need for testing If you have some time, please give it a try, and let us know if it worked. |
What you need usually are the public certificates. I'm not familiar to certificates formats, but in my Debian box, root CA certs come in If you can get your public cert in that format, I could either detail the process, or produce a script, so that you can test the container image with it. |
@jgbarah, I can get the certs in *.crt format, too. It sounds like you know the magical incantation required to get the certs into the container! I think that's what I'm missing. |
Using the grimoirelab/full:testing with the addition of the no-verify=true configuration does let perceval /pipermail get past the firewall. Yay!
|
Oh! I think I solved that git problem with this:
|
Great! I'm opening an issue for Perceval, because it should use this trick when the no-verify flag is passed to it, so that you don't need to do that. |
Ooops, I read too fast. I'm not sure I fully understand what you did. Let's recap, please:
And then run the container with no specific option? All of this with the |
Correct on all counts.
The only remaining question is, where do I put the certs in the container? (What is the "/container/path/to/certs"?) |
For git, I'm pretty sure the certificates are those "in the system", which in the case of our container image, which is based on Debian, should be But I don't know if So, the whole process would be:
If you can try this procedure, I can modify the script that the container runs as default to conditionally do this. |
Ok, that bit with the REQUESTS_CA_BUNDLE seems to have done the final trick! I've got a script now that runs the standard grimoirelab/full container, without the no-verify=true, and pipermail is happy. Here is my script (notice that I'm copying the cert files into the container, rather than mounting the directory):
|
Thanks a lot! I will include these tricks in the container and/or in the documentation. That you could finally get your stuff working is great news for me! |
I'm not sure if this is a problem with Perceval or my brainspace. (New Python user.)
My corporate firewall routes http and https traffic through the same proxy, http://proxy.my.com:80. (It also inserts its on CA auth chain into SSL traffic, but I don't think I've gotten far enough to worry about that problem yet.)
Can anyone help me figure this out? Are firewall proxies supported by Perceval?
Running the Perceval example produces this output:
Similarly, using the example of perceval in a python script that looks like this:
produces very similar output:
The text was updated successfully, but these errors were encountered: