[PR #282] feat(#92): add SSL/TLS configuration support for HTTP requests #283

Open
opened 2026-02-15 21:16:34 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/282
Author: @Oscaner
Created: 1/16/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (1)

  • a2a7533 feat(#92): add configurable SSL/TLS support for httpx requests

📊 Changes

5 files changed (+599 additions, -0 deletions)

View changed files

📝 python/dify_plugin/__init__.py (+3 -0)
📝 python/dify_plugin/config/config.py (+14 -0)
python/dify_plugin/core/utils/ssl.py (+110 -0)
python/examples/.env.ssl.example (+33 -0)
python/tests/test_ssl_config.py (+439 -0)

📄 Description

Add comprehensive SSL/TLS configuration capabilities to the plugin system:

  • Add environment variables for SSL verification control, custom CA certificates, and mTLS client authentication
  • Implement httpx.Client monkey patch to automatically apply SSL settings from environment configuration
  • Support base64-encoded certificate data (CA cert, client cert, and client key) to avoid file system dependencies
  • Enable SSL verification bypass for development/testing environments
  • Apply SSL patches at module import time to ensure all HTTP requests use configured settings

This allows plugins to communicate securely with services using custom certificates or mutual TLS authentication without code changes in individual HTTP client implementations.

Pull Request Checklist

Thank you for your contribution! Before submitting your PR, please make sure you have completed the following checks:

Compatibility Check

  • I have checked whether this change affects the backward compatibility of the plugin declared in README.md
  • I have checked whether this change affects the forward compatibility of the plugin declared in README.md
  • If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the README.md
  • I have described the compatibility impact and the corresponding version number in the PR description
  • I have checked whether the plugin version is updated in the README.md

Available Checks

  • Code has passed local tests
  • Relevant documentation has been updated (if necessary)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-sdks/pull/282 **Author:** [@Oscaner](https://github.com/Oscaner) **Created:** 1/16/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`a2a7533`](https://github.com/langgenius/dify-plugin-sdks/commit/a2a7533bc9c4b93bcdb68b4b212d654d7f7b1028) feat(#92): add configurable SSL/TLS support for httpx requests ### 📊 Changes **5 files changed** (+599 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `python/dify_plugin/__init__.py` (+3 -0) 📝 `python/dify_plugin/config/config.py` (+14 -0) ➕ `python/dify_plugin/core/utils/ssl.py` (+110 -0) ➕ `python/examples/.env.ssl.example` (+33 -0) ➕ `python/tests/test_ssl_config.py` (+439 -0) </details> ### 📄 Description Add comprehensive SSL/TLS configuration capabilities to the plugin system: - Add environment variables for SSL verification control, custom CA certificates, and mTLS client authentication - Implement httpx.Client monkey patch to automatically apply SSL settings from environment configuration - Support base64-encoded certificate data (CA cert, client cert, and client key) to avoid file system dependencies - Enable SSL verification bypass for development/testing environments - Apply SSL patches at module import time to ensure all HTTP requests use configured settings This allows plugins to communicate securely with services using custom certificates or mutual TLS authentication without code changes in individual HTTP client implementations. # Pull Request Checklist Thank you for your contribution! Before submitting your PR, please make sure you have completed the following checks: ## Compatibility Check - [x] I have checked whether this change affects the **backward compatibility** of the plugin declared in `README.md` - [x] I have checked whether this change affects the **forward compatibility** of the plugin declared in `README.md` - [x] If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the `README.md` - [x] I have described the compatibility impact and the corresponding version number in the PR description - [x] I have checked whether the plugin version is updated in the `README.md` ## Available Checks - [x] Code has passed local tests - [x] Relevant documentation has been updated (if necessary) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 21:16:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-sdks#283