Skip to content

feat: added cert_path option for custom secure API communication#35

Merged
petruki merged 1 commit intomasterfrom
staging
Mar 1, 2026
Merged

feat: added cert_path option for custom secure API communication#35
petruki merged 1 commit intomasterfrom
staging

Conversation

@petruki
Copy link
Member

@petruki petruki commented Mar 1, 2026

This pull request adds support for using custom SSL certificates for secure API connections in the Switcher client. The changes include extending the configuration to accept a certificate path, updating remote API calls to use the certificate if provided, and adding a test to validate this new functionality.

Security and SSL Certificate Support

  • Added a cert_path option to ContextOptions and the Context initialization, allowing users to specify a custom SSL certificate for secure API connections. [1] [2] [3]
  • Updated the Remote class in switcher_client/lib/remote.py to use the custom SSL certificate when making HTTP requests, including logic to load the certificate and set up the SSL context. [1] [2] [3]
  • Modified all internal remote API calls to pass the context, ensuring the certificate path is respected for every request. [1] [2] [3]

Documentation and Testing

  • Updated the documentation in README.md to clarify the purpose of the cert_path option and removed the "TODO" marker.
  • Added a dummy certificate file and a new test case to confirm that remote API calls correctly use the custom certificate when specified. [1] [2]

These changes improve the security and flexibility of remote API connections by allowing users to specify custom SSL certificates.

@petruki petruki self-assigned this Mar 1, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 1, 2026

@petruki petruki merged commit e706830 into master Mar 1, 2026
15 checks passed
@petruki petruki deleted the staging branch March 1, 2026 23:50
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

Successfully merging this pull request may close these issues.

1 participant