Skip to content

xds: honor requested_server_name from TLS SNI#12771

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

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'

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.
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

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.

1 participant