diff --git a/core/src/main/java/io/grpc/NameResolver.java b/core/src/main/java/io/grpc/NameResolver.java index a7fa94d87c..1217fbd6d8 100644 --- a/core/src/main/java/io/grpc/NameResolver.java +++ b/core/src/main/java/io/grpc/NameResolver.java @@ -49,11 +49,13 @@ import javax.annotation.concurrent.ThreadSafe; @ThreadSafe public abstract class NameResolver { /** - * Returns the authority, which is also the name of the service. + * Returns the authority used to authenticate connections to servers. It must be + * from a trusted source, because if the authority is tampered with, RPCs may be sent to the + * attackers which may leak sensitive user data. * - *

An implementation must generate it locally and must keep it - * unchanged. {@code NameResolver}s created from the same factory with the same argument must - * return the same authority. + *

An implementation must generate it without blocking, typically in line, and + * must keep it unchanged. {@code NameResolver}s created from the same factory + * with the same argument must return the same authority. */ public abstract String getServiceAuthority();