Use latest etcd from release-3.3 branch for dropping ugorji
Pick up changes from: https://github.com/etcd-io/etcd/pull/10675 Change-Id: Ic4d6daa3c54824d3d27809a125b798e88db0bf7e
This commit is contained in:
15
vendor/github.com/coreos/etcd/auth/store.go
generated
vendored
15
vendor/github.com/coreos/etcd/auth/store.go
generated
vendored
@@ -982,10 +982,23 @@ func (as *authStore) AuthInfoFromTLS(ctx context.Context) *AuthInfo {
|
||||
cn := chain.Subject.CommonName
|
||||
plog.Debugf("found common name %s", cn)
|
||||
|
||||
return &AuthInfo{
|
||||
ai := &AuthInfo{
|
||||
Username: cn,
|
||||
Revision: as.Revision(),
|
||||
}
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
// gRPC-gateway proxy request to etcd server includes Grpcgateway-Accept
|
||||
// header. The proxy uses etcd client server certificate. If the certificate
|
||||
// has a CommonName we should never use this for authentication.
|
||||
if gw := md["grpcgateway-accept"]; len(gw) > 0 {
|
||||
plog.Warningf("ignoring common name in gRPC-gateway proxy request %s", ai.Username)
|
||||
return nil
|
||||
}
|
||||
return ai
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user