diff --git a/src/core/lib/surface/init_secure.cc b/src/core/lib/surface/init_secure.cc index 9700f43a55d..28c6f7b121f 100644 --- a/src/core/lib/surface/init_secure.cc +++ b/src/core/lib/surface/init_secure.cc @@ -67,6 +67,9 @@ static bool maybe_prepend_server_auth_filter( } void grpc_register_security_filters(void) { + // Register the auth client with a priority < INT_MAX to allow the authority + // filter -on which the auth filter depends- to be higher on the channel + // stack. grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL, INT_MAX - 1, maybe_prepend_client_auth_filter, nullptr); grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX - 1,