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

RDISCROWD-6956 add ssl cert path to proxy service request #923

Merged
merged 4 commits into from
May 30, 2024

Conversation

peterkle
Copy link

Issue number of the reported bug or feature request: RDISCROWD-6956

Describe your changes
add ssl cert path to proxy service request

kbecker42
kbecker42 previously approved these changes May 28, 2024
pybossa/api/__init__.py Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented May 28, 2024

Pull Request Test Coverage Report for Build 9287214280

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.001%) to 93.946%

Files with Coverage Reduction New Missed Lines %
pybossa/sched.py 2 96.19%
Totals Coverage Status
Change from base Build 9177298420: -0.001%
Covered Lines: 17132
Relevant Lines: 18236

💛 - Coveralls

Comment on lines 710 to 711
ssl_cert = current_app.config.get('SSL_CERT_PATH')
ret = requests.post(url, headers=headers, json=payload['data'], verify=ssl_cert if ssl_cert else True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be

ssl_cert = current_app.config.get('SSL_CERT_PATH', False)
ret = requests.post(url, headers=headers, json=payload['data'], verify=ssl_cert)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dchhabda verify is True by default so this would change existing behavior for missing certs. I will change the first line to:

ssl_cert = current_app.config.get('SSL_CERT_PATH', True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for missing certs path in configs, IMO ssl_cert would be set to False which would superimpose default verify=True behavior. Let's connect offline if needed. Thanks!

@peterkle peterkle requested a review from dchhabda May 29, 2024 14:40
@peterkle peterkle merged commit e65dfd9 into main May 30, 2024
4 of 6 checks passed
@peterkle peterkle deleted the RDISCROWD-6956 branch May 30, 2024 15:40
ciaracian pushed a commit that referenced this pull request Jul 23, 2024
* RDISCROWD-6956 add ssl cert path to proxy service request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants