Skip to content

Propagate proxies and ssl_verification args to cloud services#2607

Merged
diego-plan9 merged 28 commits intoQiskit:mainfrom
alodolo:bugfix/add_proxy_options
Mar 31, 2026
Merged

Propagate proxies and ssl_verification args to cloud services#2607
diego-plan9 merged 28 commits intoQiskit:mainfrom
alodolo:bugfix/add_proxy_options

Conversation

@alodolo
Copy link
Copy Markdown
Contributor

@alodolo alodolo commented Feb 12, 2026

Summary

This pull request should fix the following issues: #2382 and #2592.
It injects ssl_verification and proxy arguments to outgoing requests.
It also patches the proxy integration test.

Details and comments

Remarques:

  • Proxy and ssl_verification injection
    The requests parameter injection for GlobalSearchV2 and GlobalCatalogV1 is done during the search method. The PR host verification disable now works #2593 is adding ssl_verification at the service instanciation level, however those services don't have (yet) the constructors to disable ssl_verification.

  • IAM service
    It seems that the class that handle the IAM service is instanciated multiple times in different ways (IAMAuthenticator in CloudAccount, and IAMTokenManager in CloudAuth). I would recommend some refactoring to use only 1 configured IAM service in the code.

  • Integration testing - proxy
    It seems that integration tests for the proxy were skipped because it was conditioned only for ibm_cloud services.
    On top of that the pproxy lib have bugs with the latest versions of python and is not maintained anymore (Fixed no current event loop error when using current uvloop version qwj/python-proxy#202). I switched the lib for mitmproxy (MIT license, python API, 40k stars and up to date - https://github.com/mitmproxy/mitmproxy).

Fixes #

  • proxy config
  • ssl_verification flag
  • integration tests for proxy

@diego-plan9 diego-plan9 self-requested a review February 13, 2026 13:01
Copy link
Copy Markdown
Member

@diego-plan9 diego-plan9 left a comment

Choose a reason for hiding this comment

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

Thanks @alodolo ! As #2593 might require some time, it makes sense to move this PR forward with the goal of closing the issue.

And thanks for bringing the proxy testing situation into a better state as part of this PR - actually, this initial review is focused on mitmproxy usage and the infra around it, preparing for next steps.

@alodolo
Copy link
Copy Markdown
Contributor Author

alodolo commented Feb 27, 2026

Hi @diego-plan9 ,

I reverted all the changes link to the switch to mitmproxy and the proxies integration test and I will create an another dedicated issue & PR. It seems that pproxy has compatibility issues with the latest version of python and mitmproxy has issues with python 3.10.

Right now in the PR I left the patch in the source code with proxy and ssl_verify parameters injections if the fixe need to be merged without changing the integration tests.

Copy link
Copy Markdown
Member

@diego-plan9 diego-plan9 left a comment

Choose a reason for hiding this comment

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

Thanks @alodolo !

I reverted all the changes link to the switch to mitmproxy and the proxies integration test and I will create an another dedicated issue & PR. It seems that pproxy has compatibility issues with the latest version of python and mitmproxy has issues with python 3.10.

Thanks for looking into it - perhaps a less recent mitmproxy version might fit the bill when it comes to supporting the right Python versions, as it would be great to replace pproxy eventually. Indeed, the goal is getting the neat fix in place: looking forward for the follow-up issue and PR, with lower priority.

Other than some nits, it is just one test away from being ready! As another small nit: can you rename the PR to something a bit more human-readable, so it can be easier to parse when going through history?

@alodolo alodolo force-pushed the bugfix/add_proxy_options branch from e122cbf to 50e1ed0 Compare March 30, 2026 22:10
@diego-plan9 diego-plan9 changed the title Bugfix/add proxy options Propagate proxies and ssl_verification args to cloud services Mar 31, 2026
@diego-plan9 diego-plan9 added the Changelog: Bugfix Include in the Fixed section of the changelog label Mar 31, 2026
"urllib3>=2.4.0",
"python-dateutil>=2.9.0",
"ibm-platform-services>=0.55.3",
"ibm-platform-services>=0.61.1",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks - for future reference, this is due to GlobalCatalogV1.get_catalog_entry() and other methods not propagating the kwargs until https://github.com/IBM/platform-services-python-sdk/pull/286/changes#diff-8c42907892d2dd2139f88503f2d0049bcec384c7def602131f1a46ba3e750995L292-R316 landed.

Copy link
Copy Markdown
Member

@diego-plan9 diego-plan9 left a comment

Choose a reason for hiding this comment

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

Thanks @alodolo!

@diego-plan9 diego-plan9 enabled auto-merge March 31, 2026 11:37
@diego-plan9 diego-plan9 added this pull request to the merge queue Mar 31, 2026
Merged via the queue into Qiskit:main with commit 0006944 Mar 31, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Bugfix Include in the Fixed section of the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants