mirror of https://github.com/grpc/grpc-java.git
docs: security requirement of NameResolver.getServiceAuthority() (#2665)
In response to #2662
This commit is contained in:
parent
65e4d9f47a
commit
9983a7b9e4
|
|
@ -49,11 +49,13 @@ import javax.annotation.concurrent.ThreadSafe;
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public abstract class NameResolver {
|
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
|
* <p>An implementation must generate it without blocking, typically in line, and
|
||||||
* unchanged. {@code NameResolver}s created from the same factory with the same argument must
|
* <strong>must</strong> keep it unchanged. {@code NameResolver}s created from the same factory
|
||||||
* return the same authority.
|
* with the same argument must return the same authority.
|
||||||
*/
|
*/
|
||||||
public abstract String getServiceAuthority();
|
public abstract String getServiceAuthority();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue