Skip to content

xds: Remove isXdsSniEnabled and align SNI logic with gRFC A101#12625

Open
becomeStar wants to merge 1 commit intogrpc:masterfrom
becomeStar:cleanup/xds-sni-legacy
Open

xds: Remove isXdsSniEnabled and align SNI logic with gRFC A101#12625
becomeStar wants to merge 1 commit intogrpc:masterfrom
becomeStar:cleanup/xds-sni-legacy

Conversation

@becomeStar
Copy link
Contributor

@becomeStar becomeStar commented Jan 25, 2026

Description

Remove the isXdsSniEnabled environment variable guard and the legacy logic that falls back to the channel authority for SNI. This aligns the implementation with gRFC A101, ensuring no SNI is sent if it is not explicitly determined by xDS configurations.

Changes

Update the test suite by removing the isXdsSniEnabled flag and deleting test case that specifically verified behavior when the flag was set to false. Additionally, add a new test case to verify that SNI is omitted when none of the A101 conditions are met, ensuring the SNI field is not sent in the TLS handshake.

Note for Reviewers

Some test files show large diffs because of re-indentation after removing try-finally blocks (since the isXdsSniEnabled flag is no longer needed). I recommend reviewing these files with the 'Hide whitespace changes' option enabled.

Ref #11784

Remove the isXdsSniEnabled environment variable guard and the legacy
logic that falls back to the channel authority for SNI. This aligns
the implementation with gRFC A101, ensuring no SNI is sent if it is
not explicitly determined by xDS configurations.

Update the test suite by removing the isXdsSniEnabled flag and deleting
test case that specifically verified behavior when the flag was set to
false. Additionally, add a new test case to verify that SNI is omitted
when none of the A101 conditions are met, ensuring the SNI field is
not sent in the TLS handshake.

Ref grpc#11784
@becomeStar becomeStar changed the title xds: Remove isXdsSniEnabled flag and update xDS SNI tests xds: Remove isXdsSniEnabled and align SNI logic with gRFC A101 Jan 25, 2026
Copy link
Contributor

@kannanjgithub kannanjgithub left a comment

Choose a reason for hiding this comment

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

Minor comment.

sniToUse = grpcHandler.getAuthority();
} else {
autoSniSanValidationDoesNotApply = false;
sniToUse = "";
Copy link
Contributor

Choose a reason for hiding this comment

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

This assignment is redundant.

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.

2 participants