mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Backport #13577
Disable auth gracefully without impacting existing watchers. Signed-off-by: Lan Liang <gcslyp@gmail.com>
This commit is contained in:
@@ -1160,6 +1160,9 @@ func (as *authStore) AuthInfoFromTLS(ctx context.Context) (ai *AuthInfo) {
|
||||
}
|
||||
|
||||
func (as *authStore) AuthInfoFromCtx(ctx context.Context) (*AuthInfo, error) {
|
||||
if !as.IsAuthEnabled() {
|
||||
return nil, nil
|
||||
}
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil, nil
|
||||
|
||||
Reference in New Issue
Block a user