aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/surface/init_secure.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/surface/init_secure.cc')
-rw-r--r--src/core/lib/surface/init_secure.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/lib/surface/init_secure.cc b/src/core/lib/surface/init_secure.cc
index 78e983e0cd..28c6f7b121 100644
--- a/src/core/lib/surface/init_secure.cc
+++ b/src/core/lib/surface/init_secure.cc
@@ -67,9 +67,12 @@ static bool maybe_prepend_server_auth_filter(
}
void grpc_register_security_filters(void) {
- grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL, INT_MAX,
+ // 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,
+ grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX - 1,
maybe_prepend_client_auth_filter, nullptr);
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX,
maybe_prepend_server_auth_filter, nullptr);