etcd/etcdserver/etcdserverpb/raft_internal.pb.go

2287 lines
60 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-gogo. DO NOT EDIT.
2015-08-08 15:29:18 +03:00
// source: raft_internal.proto
package etcdserverpb
import (
"fmt"
2015-08-08 15:29:18 +03:00
2016-07-18 19:33:32 +03:00
proto "github.com/golang/protobuf/proto"
2015-08-08 15:29:18 +03:00
2016-04-14 02:23:07 +03:00
math "math"
_ "github.com/gogo/protobuf/gogoproto"
membershippb "go.etcd.io/etcd/etcdserver/api/membership/membershippb"
2016-10-04 00:43:06 +03:00
io "io"
)
2015-08-08 15:29:18 +03:00
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
2015-08-08 15:29:18 +03:00
type RequestHeader struct {
ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
// username is a username that is associated with an auth token of gRPC connection
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
auth, etcdserver: introduce revision of authStore for avoiding TOCTOU problem This commit introduces revision of authStore. The revision number represents a version of authStore that is incremented by updating auth related information. The revision is required for avoiding TOCTOU problems. Currently there are two types of the TOCTOU problems in v3 auth. The first one is in ordinal linearizable requests with a sequence like below (): 1. Request from client CA is processed in follower FA. FA looks up the username (let it U) for the request from a token of the request. At this time, the request is authorized correctly. 2. Another request from client CB is processed in follower FB. CB is for changing U's password. 3. FB forwards the request from CB to the leader before FA. Now U's password is updated and the request from CA should be rejected. 4. However, the request from CA is processed by the leader because authentication is already done in FA. For avoiding the above sequence, this commit lets etcdserverpb.RequestHeader have a member revision. The member is initialized during authentication by followers and checked in a leader. If the revision in RequestHeader is lower than the leader's authStore revision, it means a sequence like above happened. In such a case, the state machine returns auth.ErrAuthRevisionObsolete. The error code lets nodes retry their requests. The second one, a case of serializable range and txn, is more subtle. Because these requests are processed in follower directly. The TOCTOU problem can be caused by a sequence like below: 1. Serializable request from client CA is processed in follower FA. At first, FA looks up the username (let it U) and its permission before actual access to KV. 2. Another request from client CB is processed in follower FB and forwarded to the leader. The cluster including FA now commits a log entry of the request from CB. Assume the request changed the permission or password of U. 3. Now the serializable request from CA is accessing to KV. Even if the access is allowed at the point of 1, now it can be invalid because of the change introduced in 2. For avoiding the above sequence, this commit lets the functions of serializable requests (EtcdServer.Range() and EtcdServer.Txn()) compare the revision in the request header with the latest revision of authStore after the actual access. If the saved revision is lower than the latest one, it means the permission can be changed. Although it would introduce false positives (e.g. changing other user's password), it prevents the TOCTOU problem. This idea is an implementation of Anthony's comment: https://github.com/coreos/etcd/pull/5739#issuecomment-228128254
2016-06-23 12:31:12 +03:00
// auth_revision is a revision number of auth.authStore. It is not related to mvcc
AuthRevision uint64 `protobuf:"varint,3,opt,name=auth_revision,json=authRevision,proto3" json:"auth_revision,omitempty"`
}
func (m *RequestHeader) Reset() { *m = RequestHeader{} }
func (m *RequestHeader) String() string { return proto.CompactTextString(m) }
func (*RequestHeader) ProtoMessage() {}
func (*RequestHeader) Descriptor() ([]byte, []int) { return fileDescriptorRaftInternal, []int{0} }
2015-08-08 15:29:18 +03:00
// An InternalRaftRequest is the union of all requests which can be
// sent via raft.
type InternalRaftRequest struct {
Header *RequestHeader `protobuf:"bytes,100,opt,name=header" json:"header,omitempty"`
ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
V2 *Request `protobuf:"bytes,2,opt,name=v2" json:"v2,omitempty"`
Range *RangeRequest `protobuf:"bytes,3,opt,name=range" json:"range,omitempty"`
Put *PutRequest `protobuf:"bytes,4,opt,name=put" json:"put,omitempty"`
DeleteRange *DeleteRangeRequest `protobuf:"bytes,5,opt,name=delete_range,json=deleteRange" json:"delete_range,omitempty"`
Txn *TxnRequest `protobuf:"bytes,6,opt,name=txn" json:"txn,omitempty"`
Compaction *CompactionRequest `protobuf:"bytes,7,opt,name=compaction" json:"compaction,omitempty"`
LeaseGrant *LeaseGrantRequest `protobuf:"bytes,8,opt,name=lease_grant,json=leaseGrant" json:"lease_grant,omitempty"`
LeaseRevoke *LeaseRevokeRequest `protobuf:"bytes,9,opt,name=lease_revoke,json=leaseRevoke" json:"lease_revoke,omitempty"`
Alarm *AlarmRequest `protobuf:"bytes,10,opt,name=alarm" json:"alarm,omitempty"`
LeaseCheckpoint *LeaseCheckpointRequest `protobuf:"bytes,11,opt,name=lease_checkpoint,json=leaseCheckpoint" json:"lease_checkpoint,omitempty"`
AuthEnable *AuthEnableRequest `protobuf:"bytes,1000,opt,name=auth_enable,json=authEnable" json:"auth_enable,omitempty"`
AuthDisable *AuthDisableRequest `protobuf:"bytes,1011,opt,name=auth_disable,json=authDisable" json:"auth_disable,omitempty"`
AuthStatus *AuthStatusRequest `protobuf:"bytes,1013,opt,name=auth_status,json=authStatus" json:"auth_status,omitempty"`
Authenticate *InternalAuthenticateRequest `protobuf:"bytes,1012,opt,name=authenticate" json:"authenticate,omitempty"`
AuthUserAdd *AuthUserAddRequest `protobuf:"bytes,1100,opt,name=auth_user_add,json=authUserAdd" json:"auth_user_add,omitempty"`
AuthUserDelete *AuthUserDeleteRequest `protobuf:"bytes,1101,opt,name=auth_user_delete,json=authUserDelete" json:"auth_user_delete,omitempty"`
AuthUserGet *AuthUserGetRequest `protobuf:"bytes,1102,opt,name=auth_user_get,json=authUserGet" json:"auth_user_get,omitempty"`
AuthUserChangePassword *AuthUserChangePasswordRequest `protobuf:"bytes,1103,opt,name=auth_user_change_password,json=authUserChangePassword" json:"auth_user_change_password,omitempty"`
AuthUserGrantRole *AuthUserGrantRoleRequest `protobuf:"bytes,1104,opt,name=auth_user_grant_role,json=authUserGrantRole" json:"auth_user_grant_role,omitempty"`
AuthUserRevokeRole *AuthUserRevokeRoleRequest `protobuf:"bytes,1105,opt,name=auth_user_revoke_role,json=authUserRevokeRole" json:"auth_user_revoke_role,omitempty"`
AuthUserList *AuthUserListRequest `protobuf:"bytes,1106,opt,name=auth_user_list,json=authUserList" json:"auth_user_list,omitempty"`
AuthRoleList *AuthRoleListRequest `protobuf:"bytes,1107,opt,name=auth_role_list,json=authRoleList" json:"auth_role_list,omitempty"`
AuthRoleAdd *AuthRoleAddRequest `protobuf:"bytes,1200,opt,name=auth_role_add,json=authRoleAdd" json:"auth_role_add,omitempty"`
AuthRoleDelete *AuthRoleDeleteRequest `protobuf:"bytes,1201,opt,name=auth_role_delete,json=authRoleDelete" json:"auth_role_delete,omitempty"`
AuthRoleGet *AuthRoleGetRequest `protobuf:"bytes,1202,opt,name=auth_role_get,json=authRoleGet" json:"auth_role_get,omitempty"`
AuthRoleGrantPermission *AuthRoleGrantPermissionRequest `protobuf:"bytes,1203,opt,name=auth_role_grant_permission,json=authRoleGrantPermission" json:"auth_role_grant_permission,omitempty"`
AuthRoleRevokePermission *AuthRoleRevokePermissionRequest `protobuf:"bytes,1204,opt,name=auth_role_revoke_permission,json=authRoleRevokePermission" json:"auth_role_revoke_permission,omitempty"`
ClusterVersionSet *membershippb.ClusterVersionSetRequest `protobuf:"bytes,1300,opt,name=cluster_version_set,json=clusterVersionSet" json:"cluster_version_set,omitempty"`
ClusterMemberAttrSet *membershippb.ClusterMemberAttrSetRequest `protobuf:"bytes,1301,opt,name=cluster_member_attr_set,json=clusterMemberAttrSet" json:"cluster_member_attr_set,omitempty"`
2015-08-08 15:29:18 +03:00
}
2016-04-26 00:08:33 +03:00
func (m *InternalRaftRequest) Reset() { *m = InternalRaftRequest{} }
func (m *InternalRaftRequest) String() string { return proto.CompactTextString(m) }
func (*InternalRaftRequest) ProtoMessage() {}
func (*InternalRaftRequest) Descriptor() ([]byte, []int) { return fileDescriptorRaftInternal, []int{1} }
2015-08-08 15:29:18 +03:00
type EmptyResponse struct {
}
2016-04-26 00:08:33 +03:00
func (m *EmptyResponse) Reset() { *m = EmptyResponse{} }
func (m *EmptyResponse) String() string { return proto.CompactTextString(m) }
func (*EmptyResponse) ProtoMessage() {}
func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptorRaftInternal, []int{2} }
// What is the difference between AuthenticateRequest (defined in rpc.proto) and InternalAuthenticateRequest?
// InternalAuthenticateRequest has a member that is filled by etcdserver and shouldn't be user-facing.
// For avoiding misusage the field, we have an internal version of AuthenticateRequest.
type InternalAuthenticateRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
// simple_token is generated in API layer (etcdserver/v3_server.go)
SimpleToken string `protobuf:"bytes,3,opt,name=simple_token,json=simpleToken,proto3" json:"simple_token,omitempty"`
}
func (m *InternalAuthenticateRequest) Reset() { *m = InternalAuthenticateRequest{} }
func (m *InternalAuthenticateRequest) String() string { return proto.CompactTextString(m) }
func (*InternalAuthenticateRequest) ProtoMessage() {}
func (*InternalAuthenticateRequest) Descriptor() ([]byte, []int) {
return fileDescriptorRaftInternal, []int{3}
}
func init() {
proto.RegisterType((*RequestHeader)(nil), "etcdserverpb.RequestHeader")
proto.RegisterType((*InternalRaftRequest)(nil), "etcdserverpb.InternalRaftRequest")
proto.RegisterType((*EmptyResponse)(nil), "etcdserverpb.EmptyResponse")
proto.RegisterType((*InternalAuthenticateRequest)(nil), "etcdserverpb.InternalAuthenticateRequest")
}
2016-11-10 22:53:48 +03:00
func (m *RequestHeader) Marshal() (dAtA []byte, err error) {
size := m.Size()
2016-11-10 22:53:48 +03:00
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
2016-11-10 22:53:48 +03:00
return dAtA[:n], nil
}
2016-11-10 22:53:48 +03:00
func (m *RequestHeader) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.ID != 0 {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x8
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.ID))
}
if len(m.Username) > 0 {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x12
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(len(m.Username)))
i += copy(dAtA[i:], m.Username)
}
auth, etcdserver: introduce revision of authStore for avoiding TOCTOU problem This commit introduces revision of authStore. The revision number represents a version of authStore that is incremented by updating auth related information. The revision is required for avoiding TOCTOU problems. Currently there are two types of the TOCTOU problems in v3 auth. The first one is in ordinal linearizable requests with a sequence like below (): 1. Request from client CA is processed in follower FA. FA looks up the username (let it U) for the request from a token of the request. At this time, the request is authorized correctly. 2. Another request from client CB is processed in follower FB. CB is for changing U's password. 3. FB forwards the request from CB to the leader before FA. Now U's password is updated and the request from CA should be rejected. 4. However, the request from CA is processed by the leader because authentication is already done in FA. For avoiding the above sequence, this commit lets etcdserverpb.RequestHeader have a member revision. The member is initialized during authentication by followers and checked in a leader. If the revision in RequestHeader is lower than the leader's authStore revision, it means a sequence like above happened. In such a case, the state machine returns auth.ErrAuthRevisionObsolete. The error code lets nodes retry their requests. The second one, a case of serializable range and txn, is more subtle. Because these requests are processed in follower directly. The TOCTOU problem can be caused by a sequence like below: 1. Serializable request from client CA is processed in follower FA. At first, FA looks up the username (let it U) and its permission before actual access to KV. 2. Another request from client CB is processed in follower FB and forwarded to the leader. The cluster including FA now commits a log entry of the request from CB. Assume the request changed the permission or password of U. 3. Now the serializable request from CA is accessing to KV. Even if the access is allowed at the point of 1, now it can be invalid because of the change introduced in 2. For avoiding the above sequence, this commit lets the functions of serializable requests (EtcdServer.Range() and EtcdServer.Txn()) compare the revision in the request header with the latest revision of authStore after the actual access. If the saved revision is lower than the latest one, it means the permission can be changed. Although it would introduce false positives (e.g. changing other user's password), it prevents the TOCTOU problem. This idea is an implementation of Anthony's comment: https://github.com/coreos/etcd/pull/5739#issuecomment-228128254
2016-06-23 12:31:12 +03:00
if m.AuthRevision != 0 {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x18
auth, etcdserver: introduce revision of authStore for avoiding TOCTOU problem This commit introduces revision of authStore. The revision number represents a version of authStore that is incremented by updating auth related information. The revision is required for avoiding TOCTOU problems. Currently there are two types of the TOCTOU problems in v3 auth. The first one is in ordinal linearizable requests with a sequence like below (): 1. Request from client CA is processed in follower FA. FA looks up the username (let it U) for the request from a token of the request. At this time, the request is authorized correctly. 2. Another request from client CB is processed in follower FB. CB is for changing U's password. 3. FB forwards the request from CB to the leader before FA. Now U's password is updated and the request from CA should be rejected. 4. However, the request from CA is processed by the leader because authentication is already done in FA. For avoiding the above sequence, this commit lets etcdserverpb.RequestHeader have a member revision. The member is initialized during authentication by followers and checked in a leader. If the revision in RequestHeader is lower than the leader's authStore revision, it means a sequence like above happened. In such a case, the state machine returns auth.ErrAuthRevisionObsolete. The error code lets nodes retry their requests. The second one, a case of serializable range and txn, is more subtle. Because these requests are processed in follower directly. The TOCTOU problem can be caused by a sequence like below: 1. Serializable request from client CA is processed in follower FA. At first, FA looks up the username (let it U) and its permission before actual access to KV. 2. Another request from client CB is processed in follower FB and forwarded to the leader. The cluster including FA now commits a log entry of the request from CB. Assume the request changed the permission or password of U. 3. Now the serializable request from CA is accessing to KV. Even if the access is allowed at the point of 1, now it can be invalid because of the change introduced in 2. For avoiding the above sequence, this commit lets the functions of serializable requests (EtcdServer.Range() and EtcdServer.Txn()) compare the revision in the request header with the latest revision of authStore after the actual access. If the saved revision is lower than the latest one, it means the permission can be changed. Although it would introduce false positives (e.g. changing other user's password), it prevents the TOCTOU problem. This idea is an implementation of Anthony's comment: https://github.com/coreos/etcd/pull/5739#issuecomment-228128254
2016-06-23 12:31:12 +03:00
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthRevision))
auth, etcdserver: introduce revision of authStore for avoiding TOCTOU problem This commit introduces revision of authStore. The revision number represents a version of authStore that is incremented by updating auth related information. The revision is required for avoiding TOCTOU problems. Currently there are two types of the TOCTOU problems in v3 auth. The first one is in ordinal linearizable requests with a sequence like below (): 1. Request from client CA is processed in follower FA. FA looks up the username (let it U) for the request from a token of the request. At this time, the request is authorized correctly. 2. Another request from client CB is processed in follower FB. CB is for changing U's password. 3. FB forwards the request from CB to the leader before FA. Now U's password is updated and the request from CA should be rejected. 4. However, the request from CA is processed by the leader because authentication is already done in FA. For avoiding the above sequence, this commit lets etcdserverpb.RequestHeader have a member revision. The member is initialized during authentication by followers and checked in a leader. If the revision in RequestHeader is lower than the leader's authStore revision, it means a sequence like above happened. In such a case, the state machine returns auth.ErrAuthRevisionObsolete. The error code lets nodes retry their requests. The second one, a case of serializable range and txn, is more subtle. Because these requests are processed in follower directly. The TOCTOU problem can be caused by a sequence like below: 1. Serializable request from client CA is processed in follower FA. At first, FA looks up the username (let it U) and its permission before actual access to KV. 2. Another request from client CB is processed in follower FB and forwarded to the leader. The cluster including FA now commits a log entry of the request from CB. Assume the request changed the permission or password of U. 3. Now the serializable request from CA is accessing to KV. Even if the access is allowed at the point of 1, now it can be invalid because of the change introduced in 2. For avoiding the above sequence, this commit lets the functions of serializable requests (EtcdServer.Range() and EtcdServer.Txn()) compare the revision in the request header with the latest revision of authStore after the actual access. If the saved revision is lower than the latest one, it means the permission can be changed. Although it would introduce false positives (e.g. changing other user's password), it prevents the TOCTOU problem. This idea is an implementation of Anthony's comment: https://github.com/coreos/etcd/pull/5739#issuecomment-228128254
2016-06-23 12:31:12 +03:00
}
return i, nil
}
2016-11-10 22:53:48 +03:00
func (m *InternalRaftRequest) Marshal() (dAtA []byte, err error) {
2015-09-04 01:32:25 +03:00
size := m.Size()
2016-11-10 22:53:48 +03:00
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
2015-09-04 01:32:25 +03:00
if err != nil {
return nil, err
}
2016-11-10 22:53:48 +03:00
return dAtA[:n], nil
2015-09-04 01:32:25 +03:00
}
2016-11-10 22:53:48 +03:00
func (m *InternalRaftRequest) MarshalTo(dAtA []byte) (int, error) {
2015-09-04 01:32:25 +03:00
var i int
_ = i
var l int
_ = l
if m.ID != 0 {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x8
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.ID))
}
2015-09-04 01:32:25 +03:00
if m.V2 != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x12
2015-09-04 01:32:25 +03:00
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.V2.Size()))
n1, err := m.V2.MarshalTo(dAtA[i:])
2015-09-04 01:32:25 +03:00
if err != nil {
return 0, err
}
i += n1
}
if m.Range != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x1a
2015-09-04 01:32:25 +03:00
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.Range.Size()))
n2, err := m.Range.MarshalTo(dAtA[i:])
2015-09-04 01:32:25 +03:00
if err != nil {
return 0, err
}
i += n2
}
if m.Put != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x22
2015-09-04 01:32:25 +03:00
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.Put.Size()))
n3, err := m.Put.MarshalTo(dAtA[i:])
2015-09-04 01:32:25 +03:00
if err != nil {
return 0, err
}
i += n3
}
if m.DeleteRange != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x2a
2015-09-04 01:32:25 +03:00
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.DeleteRange.Size()))
n4, err := m.DeleteRange.MarshalTo(dAtA[i:])
2015-09-04 01:32:25 +03:00
if err != nil {
return 0, err
}
i += n4
}
if m.Txn != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x32
2015-09-04 01:32:25 +03:00
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.Txn.Size()))
n5, err := m.Txn.MarshalTo(dAtA[i:])
2015-09-04 01:32:25 +03:00
if err != nil {
return 0, err
}
i += n5
}
2015-09-06 02:08:58 +03:00
if m.Compaction != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x3a
2015-09-06 02:08:58 +03:00
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.Compaction.Size()))
n6, err := m.Compaction.MarshalTo(dAtA[i:])
2015-09-06 02:08:58 +03:00
if err != nil {
return 0, err
}
i += n6
}
if m.LeaseGrant != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x42
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.LeaseGrant.Size()))
n7, err := m.LeaseGrant.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n7
}
if m.LeaseRevoke != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x4a
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.LeaseRevoke.Size()))
n8, err := m.LeaseRevoke.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n8
}
if m.Alarm != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x52
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.Alarm.Size()))
n9, err := m.Alarm.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n9
}
if m.LeaseCheckpoint != nil {
dAtA[i] = 0x5a
i++
i = encodeVarintRaftInternal(dAtA, i, uint64(m.LeaseCheckpoint.Size()))
n10, err := m.LeaseCheckpoint.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n10
}
if m.Header != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0xa2
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x6
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.Header.Size()))
n11, err := m.Header.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n11
}
if m.AuthEnable != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0xc2
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x3e
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthEnable.Size()))
n12, err := m.AuthEnable.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n12
}
if m.AuthDisable != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x9a
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x3f
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthDisable.Size()))
n13, err := m.AuthDisable.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n13
}
2016-06-07 06:17:28 +03:00
if m.Authenticate != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0xa2
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x3f
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.Authenticate.Size()))
n14, err := m.Authenticate.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n14
}
if m.AuthStatus != nil {
dAtA[i] = 0xaa
i++
dAtA[i] = 0x3f
i++
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthStatus.Size()))
n15, err := m.AuthStatus.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n15
}
2016-06-07 06:17:28 +03:00
if m.AuthUserAdd != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0xe2
2016-04-01 05:07:43 +03:00
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x44
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthUserAdd.Size()))
n16, err := m.AuthUserAdd.MarshalTo(dAtA[i:])
2016-04-01 05:07:43 +03:00
if err != nil {
return 0, err
}
i += n16
2016-04-01 05:07:43 +03:00
}
2016-06-07 06:17:28 +03:00
if m.AuthUserDelete != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0xea
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x44
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthUserDelete.Size()))
n17, err := m.AuthUserDelete.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n17
}
2016-06-07 06:17:28 +03:00
if m.AuthUserGet != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0xf2
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x44
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthUserGet.Size()))
n18, err := m.AuthUserGet.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n18
}
2016-06-07 06:17:28 +03:00
if m.AuthUserChangePassword != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0xfa
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x44
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthUserChangePassword.Size()))
n19, err := m.AuthUserChangePassword.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n19
}
2016-06-07 06:17:28 +03:00
if m.AuthUserGrantRole != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x82
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x45
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthUserGrantRole.Size()))
n20, err := m.AuthUserGrantRole.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n20
}
2016-06-07 06:17:28 +03:00
if m.AuthUserRevokeRole != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x8a
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x45
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthUserRevokeRole.Size()))
n21, err := m.AuthUserRevokeRole.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n21
}
if m.AuthUserList != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x92
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x45
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthUserList.Size()))
n22, err := m.AuthUserList.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n22
}
if m.AuthRoleList != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x9a
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x45
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthRoleList.Size()))
n23, err := m.AuthRoleList.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n23
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleAdd != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x82
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x4b
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthRoleAdd.Size()))
n24, err := m.AuthRoleAdd.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n24
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleDelete != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x8a
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x4b
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthRoleDelete.Size()))
n25, err := m.AuthRoleDelete.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n25
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleGet != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x92
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x4b
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthRoleGet.Size()))
n26, err := m.AuthRoleGet.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n26
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleGrantPermission != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x9a
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x4b
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthRoleGrantPermission.Size()))
n27, err := m.AuthRoleGrantPermission.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n27
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleRevokePermission != nil {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0xa2
i++
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x4b
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(m.AuthRoleRevokePermission.Size()))
n28, err := m.AuthRoleRevokePermission.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n28
}
if m.ClusterVersionSet != nil {
dAtA[i] = 0xa2
i++
dAtA[i] = 0x51
i++
i = encodeVarintRaftInternal(dAtA, i, uint64(m.ClusterVersionSet.Size()))
n29, err := m.ClusterVersionSet.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n29
}
if m.ClusterMemberAttrSet != nil {
dAtA[i] = 0xaa
i++
dAtA[i] = 0x51
i++
i = encodeVarintRaftInternal(dAtA, i, uint64(m.ClusterMemberAttrSet.Size()))
n30, err := m.ClusterMemberAttrSet.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n30
}
2015-09-04 01:32:25 +03:00
return i, nil
}
2016-11-10 22:53:48 +03:00
func (m *EmptyResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
2016-11-10 22:53:48 +03:00
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
2016-11-10 22:53:48 +03:00
return dAtA[:n], nil
}
2016-11-10 22:53:48 +03:00
func (m *EmptyResponse) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
return i, nil
}
2016-11-10 22:53:48 +03:00
func (m *InternalAuthenticateRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
2016-11-10 22:53:48 +03:00
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
2016-11-10 22:53:48 +03:00
return dAtA[:n], nil
}
2016-11-10 22:53:48 +03:00
func (m *InternalAuthenticateRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Name) > 0 {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0xa
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if len(m.Password) > 0 {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x12
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(len(m.Password)))
i += copy(dAtA[i:], m.Password)
}
if len(m.SimpleToken) > 0 {
2016-11-10 22:53:48 +03:00
dAtA[i] = 0x1a
i++
2016-11-10 22:53:48 +03:00
i = encodeVarintRaftInternal(dAtA, i, uint64(len(m.SimpleToken)))
i += copy(dAtA[i:], m.SimpleToken)
}
return i, nil
}
2016-11-10 22:53:48 +03:00
func encodeVarintRaftInternal(dAtA []byte, offset int, v uint64) int {
2015-09-04 01:32:25 +03:00
for v >= 1<<7 {
2016-11-10 22:53:48 +03:00
dAtA[offset] = uint8(v&0x7f | 0x80)
2015-09-04 01:32:25 +03:00
v >>= 7
offset++
}
2016-11-10 22:53:48 +03:00
dAtA[offset] = uint8(v)
2015-09-04 01:32:25 +03:00
return offset + 1
}
func (m *RequestHeader) Size() (n int) {
var l int
_ = l
if m.ID != 0 {
n += 1 + sovRaftInternal(uint64(m.ID))
}
l = len(m.Username)
if l > 0 {
n += 1 + l + sovRaftInternal(uint64(l))
}
auth, etcdserver: introduce revision of authStore for avoiding TOCTOU problem This commit introduces revision of authStore. The revision number represents a version of authStore that is incremented by updating auth related information. The revision is required for avoiding TOCTOU problems. Currently there are two types of the TOCTOU problems in v3 auth. The first one is in ordinal linearizable requests with a sequence like below (): 1. Request from client CA is processed in follower FA. FA looks up the username (let it U) for the request from a token of the request. At this time, the request is authorized correctly. 2. Another request from client CB is processed in follower FB. CB is for changing U's password. 3. FB forwards the request from CB to the leader before FA. Now U's password is updated and the request from CA should be rejected. 4. However, the request from CA is processed by the leader because authentication is already done in FA. For avoiding the above sequence, this commit lets etcdserverpb.RequestHeader have a member revision. The member is initialized during authentication by followers and checked in a leader. If the revision in RequestHeader is lower than the leader's authStore revision, it means a sequence like above happened. In such a case, the state machine returns auth.ErrAuthRevisionObsolete. The error code lets nodes retry their requests. The second one, a case of serializable range and txn, is more subtle. Because these requests are processed in follower directly. The TOCTOU problem can be caused by a sequence like below: 1. Serializable request from client CA is processed in follower FA. At first, FA looks up the username (let it U) and its permission before actual access to KV. 2. Another request from client CB is processed in follower FB and forwarded to the leader. The cluster including FA now commits a log entry of the request from CB. Assume the request changed the permission or password of U. 3. Now the serializable request from CA is accessing to KV. Even if the access is allowed at the point of 1, now it can be invalid because of the change introduced in 2. For avoiding the above sequence, this commit lets the functions of serializable requests (EtcdServer.Range() and EtcdServer.Txn()) compare the revision in the request header with the latest revision of authStore after the actual access. If the saved revision is lower than the latest one, it means the permission can be changed. Although it would introduce false positives (e.g. changing other user's password), it prevents the TOCTOU problem. This idea is an implementation of Anthony's comment: https://github.com/coreos/etcd/pull/5739#issuecomment-228128254
2016-06-23 12:31:12 +03:00
if m.AuthRevision != 0 {
n += 1 + sovRaftInternal(uint64(m.AuthRevision))
}
return n
}
2015-09-04 01:32:25 +03:00
func (m *InternalRaftRequest) Size() (n int) {
var l int
_ = l
if m.ID != 0 {
n += 1 + sovRaftInternal(uint64(m.ID))
}
2015-09-04 01:32:25 +03:00
if m.V2 != nil {
l = m.V2.Size()
n += 1 + l + sovRaftInternal(uint64(l))
}
if m.Range != nil {
l = m.Range.Size()
n += 1 + l + sovRaftInternal(uint64(l))
}
if m.Put != nil {
l = m.Put.Size()
n += 1 + l + sovRaftInternal(uint64(l))
}
if m.DeleteRange != nil {
l = m.DeleteRange.Size()
n += 1 + l + sovRaftInternal(uint64(l))
}
if m.Txn != nil {
l = m.Txn.Size()
n += 1 + l + sovRaftInternal(uint64(l))
}
2015-09-06 02:08:58 +03:00
if m.Compaction != nil {
l = m.Compaction.Size()
n += 1 + l + sovRaftInternal(uint64(l))
}
if m.LeaseGrant != nil {
l = m.LeaseGrant.Size()
n += 1 + l + sovRaftInternal(uint64(l))
}
if m.LeaseRevoke != nil {
l = m.LeaseRevoke.Size()
n += 1 + l + sovRaftInternal(uint64(l))
}
if m.Alarm != nil {
l = m.Alarm.Size()
n += 1 + l + sovRaftInternal(uint64(l))
}
if m.LeaseCheckpoint != nil {
l = m.LeaseCheckpoint.Size()
n += 1 + l + sovRaftInternal(uint64(l))
}
if m.Header != nil {
l = m.Header.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.AuthEnable != nil {
l = m.AuthEnable.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.AuthDisable != nil {
l = m.AuthDisable.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
2016-06-07 06:17:28 +03:00
if m.Authenticate != nil {
l = m.Authenticate.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.AuthStatus != nil {
l = m.AuthStatus.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.AuthUserAdd != nil {
l = m.AuthUserAdd.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.AuthUserDelete != nil {
l = m.AuthUserDelete.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
2016-06-07 06:17:28 +03:00
if m.AuthUserGet != nil {
l = m.AuthUserGet.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
2016-06-07 06:17:28 +03:00
if m.AuthUserChangePassword != nil {
l = m.AuthUserChangePassword.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
2016-06-07 06:17:28 +03:00
if m.AuthUserGrantRole != nil {
l = m.AuthUserGrantRole.Size()
n += 2 + l + sovRaftInternal(uint64(l))
2016-04-01 05:07:43 +03:00
}
2016-06-07 06:17:28 +03:00
if m.AuthUserRevokeRole != nil {
l = m.AuthUserRevokeRole.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.AuthUserList != nil {
l = m.AuthUserList.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.AuthRoleList != nil {
l = m.AuthRoleList.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleAdd != nil {
l = m.AuthRoleAdd.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleDelete != nil {
l = m.AuthRoleDelete.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.AuthRoleGet != nil {
l = m.AuthRoleGet.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleGrantPermission != nil {
l = m.AuthRoleGrantPermission.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.AuthRoleRevokePermission != nil {
l = m.AuthRoleRevokePermission.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.ClusterVersionSet != nil {
l = m.ClusterVersionSet.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
if m.ClusterMemberAttrSet != nil {
l = m.ClusterMemberAttrSet.Size()
n += 2 + l + sovRaftInternal(uint64(l))
}
2015-09-04 01:32:25 +03:00
return n
}
func (m *EmptyResponse) Size() (n int) {
var l int
_ = l
return n
}
func (m *InternalAuthenticateRequest) Size() (n int) {
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovRaftInternal(uint64(l))
}
l = len(m.Password)
if l > 0 {
n += 1 + l + sovRaftInternal(uint64(l))
}
l = len(m.SimpleToken)
if l > 0 {
n += 1 + l + sovRaftInternal(uint64(l))
}
return n
}
2015-09-04 01:32:25 +03:00
func sovRaftInternal(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozRaftInternal(x uint64) (n int) {
return sovRaftInternal(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
2016-11-10 22:53:48 +03:00
func (m *RequestHeader) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RequestHeader: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RequestHeader: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
m.ID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
m.ID |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
m.Username = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
auth, etcdserver: introduce revision of authStore for avoiding TOCTOU problem This commit introduces revision of authStore. The revision number represents a version of authStore that is incremented by updating auth related information. The revision is required for avoiding TOCTOU problems. Currently there are two types of the TOCTOU problems in v3 auth. The first one is in ordinal linearizable requests with a sequence like below (): 1. Request from client CA is processed in follower FA. FA looks up the username (let it U) for the request from a token of the request. At this time, the request is authorized correctly. 2. Another request from client CB is processed in follower FB. CB is for changing U's password. 3. FB forwards the request from CB to the leader before FA. Now U's password is updated and the request from CA should be rejected. 4. However, the request from CA is processed by the leader because authentication is already done in FA. For avoiding the above sequence, this commit lets etcdserverpb.RequestHeader have a member revision. The member is initialized during authentication by followers and checked in a leader. If the revision in RequestHeader is lower than the leader's authStore revision, it means a sequence like above happened. In such a case, the state machine returns auth.ErrAuthRevisionObsolete. The error code lets nodes retry their requests. The second one, a case of serializable range and txn, is more subtle. Because these requests are processed in follower directly. The TOCTOU problem can be caused by a sequence like below: 1. Serializable request from client CA is processed in follower FA. At first, FA looks up the username (let it U) and its permission before actual access to KV. 2. Another request from client CB is processed in follower FB and forwarded to the leader. The cluster including FA now commits a log entry of the request from CB. Assume the request changed the permission or password of U. 3. Now the serializable request from CA is accessing to KV. Even if the access is allowed at the point of 1, now it can be invalid because of the change introduced in 2. For avoiding the above sequence, this commit lets the functions of serializable requests (EtcdServer.Range() and EtcdServer.Txn()) compare the revision in the request header with the latest revision of authStore after the actual access. If the saved revision is lower than the latest one, it means the permission can be changed. Although it would introduce false positives (e.g. changing other user's password), it prevents the TOCTOU problem. This idea is an implementation of Anthony's comment: https://github.com/coreos/etcd/pull/5739#issuecomment-228128254
2016-06-23 12:31:12 +03:00
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field AuthRevision", wireType)
}
m.AuthRevision = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
auth, etcdserver: introduce revision of authStore for avoiding TOCTOU problem This commit introduces revision of authStore. The revision number represents a version of authStore that is incremented by updating auth related information. The revision is required for avoiding TOCTOU problems. Currently there are two types of the TOCTOU problems in v3 auth. The first one is in ordinal linearizable requests with a sequence like below (): 1. Request from client CA is processed in follower FA. FA looks up the username (let it U) for the request from a token of the request. At this time, the request is authorized correctly. 2. Another request from client CB is processed in follower FB. CB is for changing U's password. 3. FB forwards the request from CB to the leader before FA. Now U's password is updated and the request from CA should be rejected. 4. However, the request from CA is processed by the leader because authentication is already done in FA. For avoiding the above sequence, this commit lets etcdserverpb.RequestHeader have a member revision. The member is initialized during authentication by followers and checked in a leader. If the revision in RequestHeader is lower than the leader's authStore revision, it means a sequence like above happened. In such a case, the state machine returns auth.ErrAuthRevisionObsolete. The error code lets nodes retry their requests. The second one, a case of serializable range and txn, is more subtle. Because these requests are processed in follower directly. The TOCTOU problem can be caused by a sequence like below: 1. Serializable request from client CA is processed in follower FA. At first, FA looks up the username (let it U) and its permission before actual access to KV. 2. Another request from client CB is processed in follower FB and forwarded to the leader. The cluster including FA now commits a log entry of the request from CB. Assume the request changed the permission or password of U. 3. Now the serializable request from CA is accessing to KV. Even if the access is allowed at the point of 1, now it can be invalid because of the change introduced in 2. For avoiding the above sequence, this commit lets the functions of serializable requests (EtcdServer.Range() and EtcdServer.Txn()) compare the revision in the request header with the latest revision of authStore after the actual access. If the saved revision is lower than the latest one, it means the permission can be changed. Although it would introduce false positives (e.g. changing other user's password), it prevents the TOCTOU problem. This idea is an implementation of Anthony's comment: https://github.com/coreos/etcd/pull/5739#issuecomment-228128254
2016-06-23 12:31:12 +03:00
iNdEx++
m.AuthRevision |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
2016-11-10 22:53:48 +03:00
skippy, err := skipRaftInternal(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRaftInternal
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
2016-11-10 22:53:48 +03:00
func (m *InternalRaftRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
2015-08-08 15:29:18 +03:00
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
2015-08-08 15:29:18 +03:00
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
2015-08-08 15:29:18 +03:00
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2015-08-08 15:29:18 +03:00
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: InternalRaftRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: InternalRaftRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
2015-08-08 15:29:18 +03:00
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
m.ID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
m.ID |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
2015-08-08 15:29:18 +03:00
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field V2", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
2015-08-08 15:29:18 +03:00
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2015-08-08 15:29:18 +03:00
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
2015-09-04 01:32:25 +03:00
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
2015-08-08 15:29:18 +03:00
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.V2 == nil {
m.V2 = &Request{}
}
2016-11-10 22:53:48 +03:00
if err := m.V2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2015-08-08 15:29:18 +03:00
return err
}
iNdEx = postIndex
case 3:
2015-08-08 15:29:18 +03:00
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
2015-08-08 15:29:18 +03:00
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2015-08-08 15:29:18 +03:00
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
2015-09-04 01:32:25 +03:00
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
2015-08-08 15:29:18 +03:00
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Range == nil {
m.Range = &RangeRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2015-08-08 15:29:18 +03:00
return err
}
iNdEx = postIndex
case 4:
2015-08-08 15:29:18 +03:00
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Put", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
2015-08-08 15:29:18 +03:00
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2015-08-08 15:29:18 +03:00
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
2015-09-04 01:32:25 +03:00
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
2015-08-08 15:29:18 +03:00
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Put == nil {
m.Put = &PutRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.Put.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2015-08-08 15:29:18 +03:00
return err
}
iNdEx = postIndex
case 5:
2015-08-08 15:29:18 +03:00
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DeleteRange", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
2015-08-08 15:29:18 +03:00
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2015-08-08 15:29:18 +03:00
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
2015-09-04 01:32:25 +03:00
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
2015-08-08 15:29:18 +03:00
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.DeleteRange == nil {
m.DeleteRange = &DeleteRangeRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.DeleteRange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2015-08-08 15:29:18 +03:00
return err
}
iNdEx = postIndex
case 6:
2015-08-08 15:29:18 +03:00
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Txn", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
2015-08-08 15:29:18 +03:00
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2015-08-08 15:29:18 +03:00
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
2015-09-04 01:32:25 +03:00
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
2015-08-08 15:29:18 +03:00
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Txn == nil {
m.Txn = &TxnRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.Txn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2015-08-08 15:29:18 +03:00
return err
}
iNdEx = postIndex
2015-09-06 02:08:58 +03:00
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Compaction", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
2015-09-06 02:08:58 +03:00
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2015-09-06 02:08:58 +03:00
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Compaction == nil {
m.Compaction = &CompactionRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.Compaction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2015-09-06 02:08:58 +03:00
return err
}
iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LeaseGrant", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.LeaseGrant == nil {
m.LeaseGrant = &LeaseGrantRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.LeaseGrant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LeaseRevoke", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.LeaseRevoke == nil {
m.LeaseRevoke = &LeaseRevokeRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.LeaseRevoke.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 10:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Alarm", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Alarm == nil {
m.Alarm = &AlarmRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.Alarm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 11:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LeaseCheckpoint", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.LeaseCheckpoint == nil {
m.LeaseCheckpoint = &LeaseCheckpointRequest{}
}
if err := m.LeaseCheckpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 100:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Header == nil {
m.Header = &RequestHeader{}
}
2016-11-10 22:53:48 +03:00
if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 1000:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AuthEnable", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.AuthEnable == nil {
m.AuthEnable = &AuthEnableRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthEnable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 1011:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AuthDisable", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.AuthDisable == nil {
m.AuthDisable = &AuthDisableRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthDisable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 1012:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field Authenticate", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.Authenticate == nil {
m.Authenticate = &InternalAuthenticateRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.Authenticate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 1013:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AuthStatus", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.AuthStatus == nil {
m.AuthStatus = &AuthStatusRequest{}
}
if err := m.AuthStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1100:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthUserAdd", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthUserAdd == nil {
m.AuthUserAdd = &AuthUserAddRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthUserAdd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1101:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthUserDelete", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthUserDelete == nil {
m.AuthUserDelete = &AuthUserDeleteRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthUserDelete.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1102:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthUserGet", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthUserGet == nil {
m.AuthUserGet = &AuthUserGetRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthUserGet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1103:
2016-04-01 05:07:43 +03:00
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthUserChangePassword", wireType)
2016-04-01 05:07:43 +03:00
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2016-04-01 05:07:43 +03:00
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthUserChangePassword == nil {
m.AuthUserChangePassword = &AuthUserChangePasswordRequest{}
2016-04-01 05:07:43 +03:00
}
2016-11-10 22:53:48 +03:00
if err := m.AuthUserChangePassword.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2016-04-01 05:07:43 +03:00
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1104:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthUserGrantRole", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthUserGrantRole == nil {
m.AuthUserGrantRole = &AuthUserGrantRoleRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthUserGrantRole.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1105:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthUserRevokeRole", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthUserRevokeRole == nil {
m.AuthUserRevokeRole = &AuthUserRevokeRoleRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthUserRevokeRole.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 1106:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AuthUserList", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.AuthUserList == nil {
m.AuthUserList = &AuthUserListRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthUserList.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 1107:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleList", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.AuthRoleList == nil {
m.AuthRoleList = &AuthRoleListRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthRoleList.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1200:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleAdd", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleAdd == nil {
m.AuthRoleAdd = &AuthRoleAddRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthRoleAdd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1201:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleDelete", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleDelete == nil {
m.AuthRoleDelete = &AuthRoleDeleteRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthRoleDelete.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1202:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleGet", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleGet == nil {
m.AuthRoleGet = &AuthRoleGetRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthRoleGet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1203:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleGrantPermission", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleGrantPermission == nil {
m.AuthRoleGrantPermission = &AuthRoleGrantPermissionRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthRoleGrantPermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2016-06-07 06:17:28 +03:00
case 1204:
if wireType != 2 {
2016-06-07 06:17:28 +03:00
return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleRevokePermission", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-06-07 06:17:28 +03:00
if m.AuthRoleRevokePermission == nil {
m.AuthRoleRevokePermission = &AuthRoleRevokePermissionRequest{}
}
2016-11-10 22:53:48 +03:00
if err := m.AuthRoleRevokePermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 1300:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClusterVersionSet", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.ClusterVersionSet == nil {
m.ClusterVersionSet = &membershippb.ClusterVersionSetRequest{}
}
if err := m.ClusterVersionSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 1301:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClusterMemberAttrSet", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.ClusterMemberAttrSet == nil {
m.ClusterMemberAttrSet = &membershippb.ClusterMemberAttrSetRequest{}
}
if err := m.ClusterMemberAttrSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
2015-08-08 15:29:18 +03:00
default:
iNdEx = preIndex
2016-11-10 22:53:48 +03:00
skippy, err := skipRaftInternal(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRaftInternal
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
2016-11-10 22:53:48 +03:00
func (m *EmptyResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: EmptyResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: EmptyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
2016-11-10 22:53:48 +03:00
skippy, err := skipRaftInternal(dAtA[iNdEx:])
2015-08-08 15:29:18 +03:00
if err != nil {
return err
}
2015-09-04 01:32:25 +03:00
if skippy < 0 {
return ErrInvalidLengthRaftInternal
}
2015-08-08 15:29:18 +03:00
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
2015-08-08 15:29:18 +03:00
return nil
}
2016-11-10 22:53:48 +03:00
func (m *InternalAuthenticateRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: InternalAuthenticateRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: InternalAuthenticateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
m.Password = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SimpleToken", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRaftInternal
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRaftInternal
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
m.SimpleToken = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
2016-11-10 22:53:48 +03:00
skippy, err := skipRaftInternal(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRaftInternal
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
2016-11-10 22:53:48 +03:00
func skipRaftInternal(dAtA []byte) (n int, err error) {
l := len(dAtA)
2015-08-08 15:29:18 +03:00
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowRaftInternal
}
2015-08-08 15:29:18 +03:00
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2015-08-08 15:29:18 +03:00
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowRaftInternal
}
2015-08-08 15:29:18 +03:00
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
2016-11-10 22:53:48 +03:00
if dAtA[iNdEx-1] < 0x80 {
2015-08-08 15:29:18 +03:00
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowRaftInternal
}
2015-08-08 15:29:18 +03:00
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2015-08-08 15:29:18 +03:00
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
2015-09-04 01:32:25 +03:00
if length < 0 {
return 0, ErrInvalidLengthRaftInternal
}
2015-08-08 15:29:18 +03:00
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowRaftInternal
}
2015-08-08 15:29:18 +03:00
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
2016-11-10 22:53:48 +03:00
b := dAtA[iNdEx]
2015-08-08 15:29:18 +03:00
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
2016-11-10 22:53:48 +03:00
next, err := skipRaftInternal(dAtA[start:])
2015-08-08 15:29:18 +03:00
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
2015-09-04 01:32:25 +03:00
var (
ErrInvalidLengthRaftInternal = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowRaftInternal = fmt.Errorf("proto: integer overflow")
2015-09-04 01:32:25 +03:00
)
2016-04-26 00:08:33 +03:00
2016-11-10 22:53:48 +03:00
func init() { proto.RegisterFile("raft_internal.proto", fileDescriptorRaftInternal) }
2016-04-26 00:08:33 +03:00
var fileDescriptorRaftInternal = []byte{
// 978 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x96, 0x49, 0x73, 0x1b, 0x45,
0x14, 0xc7, 0x23, 0xc7, 0x71, 0xac, 0x96, 0xed, 0xd8, 0x6d, 0x87, 0x34, 0x72, 0x95, 0x70, 0x1c,
0x96, 0xb0, 0xd9, 0x94, 0x73, 0xa5, 0x0a, 0x84, 0xe4, 0x72, 0x5c, 0x15, 0x82, 0x6b, 0x12, 0x96,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