Skip to content

feat: cert file and TLS skip verify - #62

Merged
mfiedorowicz merged 10 commits into
developfrom
feat-diode-cert-file
Aug 28, 2025
Merged

feat: cert file and TLS skip verify#62
mfiedorowicz merged 10 commits into
developfrom
feat-diode-cert-file

Conversation

@mfiedorowicz

@mfiedorowicz mfiedorowicz commented Aug 28, 2025

Copy link
Copy Markdown
Member

This pull request adds support for custom TLS certificate files and configurable TLS verification for the Diode client, improving security and flexibility when connecting to secure endpoints. It introduces new environment variables and constructor parameters, updates documentation, and refactors certificate handling logic to allow users to specify custom certificates and control TLS verification behavior.

TLS and Certificate Handling Improvements:

  • Added support for specifying a custom certificate file via the cert_file parameter in DiodeClient and the DIODE_CERT_FILE environment variable; certificates are loaded and used for secure connections. [1] [2] [3]
  • Introduced the DIODE_SKIP_TLS_VERIFY environment variable and logic to control TLS verification based on the target URL scheme and environment variable, allowing users to disable verification for testing or non-production use. [1] [2]
  • Refactored certificate loading and TLS verification checks to ensure correct behavior for both secure and insecure schemes, and passed loaded certificates through authentication and connection setup. [1] [2] [3] [4]

Documentation Updates:

  • Updated README.md to document new environment variables (DIODE_CERT_FILE, DIODE_SKIP_TLS_VERIFY), constructor parameters, and provided usage examples for custom certificates and TLS verification settings. [1] [2]

Configuration Refactoring:

  • Centralized environment variable definitions and improved configuration value retrieval for TLS and certificate-related settings.

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
…certificates and TLS verification

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
…e usage

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
@github-actions

github-actions Bot commented Aug 28, 2025

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/netboxlabs/diode/sdk
   client.py256598%303, 364, 369, 373, 461
TOTAL290598% 

Tests Skipped Failures Errors Time
109 0 💤 0 ❌ 0 🔥 1.276s ⏱️

@leoparente leoparente left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mfiedorowicz mfiedorowicz changed the title feat: cert file and tls skip verify feat: cert file and TLS skip verify Aug 28, 2025
@mfiedorowicz
mfiedorowicz merged commit 62bb757 into develop Aug 28, 2025
6 checks passed
@mfiedorowicz
mfiedorowicz deleted the feat-diode-cert-file branch August 28, 2025 15:11
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants