Skip to content

Comments

feat: cert file and TLS skip verify#44

Merged
mfiedorowicz merged 7 commits intodevelopfrom
feat-diode-cert-file
Sep 3, 2025
Merged

feat: cert file and TLS skip verify#44
mfiedorowicz merged 7 commits intodevelopfrom
feat-diode-cert-file

Conversation

@mfiedorowicz
Copy link
Member

This pull request introduces support for custom TLS certificates and improved TLS verification controls in the Diode SDK, along with updates to the SDK version, documentation, and CI configuration. The changes add new environment variables and client options for managing TLS, update certificate loading logic, and clarify secure/insecure connection handling. Additionally, the CI workflows and linting configuration are modernized, and documentation is expanded to explain the new features.

TLS/certificate support improvements:

  • Added support for custom TLS certificates via the DIODE_CERT_FILE environment variable and the WithCertFile client option; also introduced DIODE_SKIP_TLS_VERIFY and WithSkipTLSVerify to control TLS verification. Certificate loading logic now allows specifying a custom cert file or using system certs. (diode/client.go, [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]; diode/testdata/test-cert.pem, [12]

  • Updated connection logic to distinguish between secure (grpcs://, https://) and insecure (grpc://, http://) schemes, enabling or disabling TLS verification accordingly, and allowing legacy certificate support. (diode/client.go, [1] [2] [3] [4] [5]

Documentation updates:

  • Expanded the README.md to document new TLS environment variables, client options, and usage examples, including secure/insecure scheme handling and custom certificate instructions. (README.md, F3e782d8L21R21, README.mdR122-R166)

Version and configuration updates:

CI and linting improvements:

  • Updated GitHub Actions workflows to use newer versions of Go and the golangci-lint action, and modernized the golangci.yaml configuration for improved linting and formatting. (.github/workflows/lint.yaml, [1]; .github/workflows/test.yaml, [2]; .github/golangci.yaml, [3]

Miscellaneous:

  • Minor import reordering for clarity in diode/dryrun.go.

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

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
@mfiedorowicz mfiedorowicz self-assigned this Sep 1, 2025
@github-actions github-actions bot added documentation Improvements or additions to documentation github-actions go markdown labels Sep 1, 2025
@github-actions
Copy link

github-actions bot commented Sep 1, 2025

Go test coverage

STATUS ELAPSED PACKAGE COVER PASS FAIL SKIP
🟢 PASS 0.21s github.com/netboxlabs/diode-sdk-go/cmd/diode-replay-dryrun 0.0% 0 0 0
🟢 PASS 1.34s github.com/netboxlabs/diode-sdk-go/diode 19.2% 252 0 0

Total coverage: 79.3%

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
@mfiedorowicz mfiedorowicz merged commit e5634dc into develop Sep 3, 2025
6 checks passed
@mfiedorowicz mfiedorowicz deleted the feat-diode-cert-file branch September 3, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github-actions go markdown

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants