feat(tls): enable configurable tls cipher suites and support legacy ciphers#1384
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for configurable TLS cipher suites to the ClientConfig, enabling users to specify custom cipher suites including legacy options for backward compatibility with older systems. The feature allows fine-grained control over TLS negotiation behavior.
- Added
TLSCipherSuitesfield toClientConfigstruct with TOML configuration support - Implemented cipher suite parsing and validation in the TLS config generation logic
- Added comprehensive configuration examples with a variety of modern and legacy cipher suites
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/tls/config.go | Added TLSCipherSuites field to ClientConfig struct and implemented cipher suite parsing logic in TLSConfig() method |
| conf/input.http_response/http_response.toml | Added configuration examples for TLS version settings and cipher suite options with 16 different cipher suites |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| InsecureSkipVerify bool `toml:"insecure_skip_verify" json:"insecure_skip_verify"` | ||
| ServerName string `toml:"tls_server_name" json:"tls_server_name"` |
There was a problem hiding this comment.
JSON tags have been added to InsecureSkipVerify and ServerName fields but not to other fields in the ClientConfig struct. This creates an inconsistent serialization interface. Either add JSON tags to all fields that should be serializable, or remove them from these two fields to maintain consistency with the rest of the struct which only uses TOML tags.
| InsecureSkipVerify bool `toml:"insecure_skip_verify" json:"insecure_skip_verify"` | |
| ServerName string `toml:"tls_server_name" json:"tls_server_name"` | |
| InsecureSkipVerify bool `toml:"insecure_skip_verify"` | |
| ServerName string `toml:"tls_server_name"` |
…iphers