Skip to content

Conversation

@NikToloknov
Copy link

Expose configuration options for TLS MinVersion, MaxVersion, and CipherSuites backed by crypto/tls. This allows LiveKit to interoperate with providers that require non-default or legacy TLS configurations.

Expose configuration options for TLS MinVersion, MaxVersion, and CipherSuites
backed by crypto/tls. This allows LiveKit to interoperate with providers that
require non-default or legacy TLS configurations.
@NikToloknov NikToloknov requested a review from a team as a code owner January 26, 2026 22:37
@CLAassistant
Copy link

CLAassistant commented Jan 26, 2026

CLA assistant check
All committers have signed the CLA.

@NikToloknov NikToloknov marked this pull request as draft January 26, 2026 22:38
Copy link
Contributor

@dennwc dennwc left a comment

Choose a reason for hiding this comment

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

Looks good, just a few minor adjustments.

Certs []TLSCert `yaml:"certs"`
KeyLog string `yaml:"key_log"`

MinVersion string `yaml:"min_version"` // min TLS version, accepts: "1.0", "1.1", "1.2", "1.3"
Copy link
Contributor

Choose a reason for hiding this comment

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

Values like 1.0 are dangerous in YAML, since they will be interpreted as a number by default. The user must then know to set it to "1.0" (a string).

So I'd propose we settle on accepting just tls1.0 and/or TLS1.0.

Copy link
Author

Choose a reason for hiding this comment

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

Good point, thanks. I’ve updated the code to accept only TLS1.0 and tls1.0 to avoid YAML numeric parsing issues.

pkg/sip/tls.go Outdated

// ParseCipherSuites parses cipher suite names to uint16 IDs.
// Logs a warning for each insecure cipher suite configured.
func ParseCipherSuites(suites []string, log logger.Logger) ([]uint16, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func ParseCipherSuites(suites []string, log logger.Logger) ([]uint16, error) {
func ParseCipherSuites(log logger.Logger, suites []string) ([]uint16, error) {

pkg/sip/tls.go Outdated

// ParseCipherSuites parses cipher suite names to uint16 IDs.
// Logs a warning for each insecure cipher suite configured.
func ParseCipherSuites(suites []string, log logger.Logger) ([]uint16, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func ParseCipherSuites(suites []string, log logger.Logger) ([]uint16, error) {
func parseCipherSuites(suites []string, log logger.Logger) ([]uint16, error) {

Can be unexported, since these are only used it this package.

pkg/sip/tls.go Outdated

// ParseTLSVersion parses a TLS version string to its uint16 constant.
// Accepts formats: "1.0", "1.1", "1.2", "1.3" or "TLS 1.0", "TLS 1.1", "TLS 1.2", "TLS 1.3".
func ParseTLSVersion(version string) (uint16, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func ParseTLSVersion(version string) (uint16, error) {
func parseTLSVersion(version string) (uint16, error) {

Same here - can be unexported.

@NikToloknov NikToloknov force-pushed the feature/tls-cipher-suites branch from 731d552 to 3654345 Compare January 27, 2026 19:40
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 61.22449% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.61%. Comparing base (0460b40) to head (3654345).
⚠️ Report is 213 commits behind head on main.

Files with missing lines Patch % Lines
pkg/sip/service.go 0.00% 15 Missing ⚠️
pkg/sip/tls.go 88.23% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
- Coverage   65.25%   64.61%   -0.64%     
==========================================
  Files          51       34      -17     
  Lines        6588     6478     -110     
==========================================
- Hits         4299     4186     -113     
+ Misses       1915     1875      -40     
- Partials      374      417      +43     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants