Closed jhamon closed 5 months ago
Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
Problem
We want to expose proxy configuration fields as top-level config params and move away from users passing an
OpenApiConfiguration
instance withopenapi_config
(as was done in 2.x versions of the sdk). Passing these objects is not something we documented or had shown as a named configuration param, but is something people assumed would work as a hangover from the way things were done in the old client.Currently OpenApi generated code is part of our implementation, but we may want to swap out something else in the future so it doesn't make sense to use this
OpenApiConfiguration
object as part of our public interface. And since the openapi config object also needs to be configured with api key and host, it competes with these other config params in a way that is pretty confusing.Solution
proxy_url
,proxy_headers
,ssl_ca_certs
, andssl_verify
.openapi_config
encouraging them to use the new properties.Usage
This will work, but should emit a deprecation warning:
Future work
We will need to figure out how to deploy the mitmproxy elsewhere (cloud run?) before running tests in CI because Github Actions seems to have a lot of issues with running these docker containers and debugging the errors has proven quite difficult. While GHA can run docker containers, mounting a volume with the required certs causes the container to crash. I'm guessing this is some kind of file permissions issue, but don't have much visibility for debugging.
Type of Change
Test Plan
Run new tests locally with
PINECONE_API_KEY='foo' PINECONE_INDEX_NAME='bar' poetry run pytest tests/integration/proxy_config/ -s -v