Compare commits

...

6 Commits

Author SHA1 Message Date
Gyuho Lee
06cec40911 version: 3.2.26
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-01-11 10:04:58 -08:00
Gyuho Lee
ab4693d97f Merge pull request #10386 from hexfusion/release-3.2
[Cherry-pick 3.2] auth: disable CommonName auth for gRPC-gateway
2019-01-11 10:01:12 -08:00
Sam Batschelet
a2b420c364 auth: disable CommonName auth for gRPC-gateway
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-01-08 21:09:07 +00:00
Gyuho Lee
dfd8fe97c5 Merge pull request #10334 from gyuho/patch-grpc-proxy
[Cherry-pick 3.2] grpcproxy: fix memory leak
2018-12-17 20:35:23 -08:00
Igor German
ada4af3b2a grpcproxy: fix memory leak
use set instead of slice as interval value

fixes #10326
2018-12-17 18:58:04 -08:00
Joe Betz
2e27fef277 version: bump up to 3.2.25+git 2018-10-10 11:13:42 -07:00
3 changed files with 22 additions and 6 deletions

View File

@@ -981,10 +981,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
}
}

View File

@@ -99,9 +99,12 @@ func (c *cache) Add(req *pb.RangeRequest, resp *pb.RangeResponse) {
iv = c.cachedRanges.Find(ivl)
if iv == nil {
c.cachedRanges.Insert(ivl, []string{key})
val := map[string]struct{}{key: {}}
c.cachedRanges.Insert(ivl, val)
} else {
iv.Val = append(iv.Val.([]string), key)
val := iv.Val.(map[string]struct{})
val[key] = struct{}{}
iv.Val = val
}
}
@@ -141,8 +144,8 @@ func (c *cache) Invalidate(key, endkey []byte) {
ivs = c.cachedRanges.Stab(ivl)
for _, iv := range ivs {
keys := iv.Val.([]string)
for _, key := range keys {
keys := iv.Val.(map[string]struct{})
for key := range keys {
c.lru.Remove(key)
}
}

View File

@@ -26,7 +26,7 @@ import (
var (
// MinClusterVersion is the min cluster version this etcd binary is compatible with.
MinClusterVersion = "3.0.0"
Version = "3.2.25"
Version = "3.2.26"
APIVersion = "unknown"
// Git SHA Value will be set during build