-
Notifications
You must be signed in to change notification settings - Fork 23
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 option to not verify certificate when calling the real estate WMS #2005
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2005 +/- ##
=======================================
Coverage 85.51% 85.51%
=======================================
Files 120 120
Lines 5275 5276 +1
=======================================
+ Hits 4511 4512 +1
Misses 764 764
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jwkaltz. I added some comments.
It seems to me that it is a bit a partial solution to a very specific problem of a particular oereb server instance. And not a general use case. If an extract with geometry is requested, the wms for a topic could have as well a self-signed certificate. But this is not possible so for with the standard source. In addition, neglecting the certificates is not advised. Do we really need this MR?
Hi @michmuel , thanks for the review, I will look at your proposed changes! Regarding the general context: As far as I could tell, adding this option to the requests.get call in view_service.py is in fact a full solution for this issue. There is also the swisstopo/address.py, but swisstopo has proper certificates so this not an issue there. |
… (useful for example if the WMS has a self-signed certificate)
c4506ae
to
99bb454
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @michmuel, it's not ideal to open pyramid_oereb to use self-signed certificates. Wouldn't it be possible to add a self-signed certificate to the docker image of pyramid_oereb?
However, the changes don't affect the security of users, that use proper certificates.
Though, I would strongly advice in pyramid_oereb.yml.mako not to use verify_certificate: False with a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you for adding the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The branch works fine in our test environment. However, I spotted a few things.
Add option to not verify certificate when calling the real estate WMS. Useful for example if the WMS has a self-signed certificate.
In addition to the CI, this PR was tested locally with
http://localhost:6543/oereb/extract/json?EGRID=CH113928077734&WITHIMAGES=true
with both settings (verify_certificate True and False)