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

Support HTTP requests using system CA bundle #178

Closed
kvedurmu opened this issue Oct 6, 2020 · 5 comments
Closed

Support HTTP requests using system CA bundle #178

kvedurmu opened this issue Oct 6, 2020 · 5 comments

Comments

@kvedurmu
Copy link
Member

kvedurmu commented Oct 6, 2020

This issue was initially reported in the Cloud Foundry Python Buildpack, but it probably makes sense to consider it in the Paketo Buildpack as well.

The request here would be for the buildpack to automatically set export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt (perhaps only when the app uses the requests package?). This would allow Python apps to make HTTP requests using the system/operator defined CA certificate

@arjun024
Copy link
Member

arjun024 commented Oct 6, 2020

@kvedurmu Looks like requests is not part of the Python Standard Library, and is a popular external library. Given this, should we instead just advice users to set their env vars in <appdir>/.profile?

@kvedurmu
Copy link
Member Author

kvedurmu commented Oct 6, 2020

Yeah, the idea would be the env var is only set when the requests package is in the requirements.txt file. That said, I don't have any strong opinions here.

@fg-j
Copy link

fg-j commented Jan 28, 2022

It's been a little while since the last activity on this issue. @paketo-buildpacks/python-maintainers, is this still a relevant feature?

@robdimsdale
Copy link
Member

I haven't heard any recent feedback indicating this is something we should solve, so I'm going to close this issue. We can re-open if/when we get more evidence that this feature would be valuable.

@benjie91
Copy link

I was using Procfile to specify the startup command and I realised that setting BPE_DEFAULT_REQUESTS_CA_BUNDLE does not set the environment variable and thus my requests to external URL fails. Any documentation on how this should be done?

The only workaround that I think might work but I have not tested yet is to use launcher command instead of the Procfile method.

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

5 participants