Skip to content

[SOC2] Add TLS 1.3 support alongside TLS 1.2#98

Merged
jasontwong merged 3 commits into
mainfrom
jwong-eng-1713
May 5, 2026
Merged

[SOC2] Add TLS 1.3 support alongside TLS 1.2#98
jasontwong merged 3 commits into
mainfrom
jwong-eng-1713

Conversation

@jasontwong
Copy link
Copy Markdown
Contributor

Summary

  • Adds :"tlsv1.3" to the :versions list in build_config/2 so all TLS connections (Tesla HTTP client and Slipstream WebSocket) can negotiate TLS 1.3 on OTP 27, while retaining TLS 1.2 for backward compatibility with older gateways
  • The fix targets build_config/2 (the actual SSL construction site in new/1) — not base_config/1, which is overwritten before TLS options take effect
  • OTP 27 is used across all build environments, so TLS 1.3 is fully supported; no cipher suite changes are needed as OTP defaults handle TLS 1.3 suites automatically

Test plan

  • mix test test/peridiod/config_test.exs — new assertion confirms both :"tlsv1.2" and :"tlsv1.3" present in config.ssl[:versions]
  • mix test — full suite passes (252 tests, 0 failures)
  • (post-merge smoke) Verify negotiated protocol is :"tlsv1.3" against staging cloud via :ssl.connection_information/1

Closes ENG-1713.

Copilot AI review requested due to automatic review settings May 1, 2026 14:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds explicit TLS 1.3 support to Peridiod’s outbound TLS configuration while keeping TLS 1.2 enabled for compatibility, and introduces a regression test to lock the expected TLS versions list.

Changes:

  • Extend the SSL options built in Peridiod.Config.build_config/2 to include both :"tlsv1.2" and :"tlsv1.3".
  • Add a config test asserting the configured SSL versions include TLS 1.2 and TLS 1.3.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/peridiod/config.ex Adds versions: [:"tlsv1.2", :"tlsv1.3"] to the constructed SSL client options.
test/peridiod/config_test.exs Adds a new test verifying the SSL :versions list contains TLS 1.2 and TLS 1.3.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/peridiod/config.ex
jasontwong added 2 commits May 4, 2026 14:04
Adds :"tlsv1.3" to the ssl :versions list in build_config/2 so
all transports (Tesla HTTP and Slipstream WebSocket) can negotiate
TLS 1.3 with OTP 27, while retaining TLS 1.2 for backward
compatibility. Also adds a test asserting both versions are present.

Closes ENG-1713.
build_config/2 overwrites the ssl keyword list entirely, making the
:versions put_new in base_config/1 dead code. Remove it to avoid
a misleading second default that doesn't match the live configuration.
Copilot AI review requested due to automatic review settings May 4, 2026 18:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/peridiod/config.ex
Comment thread test/peridiod/config_test.exs Outdated
- Reorder TLS versions to prefer 1.3 over 1.2
- Use membership assertions in test instead of exact list equality
@jasontwong jasontwong requested a review from lee-reinhardt May 4, 2026 18:24
@jasontwong jasontwong merged commit faa6ac8 into main May 5, 2026
3 checks passed
@jasontwong jasontwong deleted the jwong-eng-1713 branch May 5, 2026 16:03
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