add preshared key based peer auth

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2019-10-03 10:10:50 -04:00
parent 562f1caa54
commit f0719ee8a9
No known key found for this signature in database
GPG key ID: A519480096146526
9 changed files with 92 additions and 40 deletions

View file

@ -81,6 +81,7 @@ func (m *Master) GetRedisURL() string {
type ConnectRequest struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
ClusterKey string `protobuf:"bytes,2,opt,name=cluster_key,json=clusterKey,proto3" json:"cluster_key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -117,6 +118,13 @@ func (m *ConnectRequest) GetID() string {
return ""
}
func (m *ConnectRequest) GetClusterKey() string {
if m != nil {
return m.ClusterKey
}
return ""
}
type ConnectResponse struct {
Master *Master `protobuf:"bytes,1,opt,name=master,proto3" json:"master,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
@ -283,30 +291,31 @@ func init() {
}
var fileDescriptor_b6184fc395da86b1 = []byte{
// 354 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x6b, 0xc2, 0x30,
0x14, 0xc6, 0xb1, 0xba, 0x4e, 0x5f, 0x9d, 0x42, 0x18, 0xa3, 0x78, 0xd1, 0xf5, 0x32, 0x85, 0x91,
0xd2, 0xee, 0x32, 0x18, 0x3b, 0xa8, 0x83, 0x6d, 0xb0, 0xc9, 0x08, 0xf3, 0xb2, 0x8b, 0xd4, 0x36,
0xd4, 0x8c, 0xda, 0x74, 0x49, 0xf5, 0x34, 0xd8, 0x7f, 0xea, 0xc1, 0xbf, 0x64, 0x34, 0x0d, 0x82,
0x07, 0x99, 0xbb, 0xe5, 0xbd, 0x7c, 0xbf, 0xc7, 0xf7, 0x3d, 0x1e, 0xdc, 0xc6, 0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xc2, 0x23, 0x7a, 0x30, 0x3e, 0x82, 0x5a, 0x91, 0xbc, 0x8c, 0x4d,
0xd4, 0xdb, 0x69, 0x41, 0xb3, 0x60, 0xa4, 0x76, 0xec, 0x4c, 0xe0, 0x4c, 0xd7, 0xda, 0xd7, 0x3d,
0x9c, 0xa4, 0x45, 0xc3, 0xae, 0xf4, 0xaa, 0x7d, 0xcb, 0xbf, 0x3a, 0xc2, 0x56, 0x31, 0x80, 0x94,
0x94, 0xff, 0x0d, 0xf5, 0x27, 0xfd, 0x8d, 0x32, 0x38, 0xd5, 0xa9, 0x91, 0x77, 0xc4, 0x98, 0xfd,
0x5d, 0x76, 0xfc, 0xff, 0x20, 0xa5, 0xf9, 0x11, 0xfe, 0xb8, 0x3e, 0xfa, 0x0e, 0xef, 0xd6, 0xde,
0xdc, 0x54, 0x97, 0x74, 0xf3, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x3d, 0x45, 0x9b, 0xbe, 0x02,
0x00, 0x00,
// 375 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0xab, 0xda, 0x40,
0x10, 0xc6, 0x31, 0xda, 0x54, 0x27, 0x56, 0x61, 0x29, 0x25, 0x78, 0x89, 0xcd, 0xa5, 0x0a, 0x65,
0x43, 0xd2, 0x4b, 0xa1, 0xf4, 0xa0, 0x16, 0x5a, 0x69, 0x2b, 0x65, 0xa9, 0x97, 0x5e, 0x24, 0x26,
0x4b, 0xdc, 0x36, 0x66, 0xd3, 0xdd, 0x44, 0x10, 0x0a, 0xfd, 0x4f, 0x3d, 0xf8, 0x97, 0x3c, 0x76,
0xb3, 0x08, 0x1e, 0xe4, 0xf9, 0x6e, 0x3b, 0xb3, 0xf3, 0x7d, 0xfc, 0xe6, 0x63, 0xe0, 0x7d, 0xc6,
0xaa, 0x5d, 0xbd, 0xc5, 0x09, 0xdf, 0x07, 0xb2,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 0xc2, 0x4d, 0x1e, 0xc4, 0x08, 0xfd, 0x08, 0x3a, 0x2b, 0x9e, 0xd2, 0x9b, 0x58, 0x08, 0x3a,
0x2a, 0x1a, 0xc3, 0xa3, 0xdf, 0xfe, 0x00, 0xfa, 0x4a, 0x23, 0xcd, 0x4a, 0xfe, 0x0a, 0x5e, 0x98,
0xda, 0x70, 0x7d, 0x84, 0x67, 0x85, 0x6a, 0xb8, 0xad, 0x71, 0x7b, 0xe2, 0x44, 0x6f, 0xee, 0xc0,
0x52, 0x06, 0xa4, 0x51, 0x45, 0xff, 0xa0, 0xfb, 0xc5, 0x7c, 0xa3, 0x12, 0x9e, 0x9b, 0xad, 0x51,
0x78, 0x87, 0xcd, 0x75, 0xd8, 0xa3, 0xe8, 0x29, 0x92, 0x06, 0x7e, 0x8e, 0x7f, 0xbd, 0xbd, 0xfb,
0x50, 0x3f, 0x1c, 0xc2, 0xad, 0xad, 0x4f, 0xed, 0xdd, 0x43, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57,
0x3c, 0x78, 0x51, 0xdf, 0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

View file

@ -22,6 +22,7 @@ message Master {
message ConnectRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string cluster_key = 2;
}
message ConnectResponse {