Skip to content

Add sni.yaml session ticket overrides#13006

Merged
bneradt merged 2 commits into
apache:masterfrom
bneradt:ats-ticket-config-in-sni-yaml
Mar 21, 2026
Merged

Add sni.yaml session ticket overrides#13006
bneradt merged 2 commits into
apache:masterfrom
bneradt:ats-ticket-config-in-sni-yaml

Conversation

@bneradt

@bneradt bneradt commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Add ssl_ticket_enabled and ssl_ticket_number as sni.yaml overrides, apply them during SNI handling so they affect TLS 1.2 resumption and TLS 1.3 ticket issuance, and add unit and AuTest coverage plus docs and sample config updates.

Fixes #12953

@bneradt bneradt added this to the 11.0.0 milestone Mar 20, 2026
@bneradt bneradt added the TLS label Mar 20, 2026
@bneradt bneradt self-assigned this Mar 20, 2026
@bneradt bneradt requested a review from Copilot March 20, 2026 17:35

Copilot AI 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.

Pull request overview

Adds per-SNI session ticket controls to ATS so sni.yaml can override global TLS session ticket enablement and TLSv1.3 ticket issuance count during inbound SNI handling (Fixes #12953).

Changes:

  • Extend sni.yaml parsing/schema and SNI action plumbing to support ssl_ticket_enabled and ssl_ticket_number.
  • Apply overrides during TLS handshake (including after SSL_CTX selection) so they affect TLS 1.2 resumption and TLS 1.3 ticket issuance.
  • Add/extend unit tests, gold test coverage, and update admin docs + sample config.

Reviewed changes

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

Show a summary per file
File Description
tests/gold_tests/tls/tls_sni_ticket.test.py New AuTest coverage for enabling/disabling tickets and setting TLSv1.3 ticket count via sni.yaml.
src/iocore/net/unit_tests/test_YamlSNIConfig.cc Unit test extended to validate parsing of the new keys.
src/iocore/net/unit_tests/test_SSLSNIConfig.cc Unit test extended to validate action generation for a config including ticket overrides.
src/iocore/net/unit_tests/sni_conf_test.yaml Test YAML updated with a tickets.com entry using the new keys.
src/iocore/net/YamlSNIConfig.cc Adds key validation + parsing + action creation for ticket override fields.
src/iocore/net/TLSSNISupport.cc Clears per-connection SNI “hints” when TLSSNISupport is cleared.
src/iocore/net/SSLUtils.cc Adds helper(s) and applies SNI-derived ticket settings during cert callback / ctx setup.
src/iocore/net/SNIActionPerformer.h Introduces new SNI action item types for ticket enable + ticket count overrides.
src/iocore/net/SNIActionPerformer.cc Implements the new SNI actions and stores override hints for later application.
include/iocore/net/YamlSNIConfig.h Adds key declarations and new optional fields to YamlSNIConfig::Item.
include/iocore/net/TLSSNISupport.h Adds optional hint fields for ticket enable/count overrides.
doc/admin-guide/files/sni.yaml.en.rst Documents ssl_ticket_enabled and ssl_ticket_number in sni.yaml.
configs/sni.yaml.default Adds sample/commented entries for the new keys.

Comment thread tests/gold_tests/tls/tls_sni_ticket.test.py
Comment thread tests/gold_tests/tls/tls_sni_ticket.test.py
Comment thread src/iocore/net/SSLUtils.cc Outdated
Comment thread tests/gold_tests/tls/tls_sni_ticket.test.py
Comment thread tests/gold_tests/tls/tls_sni_ticket.test.py
Add ssl_ticket_enabled and ssl_ticket_number as sni.yaml overrides, apply them during SNI handling so they affect TLS 1.2 resumption and TLS 1.3 ticket issuance, and add unit and AuTest coverage plus docs and sample config updates.

Fixes apache#12953
@bneradt bneradt force-pushed the ats-ticket-config-in-sni-yaml branch from 1c13a85 to 2e3687f Compare March 20, 2026 19:02
@bneradt bneradt requested a review from maskit March 20, 2026 19:11
maskit
maskit previously approved these changes Mar 20, 2026

@maskit maskit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good.

The limitation from BoringSSL is unfortunate but it can't be helped. It would be nice to print a warning message if the setting is used where BoringSSL is linked. It seems like the limitation is not noted on the documentation either (even for the one for records.yaml).

@bneradt

bneradt commented Mar 20, 2026

Copy link
Copy Markdown
Contributor Author

Looks good.

The limitation from BoringSSL is unfortunate but it can't be helped. It would be nice to print a warning message if the setting is used where BoringSSL is linked. It seems like the limitation is not noted on the documentation either (even for the one for records.yaml).

Good point! I pushed a commit updating the docs and the log.

@bneradt bneradt merged commit 8d75849 into apache:master Mar 21, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this to For v10.2.0 in ATS v10.2.x Mar 21, 2026
@bneradt bneradt deleted the ats-ticket-config-in-sni-yaml branch March 21, 2026 15:32
bneradt added a commit to bneradt/trafficserver that referenced this pull request Mar 31, 2026
Add ssl_ticket_enabled and ssl_ticket_number as sni.yaml overrides,
apply them during SNI handling so they affect TLS 1.2 resumption and TLS
1.3 ticket issuance, and add unit and AuTest coverage plus docs and
sample config updates.

Fixes apache#12953

(cherry picked from commit 8d75849)
@bneradt bneradt removed this from ATS v10.2.x Mar 31, 2026
@bneradt

bneradt commented Mar 31, 2026

Copy link
Copy Markdown
Contributor Author

10.2.x backport:
#13044

cmcfarlen pushed a commit that referenced this pull request Mar 31, 2026
Add ssl_ticket_enabled and ssl_ticket_number as sni.yaml overrides,
apply them during SNI handling so they affect TLS 1.2 resumption and TLS
1.3 ticket issuance, and add unit and AuTest coverage plus docs and
sample config updates.

Fixes #12953

(cherry picked from commit 8d75849)
@cmcfarlen cmcfarlen removed this from the 11.0.0 milestone Mar 31, 2026
@cmcfarlen

Copy link
Copy Markdown
Contributor

Added to milestone 10.2.0 via #13044

@zwoop zwoop added this to the Backported milestone May 7, 2026
@bneradt

bneradt commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

10.1.x backport:
#13297

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.

Session tickets need to be defined in sni.yaml

5 participants