Skip to content

xds: honor requested_server_name from TLS SNI#12771

Open
1seal wants to merge 1 commit intogrpc:masterfrom
1seal:codex/rbac-sni-requested-server-name
Open

xds: honor requested_server_name from TLS SNI#12771
1seal wants to merge 1 commit intogrpc:masterfrom
1seal:codex/rbac-sni-requested-server-name

Conversation

@1seal
Copy link
Copy Markdown

@1seal 1seal commented Apr 22, 2026

what changed

  • populate requested_server_name from the TLS SNI exposed by ExtendedSSLSession
  • add a regression test showing an RBAC deny policy can match the requested server name

why

RequestedServerNameMatcher was wired through the xDS RBAC engine, but GrpcAuthorizationEngine always returned an empty string for requested_server_name. That made policies depending on this field ineffective and could allow traffic that should have matched a deny policy.

impact

xDS RBAC policies that use requested_server_name now evaluate against the SNI the client presented during the TLS handshake instead of always seeing an empty value.

validation

  • ./gradlew --no-daemon --console=plain --info -PskipAndroid=true -PskipCodegen=true :grpc-xds:test --tests 'io.grpc.xds.internal.rbac.engine.GrpcAuthorizationEngineTest.requestedServerNameMatcher_matchesTlsSni'

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Apr 22, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: 1seal / name: 1seal (14f3c7c)

@kannanjgithub
Copy link
Copy Markdown
Contributor

You need to sign the Easy CLA before being able to contribute. Also is the PR still to undergo changes since it is in Draft state?

@1seal 1seal force-pushed the codex/rbac-sni-requested-server-name branch from 14f3c7c to 782b981 Compare May 7, 2026 13:24
@1seal 1seal marked this pull request as ready for review May 7, 2026 13:25
@1seal
Copy link
Copy Markdown
Author

1seal commented May 7, 2026

thanks for the reminder. EasyCLA is now green for @1seal.

i fixed the xDS checkstyle import-order issue that was causing the Linux test shards to fail, re-ran the focused checks locally, and moved the PR out of Draft.

local validation:

  • ./gradlew --no-daemon --console=plain -PskipAndroid=true -PskipCodegen=true :grpc-xds:checkstyleMain
  • ./gradlew --no-daemon --console=plain -PskipAndroid=true -PskipCodegen=true :grpc-xds:test --tests 'io.grpc.xds.internal.rbac.engine.GrpcAuthorizationEngineTest.requestedServerNameMatcher_matchesTlsSni' --rerun-tasks

no functional changes are currently planned; i’ll follow up if the refreshed CI shows anything else.

Read requested_server_name from the TLS SNI on ExtendedSSLSession so RBAC policies can match the value Envoy config provides. Add a regression test covering a deny policy that depends on the requested server name.
@1seal 1seal force-pushed the codex/rbac-sni-requested-server-name branch from 782b981 to 91637e5 Compare May 7, 2026 13:46
@1seal
Copy link
Copy Markdown
Author

1seal commented May 7, 2026

follow-up: the refreshed GitHub Actions and Codecov checks are green on the latest head.

the only remaining check i see is grpc-java-testing-pr (grpc-testing), whose summary says Needs /gcbrun from a collaborator.

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