Skip to content

Commit

Permalink
docs: security requirement of NameResolver.getServiceAuthority() (#2665)
Browse files Browse the repository at this point in the history
In response to #2662
  • Loading branch information
zhangkun83 authored Jan 27, 2017
1 parent 65e4d9f commit 9983a7b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/src/main/java/io/grpc/NameResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@
@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 <strong>must</strong> 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.
*
* <p>An implementation must generate it locally and <string>must</strong> keep it
* unchanged. {@code NameResolver}s created from the same factory with the same argument must
* return the same authority.
* <p>An implementation must generate it without blocking, typically in line, and
* <strong>must</strong> keep it unchanged. {@code NameResolver}s created from the same factory
* with the same argument must return the same authority.
*/
public abstract String getServiceAuthority();

Expand Down

0 comments on commit 9983a7b

Please sign in to comment.