diff --git a/internal/api/api.go b/internal/api/api.go index 6e96874..7dcb677 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -41,7 +41,7 @@ func PrepareCredentialSecretPath(credentialType, credEntityName, credIdentifier return fmt.Sprintf("%s/%s/%s", credentialType, credEntityName, credIdentifier) } -func (v *VaultCredServ) GetCred(ctx context.Context, request *vaultcredpb.GetCredRequest) (*vaultcredpb.GetCredResponse, error) { +func (v *VaultCredServ) GetCredential(ctx context.Context, request *vaultcredpb.GetCredentialRequest) (*vaultcredpb.GetCredentialResponse, error) { vc, err := client.NewVaultClientForServiceAccount(ctx, v.log, v.conf) if err != nil { return nil, errors.WithMessage(err, "failed to initiize vault client") @@ -54,10 +54,10 @@ func (v *VaultCredServ) GetCred(ctx context.Context, request *vaultcredpb.GetCre } v.log.Infof("get credential request processed for %s", secretPath) - return &vaultcredpb.GetCredResponse{Credential: credentail}, nil + return &vaultcredpb.GetCredentialResponse{Credential: credentail}, nil } -func (v *VaultCredServ) PutCred(ctx context.Context, request *vaultcredpb.PutCredRequest) (*vaultcredpb.PutCredResponse, error) { +func (v *VaultCredServ) PutCredential(ctx context.Context, request *vaultcredpb.PutCredentialRequest) (*vaultcredpb.PutCredentialResponse, error) { vc, err := client.NewVaultClientForServiceAccount(ctx, v.log, v.conf) if err != nil { return nil, errors.WithMessage(err, "failed to initiize vault client") @@ -70,10 +70,10 @@ func (v *VaultCredServ) PutCred(ctx context.Context, request *vaultcredpb.PutCre } v.log.Infof("write credential request processed for %s", secretPath) - return &vaultcredpb.PutCredResponse{}, nil + return &vaultcredpb.PutCredentialResponse{}, nil } -func (v *VaultCredServ) DeleteCred(ctx context.Context, request *vaultcredpb.DeleteCredRequest) (*vaultcredpb.DeleteCredResponse, error) { +func (v *VaultCredServ) DeleteCredential(ctx context.Context, request *vaultcredpb.DeleteCredentialRequest) (*vaultcredpb.DeleteCredentialResponse, error) { vc, err := client.NewVaultClientForServiceAccount(ctx, v.log, v.conf) if err != nil { return nil, err @@ -86,56 +86,5 @@ func (v *VaultCredServ) DeleteCred(ctx context.Context, request *vaultcredpb.Del } v.log.Infof("delete credential request processed for %s", secretPath) - return &vaultcredpb.DeleteCredResponse{}, nil -} - -func (v *VaultCredServ) GetAppRoleToken(ctx context.Context, request *vaultcredpb.GetAppRoleTokenRequest) (*vaultcredpb.GetAppRoleTokenResponse, error) { - v.log.Infof("app role token request for vault path %s with role %s", request.CredentialPath, request.AppRoleName) - vc, err := client.NewVaultClientForTokenFromEnv(v.log, v.conf) - if err != nil { - return nil, err - } - - err = vc.EnableAppRoleAuth() - if err != nil { - return nil, err - } - - policyData := fmt.Sprintf(vaultPolicyReadPath, request.CredentialPath) - v.log.Infof("creating policy %s", policyData) - policyName := request.AppRoleName + "-policy" - err = vc.CreateOrUpdatePolicy(policyName, policyData) - if err != nil { - v.log.Errorf("error while creating Vault policy for app role %s", request.AppRoleName, err) - return nil, err - } - - err = vc.CreateOrUpdateAppRole(request.AppRoleName, []string{policyName}) - if err != nil { - v.log.Errorf("error while creating Vault policy for app role %s", request.AppRoleName, err) - return nil, err - } - - token, err := vc.AuthenticateWithAppRole(request.AppRoleName) - if err != nil { - return nil, err - } - - v.log.Infof("app role token generated for path %s with role %s", request.CredentialPath, request.AppRoleName) - return &vaultcredpb.GetAppRoleTokenResponse{Token: token}, nil -} - -func (v *VaultCredServ) GetCredentialWithAppRoleToken(ctx context.Context, request *vaultcredpb.GetCredentialWithAppRoleTokenRequest) (*vaultcredpb.GetCredentialWithAppRoleTokenResponse, error) { - vc, err := client.NewVaultClientForToken(v.log, v.conf, request.Token) - if err != nil { - return nil, err - } - - credential, err := vc.GetCredential(ctx, CredentialMountPath(), request.CredentialPath) - if err != nil { - v.log.Error("app role get credential request failed for %s, %v", request.CredentialPath, err) - return nil, err - } - v.log.Infof("app role get credential request processed for %s", request.CredentialPath) - return &vaultcredpb.GetCredentialWithAppRoleTokenResponse{Credential: credential}, nil + return &vaultcredpb.DeleteCredentialResponse{}, nil } diff --git a/internal/api/vault_app_role_api.go b/internal/api/vault_app_role_api.go new file mode 100644 index 0000000..68a986f --- /dev/null +++ b/internal/api/vault_app_role_api.go @@ -0,0 +1,68 @@ +package api + +import ( + "context" + "fmt" + + "github.com/intelops/vault-cred/internal/client" + "github.com/intelops/vault-cred/proto/pb/vaultcredpb" +) + +func (v *VaultCredServ) CreateAppRoleToken(ctx context.Context, request *vaultcredpb.CreateAppRoleTokenRequest) (*vaultcredpb.CreateAppRoleTokenResponse, error) { + v.log.Infof("app role token request for vault path %v with role %s", request.SecretPaths, request.AppRoleName) + vc, err := client.NewVaultClientForTokenFromEnv(v.log, v.conf) + if err != nil { + return nil, err + } + + err = vc.EnableAppRoleAuth() + if err != nil { + return nil, err + } + + var policyData string + for _, credPath := range request.SecretPaths { + credPathPolicy := fmt.Sprintf(vaultPolicyReadPath, credPath) + policyData = policyData + "\n" + credPathPolicy + } + + policyName := request.AppRoleName + "-policy" + err = vc.CreateOrUpdatePolicy(policyName, policyData) + if err != nil { + v.log.Errorf("error while creating Vault policy for app role %s", request.AppRoleName, err) + return nil, err + } + + err = vc.CreateOrUpdateAppRole(request.AppRoleName, []string{policyName}) + if err != nil { + v.log.Errorf("error while creating Vault policy for app role %s", request.AppRoleName, err) + return nil, err + } + + token, err := vc.AuthenticateWithAppRole(request.AppRoleName) + if err != nil { + return nil, err + } + + v.log.Infof("app role token generated for path %v with role %s", request.SecretPaths, request.AppRoleName) + return &vaultcredpb.CreateAppRoleTokenResponse{Token: token}, nil +} + +func (v *VaultCredServ) DeleteAppRole(ctx context.Context, request *vaultcredpb.DeleteAppRoleRequest) (*vaultcredpb.DeleteAppRoleResponse, error) { + return nil, nil +} + +func (v *VaultCredServ) GetCredentialWithAppRoleToken(ctx context.Context, request *vaultcredpb.GetCredentialWithAppRoleTokenRequest) (*vaultcredpb.GetCredentialWithAppRoleTokenResponse, error) { + vc, err := client.NewVaultClientForToken(v.log, v.conf, request.Token) + if err != nil { + return nil, err + } + + credential, err := vc.GetCredential(ctx, CredentialMountPath(), request.SecretPath) + if err != nil { + v.log.Error("app role get credential request failed for %s, %v", request.SecretPath, err) + return nil, err + } + v.log.Infof("app role get credential request processed for %s", request.SecretPath) + return &vaultcredpb.GetCredentialWithAppRoleTokenResponse{Credential: credential}, nil +} diff --git a/internal/api/vault_k8s_role_api.go b/internal/api/vault_k8s_role_api.go new file mode 100644 index 0000000..e7071e7 --- /dev/null +++ b/internal/api/vault_k8s_role_api.go @@ -0,0 +1,24 @@ +package api + +import ( + "context" + "fmt" + + "github.com/intelops/vault-cred/proto/pb/vaultcredpb" +) + +func (v *VaultCredServ) ConfigureClusterK8SAuth(ctx context.Context, request *vaultcredpb.ConfigureClusterK8SAuthRequest) (*vaultcredpb.ConfigureClusterK8SAuthResponse, error) { + return nil, fmt.Errorf("not supported") +} + +func (v *VaultCredServ) CreateK8SAuthRole(ctx context.Context, request *vaultcredpb.CreateK8SAuthRoleRequest) (*vaultcredpb.CreateK8SAuthRoleResponse, error) { + return nil, nil +} + +func (v *VaultCredServ) UpdateK8SAuthRole(ctx context.Context, request *vaultcredpb.UpdateK8SAuthRoleRequest) (*vaultcredpb.UpdateK8SAuthRoleResponse, error) { + return nil, fmt.Errorf("not supported") +} + +func (v *VaultCredServ) DeleteK8SAuthRole(ctx context.Context, request *vaultcredpb.DeleteK8SAuthRoleRequest) (*vaultcredpb.DeleteK8SAuthRoleResponse, error) { + return nil, fmt.Errorf("not supported") +} diff --git a/proto/pb/vaultcredpb/vault-cred.pb.go b/proto/pb/vaultcredpb/vault-cred.pb.go index 48639dc..7588417 100644 --- a/proto/pb/vaultcredpb/vault-cred.pb.go +++ b/proto/pb/vaultcredpb/vault-cred.pb.go @@ -20,7 +20,105 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type GetCredRequest struct { +type StatusCode int32 + +const ( + StatusCode_OK StatusCode = 0 + StatusCode_INTERNRAL_ERROR StatusCode = 1 + StatusCode_INVALID_ARGUMENT StatusCode = 2 + StatusCode_NOT_FOUND StatusCode = 3 +) + +// Enum value maps for StatusCode. +var ( + StatusCode_name = map[int32]string{ + 0: "OK", + 1: "INTERNRAL_ERROR", + 2: "INVALID_ARGUMENT", + 3: "NOT_FOUND", + } + StatusCode_value = map[string]int32{ + "OK": 0, + "INTERNRAL_ERROR": 1, + "INVALID_ARGUMENT": 2, + "NOT_FOUND": 3, + } +) + +func (x StatusCode) Enum() *StatusCode { + p := new(StatusCode) + *p = x + return p +} + +func (x StatusCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StatusCode) Descriptor() protoreflect.EnumDescriptor { + return file_vault_cred_proto_enumTypes[0].Descriptor() +} + +func (StatusCode) Type() protoreflect.EnumType { + return &file_vault_cred_proto_enumTypes[0] +} + +func (x StatusCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StatusCode.Descriptor instead. +func (StatusCode) EnumDescriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{0} +} + +type SecretAccess int32 + +const ( + SecretAccess_READ SecretAccess = 0 + SecretAccess_WRITE SecretAccess = 1 +) + +// Enum value maps for SecretAccess. +var ( + SecretAccess_name = map[int32]string{ + 0: "READ", + 1: "WRITE", + } + SecretAccess_value = map[string]int32{ + "READ": 0, + "WRITE": 1, + } +) + +func (x SecretAccess) Enum() *SecretAccess { + p := new(SecretAccess) + *p = x + return p +} + +func (x SecretAccess) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecretAccess) Descriptor() protoreflect.EnumDescriptor { + return file_vault_cred_proto_enumTypes[1].Descriptor() +} + +func (SecretAccess) Type() protoreflect.EnumType { + return &file_vault_cred_proto_enumTypes[1] +} + +func (x SecretAccess) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecretAccess.Descriptor instead. +func (SecretAccess) EnumDescriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{1} +} + +type GetCredentialRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -30,8 +128,8 @@ type GetCredRequest struct { CredIdentifier string `protobuf:"bytes,3,opt,name=credIdentifier,proto3" json:"credIdentifier,omitempty"` } -func (x *GetCredRequest) Reset() { - *x = GetCredRequest{} +func (x *GetCredentialRequest) Reset() { + *x = GetCredentialRequest{} if protoimpl.UnsafeEnabled { mi := &file_vault_cred_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -39,14 +137,595 @@ func (x *GetCredRequest) Reset() { } } -func (x *GetCredRequest) String() string { +func (x *GetCredentialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCredentialRequest) ProtoMessage() {} + +func (x *GetCredentialRequest) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCredentialRequest.ProtoReflect.Descriptor instead. +func (*GetCredentialRequest) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{0} +} + +func (x *GetCredentialRequest) GetCredentialType() string { + if x != nil { + return x.CredentialType + } + return "" +} + +func (x *GetCredentialRequest) GetCredEntityName() string { + if x != nil { + return x.CredEntityName + } + return "" +} + +func (x *GetCredentialRequest) GetCredIdentifier() string { + if x != nil { + return x.CredIdentifier + } + return "" +} + +type GetCredentialResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // service-cred credential, for example: "userName": "iam-root", "password:: "hello" + // client-cert credential, for example: "clientId": "intelops-user", "ca.crt": "...", "client.crt": "...", "client.key": "..." + Credential map[string]string `protobuf:"bytes,1,rep,name=credential,proto3" json:"credential,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetCredentialResponse) Reset() { + *x = GetCredentialResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCredentialResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCredentialResponse) ProtoMessage() {} + +func (x *GetCredentialResponse) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCredentialResponse.ProtoReflect.Descriptor instead. +func (*GetCredentialResponse) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{1} +} + +func (x *GetCredentialResponse) GetCredential() map[string]string { + if x != nil { + return x.Credential + } + return nil +} + +type PutCredentialRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CredentialType string `protobuf:"bytes,1,opt,name=credentialType,proto3" json:"credentialType,omitempty"` + CredEntityName string `protobuf:"bytes,2,opt,name=credEntityName,proto3" json:"credEntityName,omitempty"` + CredIdentifier string `protobuf:"bytes,3,opt,name=credIdentifier,proto3" json:"credIdentifier,omitempty"` + // service-cred credential, for example: "userName": "iam-root", "password:: "hello" + // client-cert credential, for example: "clientId": "intelops-user", "ca.crt": "...", "client.crt": "...", "client.key": "..." + Credential map[string]string `protobuf:"bytes,6,rep,name=credential,proto3" json:"credential,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *PutCredentialRequest) Reset() { + *x = PutCredentialRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutCredentialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutCredentialRequest) ProtoMessage() {} + +func (x *PutCredentialRequest) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutCredentialRequest.ProtoReflect.Descriptor instead. +func (*PutCredentialRequest) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{2} +} + +func (x *PutCredentialRequest) GetCredentialType() string { + if x != nil { + return x.CredentialType + } + return "" +} + +func (x *PutCredentialRequest) GetCredEntityName() string { + if x != nil { + return x.CredEntityName + } + return "" +} + +func (x *PutCredentialRequest) GetCredIdentifier() string { + if x != nil { + return x.CredIdentifier + } + return "" +} + +func (x *PutCredentialRequest) GetCredential() map[string]string { + if x != nil { + return x.Credential + } + return nil +} + +type PutCredentialResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PutCredentialResponse) Reset() { + *x = PutCredentialResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutCredentialResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutCredentialResponse) ProtoMessage() {} + +func (x *PutCredentialResponse) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutCredentialResponse.ProtoReflect.Descriptor instead. +func (*PutCredentialResponse) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{3} +} + +type DeleteCredentialRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CredentialType string `protobuf:"bytes,1,opt,name=credentialType,proto3" json:"credentialType,omitempty"` + CredEntityName string `protobuf:"bytes,2,opt,name=credEntityName,proto3" json:"credEntityName,omitempty"` + CredIdentifier string `protobuf:"bytes,3,opt,name=credIdentifier,proto3" json:"credIdentifier,omitempty"` +} + +func (x *DeleteCredentialRequest) Reset() { + *x = DeleteCredentialRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteCredentialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteCredentialRequest) ProtoMessage() {} + +func (x *DeleteCredentialRequest) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteCredentialRequest.ProtoReflect.Descriptor instead. +func (*DeleteCredentialRequest) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteCredentialRequest) GetCredentialType() string { + if x != nil { + return x.CredentialType + } + return "" +} + +func (x *DeleteCredentialRequest) GetCredEntityName() string { + if x != nil { + return x.CredEntityName + } + return "" +} + +func (x *DeleteCredentialRequest) GetCredIdentifier() string { + if x != nil { + return x.CredIdentifier + } + return "" +} + +type DeleteCredentialResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteCredentialResponse) Reset() { + *x = DeleteCredentialResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteCredentialResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteCredentialResponse) ProtoMessage() {} + +func (x *DeleteCredentialResponse) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteCredentialResponse.ProtoReflect.Descriptor instead. +func (*DeleteCredentialResponse) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{5} +} + +type CreateAppRoleTokenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AppRoleName string `protobuf:"bytes,1,opt,name=appRoleName,proto3" json:"appRoleName,omitempty"` + SecretPaths []string `protobuf:"bytes,2,rep,name=secretPaths,proto3" json:"secretPaths,omitempty"` +} + +func (x *CreateAppRoleTokenRequest) Reset() { + *x = CreateAppRoleTokenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAppRoleTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAppRoleTokenRequest) ProtoMessage() {} + +func (x *CreateAppRoleTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAppRoleTokenRequest.ProtoReflect.Descriptor instead. +func (*CreateAppRoleTokenRequest) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateAppRoleTokenRequest) GetAppRoleName() string { + if x != nil { + return x.AppRoleName + } + return "" +} + +func (x *CreateAppRoleTokenRequest) GetSecretPaths() []string { + if x != nil { + return x.SecretPaths + } + return nil +} + +type CreateAppRoleTokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` +} + +func (x *CreateAppRoleTokenResponse) Reset() { + *x = CreateAppRoleTokenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAppRoleTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAppRoleTokenResponse) ProtoMessage() {} + +func (x *CreateAppRoleTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAppRoleTokenResponse.ProtoReflect.Descriptor instead. +func (*CreateAppRoleTokenResponse) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateAppRoleTokenResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type DeleteAppRoleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RoleName string `protobuf:"bytes,1,opt,name=roleName,proto3" json:"roleName,omitempty"` +} + +func (x *DeleteAppRoleRequest) Reset() { + *x = DeleteAppRoleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAppRoleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAppRoleRequest) ProtoMessage() {} + +func (x *DeleteAppRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAppRoleRequest.ProtoReflect.Descriptor instead. +func (*DeleteAppRoleRequest) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteAppRoleRequest) GetRoleName() string { + if x != nil { + return x.RoleName + } + return "" +} + +type DeleteAppRoleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status StatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=vaultcredpb.StatusCode" json:"status,omitempty"` + StatusMessage string `protobuf:"bytes,2,opt,name=statusMessage,proto3" json:"statusMessage,omitempty"` +} + +func (x *DeleteAppRoleResponse) Reset() { + *x = DeleteAppRoleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAppRoleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAppRoleResponse) ProtoMessage() {} + +func (x *DeleteAppRoleResponse) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAppRoleResponse.ProtoReflect.Descriptor instead. +func (*DeleteAppRoleResponse) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{9} +} + +func (x *DeleteAppRoleResponse) GetStatus() StatusCode { + if x != nil { + return x.Status + } + return StatusCode_OK +} + +func (x *DeleteAppRoleResponse) GetStatusMessage() string { + if x != nil { + return x.StatusMessage + } + return "" +} + +type GetCredentialWithAppRoleTokenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + SecretPath string `protobuf:"bytes,2,opt,name=secretPath,proto3" json:"secretPath,omitempty"` +} + +func (x *GetCredentialWithAppRoleTokenRequest) Reset() { + *x = GetCredentialWithAppRoleTokenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCredentialWithAppRoleTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCredentialWithAppRoleTokenRequest) ProtoMessage() {} + +func (x *GetCredentialWithAppRoleTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCredentialWithAppRoleTokenRequest.ProtoReflect.Descriptor instead. +func (*GetCredentialWithAppRoleTokenRequest) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{10} +} + +func (x *GetCredentialWithAppRoleTokenRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *GetCredentialWithAppRoleTokenRequest) GetSecretPath() string { + if x != nil { + return x.SecretPath + } + return "" +} + +type GetCredentialWithAppRoleTokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Credential map[string]string `protobuf:"bytes,1,rep,name=credential,proto3" json:"credential,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetCredentialWithAppRoleTokenResponse) Reset() { + *x = GetCredentialWithAppRoleTokenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_cred_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCredentialWithAppRoleTokenResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetCredRequest) ProtoMessage() {} +func (*GetCredentialWithAppRoleTokenResponse) ProtoMessage() {} -func (x *GetCredRequest) ProtoReflect() protoreflect.Message { - mi := &file_vault_cred_proto_msgTypes[0] +func (x *GetCredentialWithAppRoleTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -57,59 +736,44 @@ func (x *GetCredRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetCredRequest.ProtoReflect.Descriptor instead. -func (*GetCredRequest) Descriptor() ([]byte, []int) { - return file_vault_cred_proto_rawDescGZIP(), []int{0} -} - -func (x *GetCredRequest) GetCredentialType() string { - if x != nil { - return x.CredentialType - } - return "" -} - -func (x *GetCredRequest) GetCredEntityName() string { - if x != nil { - return x.CredEntityName - } - return "" +// Deprecated: Use GetCredentialWithAppRoleTokenResponse.ProtoReflect.Descriptor instead. +func (*GetCredentialWithAppRoleTokenResponse) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{11} } -func (x *GetCredRequest) GetCredIdentifier() string { +func (x *GetCredentialWithAppRoleTokenResponse) GetCredential() map[string]string { if x != nil { - return x.CredIdentifier + return x.Credential } - return "" + return nil } -type GetCredResponse struct { +type SecretPolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // service-cred credential, for example: "userName": "iam-root", "password:: "hello" - // client-cert credential, for example: "clientId": "intelops-user", "ca.crt": "...", "client.crt": "...", "client.key": "..." - Credential map[string]string `protobuf:"bytes,1,rep,name=credential,proto3" json:"credential,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + SecretPath string `protobuf:"bytes,1,opt,name=secretPath,proto3" json:"secretPath,omitempty"` + Access SecretAccess `protobuf:"varint,2,opt,name=access,proto3,enum=vaultcredpb.SecretAccess" json:"access,omitempty"` } -func (x *GetCredResponse) Reset() { - *x = GetCredResponse{} +func (x *SecretPolicy) Reset() { + *x = SecretPolicy{} if protoimpl.UnsafeEnabled { - mi := &file_vault_cred_proto_msgTypes[1] + mi := &file_vault_cred_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetCredResponse) String() string { +func (x *SecretPolicy) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetCredResponse) ProtoMessage() {} +func (*SecretPolicy) ProtoMessage() {} -func (x *GetCredResponse) ProtoReflect() protoreflect.Message { - mi := &file_vault_cred_proto_msgTypes[1] +func (x *SecretPolicy) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -120,48 +784,52 @@ func (x *GetCredResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetCredResponse.ProtoReflect.Descriptor instead. -func (*GetCredResponse) Descriptor() ([]byte, []int) { - return file_vault_cred_proto_rawDescGZIP(), []int{1} +// Deprecated: Use SecretPolicy.ProtoReflect.Descriptor instead. +func (*SecretPolicy) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{12} } -func (x *GetCredResponse) GetCredential() map[string]string { +func (x *SecretPolicy) GetSecretPath() string { if x != nil { - return x.Credential + return x.SecretPath } - return nil + return "" +} + +func (x *SecretPolicy) GetAccess() SecretAccess { + if x != nil { + return x.Access + } + return SecretAccess_READ } -type PutCredRequest struct { +type CreateK8SAuthRoleRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CredentialType string `protobuf:"bytes,1,opt,name=credentialType,proto3" json:"credentialType,omitempty"` - CredEntityName string `protobuf:"bytes,2,opt,name=credEntityName,proto3" json:"credEntityName,omitempty"` - CredIdentifier string `protobuf:"bytes,3,opt,name=credIdentifier,proto3" json:"credIdentifier,omitempty"` - // service-cred credential, for example: "userName": "iam-root", "password:: "hello" - // client-cert credential, for example: "clientId": "intelops-user", "ca.crt": "...", "client.crt": "...", "client.key": "..." - Credential map[string]string `protobuf:"bytes,6,rep,name=credential,proto3" json:"credential,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + RoleName string `protobuf:"bytes,1,opt,name=roleName,proto3" json:"roleName,omitempty"` + SecretPolicy []*SecretPolicy `protobuf:"bytes,2,rep,name=secretPolicy,proto3" json:"secretPolicy,omitempty"` + ClusterName string `protobuf:"bytes,3,opt,name=clusterName,proto3" json:"clusterName,omitempty"` } -func (x *PutCredRequest) Reset() { - *x = PutCredRequest{} +func (x *CreateK8SAuthRoleRequest) Reset() { + *x = CreateK8SAuthRoleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vault_cred_proto_msgTypes[2] + mi := &file_vault_cred_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PutCredRequest) String() string { +func (x *CreateK8SAuthRoleRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PutCredRequest) ProtoMessage() {} +func (*CreateK8SAuthRoleRequest) ProtoMessage() {} -func (x *PutCredRequest) ProtoReflect() protoreflect.Message { - mi := &file_vault_cred_proto_msgTypes[2] +func (x *CreateK8SAuthRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -172,62 +840,58 @@ func (x *PutCredRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PutCredRequest.ProtoReflect.Descriptor instead. -func (*PutCredRequest) Descriptor() ([]byte, []int) { - return file_vault_cred_proto_rawDescGZIP(), []int{2} +// Deprecated: Use CreateK8SAuthRoleRequest.ProtoReflect.Descriptor instead. +func (*CreateK8SAuthRoleRequest) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{13} } -func (x *PutCredRequest) GetCredentialType() string { +func (x *CreateK8SAuthRoleRequest) GetRoleName() string { if x != nil { - return x.CredentialType + return x.RoleName } return "" } -func (x *PutCredRequest) GetCredEntityName() string { +func (x *CreateK8SAuthRoleRequest) GetSecretPolicy() []*SecretPolicy { if x != nil { - return x.CredEntityName + return x.SecretPolicy } - return "" + return nil } -func (x *PutCredRequest) GetCredIdentifier() string { +func (x *CreateK8SAuthRoleRequest) GetClusterName() string { if x != nil { - return x.CredIdentifier + return x.ClusterName } return "" } -func (x *PutCredRequest) GetCredential() map[string]string { - if x != nil { - return x.Credential - } - return nil -} - -type PutCredResponse struct { +type CreateK8SAuthRoleResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Status StatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=vaultcredpb.StatusCode" json:"status,omitempty"` + StatusMessage string `protobuf:"bytes,2,opt,name=statusMessage,proto3" json:"statusMessage,omitempty"` } -func (x *PutCredResponse) Reset() { - *x = PutCredResponse{} +func (x *CreateK8SAuthRoleResponse) Reset() { + *x = CreateK8SAuthRoleResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vault_cred_proto_msgTypes[3] + mi := &file_vault_cred_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PutCredResponse) String() string { +func (x *CreateK8SAuthRoleResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PutCredResponse) ProtoMessage() {} +func (*CreateK8SAuthRoleResponse) ProtoMessage() {} -func (x *PutCredResponse) ProtoReflect() protoreflect.Message { - mi := &file_vault_cred_proto_msgTypes[3] +func (x *CreateK8SAuthRoleResponse) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -238,38 +902,52 @@ func (x *PutCredResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PutCredResponse.ProtoReflect.Descriptor instead. -func (*PutCredResponse) Descriptor() ([]byte, []int) { - return file_vault_cred_proto_rawDescGZIP(), []int{3} +// Deprecated: Use CreateK8SAuthRoleResponse.ProtoReflect.Descriptor instead. +func (*CreateK8SAuthRoleResponse) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{14} +} + +func (x *CreateK8SAuthRoleResponse) GetStatus() StatusCode { + if x != nil { + return x.Status + } + return StatusCode_OK +} + +func (x *CreateK8SAuthRoleResponse) GetStatusMessage() string { + if x != nil { + return x.StatusMessage + } + return "" } -type DeleteCredRequest struct { +type UpdateK8SAuthRoleRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CredentialType string `protobuf:"bytes,1,opt,name=credentialType,proto3" json:"credentialType,omitempty"` - CredEntityName string `protobuf:"bytes,2,opt,name=credEntityName,proto3" json:"credEntityName,omitempty"` - CredIdentifier string `protobuf:"bytes,3,opt,name=credIdentifier,proto3" json:"credIdentifier,omitempty"` + RoleName string `protobuf:"bytes,1,opt,name=roleName,proto3" json:"roleName,omitempty"` + SecretPolicy []*SecretPolicy `protobuf:"bytes,2,rep,name=secretPolicy,proto3" json:"secretPolicy,omitempty"` + ClusterName string `protobuf:"bytes,3,opt,name=clusterName,proto3" json:"clusterName,omitempty"` } -func (x *DeleteCredRequest) Reset() { - *x = DeleteCredRequest{} +func (x *UpdateK8SAuthRoleRequest) Reset() { + *x = UpdateK8SAuthRoleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vault_cred_proto_msgTypes[4] + mi := &file_vault_cred_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeleteCredRequest) String() string { +func (x *UpdateK8SAuthRoleRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteCredRequest) ProtoMessage() {} +func (*UpdateK8SAuthRoleRequest) ProtoMessage() {} -func (x *DeleteCredRequest) ProtoReflect() protoreflect.Message { - mi := &file_vault_cred_proto_msgTypes[4] +func (x *UpdateK8SAuthRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -280,55 +958,58 @@ func (x *DeleteCredRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeleteCredRequest.ProtoReflect.Descriptor instead. -func (*DeleteCredRequest) Descriptor() ([]byte, []int) { - return file_vault_cred_proto_rawDescGZIP(), []int{4} +// Deprecated: Use UpdateK8SAuthRoleRequest.ProtoReflect.Descriptor instead. +func (*UpdateK8SAuthRoleRequest) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{15} } -func (x *DeleteCredRequest) GetCredentialType() string { +func (x *UpdateK8SAuthRoleRequest) GetRoleName() string { if x != nil { - return x.CredentialType + return x.RoleName } return "" } -func (x *DeleteCredRequest) GetCredEntityName() string { +func (x *UpdateK8SAuthRoleRequest) GetSecretPolicy() []*SecretPolicy { if x != nil { - return x.CredEntityName + return x.SecretPolicy } - return "" + return nil } -func (x *DeleteCredRequest) GetCredIdentifier() string { +func (x *UpdateK8SAuthRoleRequest) GetClusterName() string { if x != nil { - return x.CredIdentifier + return x.ClusterName } return "" } -type DeleteCredResponse struct { +type UpdateK8SAuthRoleResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Status StatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=vaultcredpb.StatusCode" json:"status,omitempty"` + StatusMessage string `protobuf:"bytes,2,opt,name=statusMessage,proto3" json:"statusMessage,omitempty"` } -func (x *DeleteCredResponse) Reset() { - *x = DeleteCredResponse{} +func (x *UpdateK8SAuthRoleResponse) Reset() { + *x = UpdateK8SAuthRoleResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vault_cred_proto_msgTypes[5] + mi := &file_vault_cred_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeleteCredResponse) String() string { +func (x *UpdateK8SAuthRoleResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteCredResponse) ProtoMessage() {} +func (*UpdateK8SAuthRoleResponse) ProtoMessage() {} -func (x *DeleteCredResponse) ProtoReflect() protoreflect.Message { - mi := &file_vault_cred_proto_msgTypes[5] +func (x *UpdateK8SAuthRoleResponse) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -339,37 +1020,51 @@ func (x *DeleteCredResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeleteCredResponse.ProtoReflect.Descriptor instead. -func (*DeleteCredResponse) Descriptor() ([]byte, []int) { - return file_vault_cred_proto_rawDescGZIP(), []int{5} +// Deprecated: Use UpdateK8SAuthRoleResponse.ProtoReflect.Descriptor instead. +func (*UpdateK8SAuthRoleResponse) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{16} +} + +func (x *UpdateK8SAuthRoleResponse) GetStatus() StatusCode { + if x != nil { + return x.Status + } + return StatusCode_OK +} + +func (x *UpdateK8SAuthRoleResponse) GetStatusMessage() string { + if x != nil { + return x.StatusMessage + } + return "" } -type GetAppRoleTokenRequest struct { +type DeleteK8SAuthRoleRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AppRoleName string `protobuf:"bytes,1,opt,name=appRoleName,proto3" json:"appRoleName,omitempty"` - CredentialPath string `protobuf:"bytes,2,opt,name=credentialPath,proto3" json:"credentialPath,omitempty"` + RoleName string `protobuf:"bytes,1,opt,name=roleName,proto3" json:"roleName,omitempty"` + ClusterName string `protobuf:"bytes,3,opt,name=clusterName,proto3" json:"clusterName,omitempty"` } -func (x *GetAppRoleTokenRequest) Reset() { - *x = GetAppRoleTokenRequest{} +func (x *DeleteK8SAuthRoleRequest) Reset() { + *x = DeleteK8SAuthRoleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vault_cred_proto_msgTypes[6] + mi := &file_vault_cred_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetAppRoleTokenRequest) String() string { +func (x *DeleteK8SAuthRoleRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAppRoleTokenRequest) ProtoMessage() {} +func (*DeleteK8SAuthRoleRequest) ProtoMessage() {} -func (x *GetAppRoleTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_vault_cred_proto_msgTypes[6] +func (x *DeleteK8SAuthRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -380,50 +1075,51 @@ func (x *GetAppRoleTokenRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAppRoleTokenRequest.ProtoReflect.Descriptor instead. -func (*GetAppRoleTokenRequest) Descriptor() ([]byte, []int) { - return file_vault_cred_proto_rawDescGZIP(), []int{6} +// Deprecated: Use DeleteK8SAuthRoleRequest.ProtoReflect.Descriptor instead. +func (*DeleteK8SAuthRoleRequest) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{17} } -func (x *GetAppRoleTokenRequest) GetAppRoleName() string { +func (x *DeleteK8SAuthRoleRequest) GetRoleName() string { if x != nil { - return x.AppRoleName + return x.RoleName } return "" } -func (x *GetAppRoleTokenRequest) GetCredentialPath() string { +func (x *DeleteK8SAuthRoleRequest) GetClusterName() string { if x != nil { - return x.CredentialPath + return x.ClusterName } return "" } -type GetAppRoleTokenResponse struct { +type DeleteK8SAuthRoleResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + Status StatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=vaultcredpb.StatusCode" json:"status,omitempty"` + StatusMessage string `protobuf:"bytes,2,opt,name=statusMessage,proto3" json:"statusMessage,omitempty"` } -func (x *GetAppRoleTokenResponse) Reset() { - *x = GetAppRoleTokenResponse{} +func (x *DeleteK8SAuthRoleResponse) Reset() { + *x = DeleteK8SAuthRoleResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vault_cred_proto_msgTypes[7] + mi := &file_vault_cred_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetAppRoleTokenResponse) String() string { +func (x *DeleteK8SAuthRoleResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAppRoleTokenResponse) ProtoMessage() {} +func (*DeleteK8SAuthRoleResponse) ProtoMessage() {} -func (x *GetAppRoleTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_vault_cred_proto_msgTypes[7] +func (x *DeleteK8SAuthRoleResponse) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -434,44 +1130,52 @@ func (x *GetAppRoleTokenResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAppRoleTokenResponse.ProtoReflect.Descriptor instead. -func (*GetAppRoleTokenResponse) Descriptor() ([]byte, []int) { - return file_vault_cred_proto_rawDescGZIP(), []int{7} +// Deprecated: Use DeleteK8SAuthRoleResponse.ProtoReflect.Descriptor instead. +func (*DeleteK8SAuthRoleResponse) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{18} } -func (x *GetAppRoleTokenResponse) GetToken() string { +func (x *DeleteK8SAuthRoleResponse) GetStatus() StatusCode { if x != nil { - return x.Token + return x.Status + } + return StatusCode_OK +} + +func (x *DeleteK8SAuthRoleResponse) GetStatusMessage() string { + if x != nil { + return x.StatusMessage } return "" } -type GetCredentialWithAppRoleTokenRequest struct { +type ConfigureClusterK8SAuthRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - CredentialPath string `protobuf:"bytes,2,opt,name=credentialPath,proto3" json:"credentialPath,omitempty"` + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` + CaCert string `protobuf:"bytes,2,opt,name=caCert,proto3" json:"caCert,omitempty"` + Enable bool `protobuf:"varint,3,opt,name=enable,proto3" json:"enable,omitempty"` } -func (x *GetCredentialWithAppRoleTokenRequest) Reset() { - *x = GetCredentialWithAppRoleTokenRequest{} +func (x *ConfigureClusterK8SAuthRequest) Reset() { + *x = ConfigureClusterK8SAuthRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vault_cred_proto_msgTypes[8] + mi := &file_vault_cred_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetCredentialWithAppRoleTokenRequest) String() string { +func (x *ConfigureClusterK8SAuthRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetCredentialWithAppRoleTokenRequest) ProtoMessage() {} +func (*ConfigureClusterK8SAuthRequest) ProtoMessage() {} -func (x *GetCredentialWithAppRoleTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_vault_cred_proto_msgTypes[8] +func (x *ConfigureClusterK8SAuthRequest) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -482,50 +1186,58 @@ func (x *GetCredentialWithAppRoleTokenRequest) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use GetCredentialWithAppRoleTokenRequest.ProtoReflect.Descriptor instead. -func (*GetCredentialWithAppRoleTokenRequest) Descriptor() ([]byte, []int) { - return file_vault_cred_proto_rawDescGZIP(), []int{8} +// Deprecated: Use ConfigureClusterK8SAuthRequest.ProtoReflect.Descriptor instead. +func (*ConfigureClusterK8SAuthRequest) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{19} } -func (x *GetCredentialWithAppRoleTokenRequest) GetToken() string { +func (x *ConfigureClusterK8SAuthRequest) GetHost() string { if x != nil { - return x.Token + return x.Host } return "" } -func (x *GetCredentialWithAppRoleTokenRequest) GetCredentialPath() string { +func (x *ConfigureClusterK8SAuthRequest) GetCaCert() string { if x != nil { - return x.CredentialPath + return x.CaCert } return "" } -type GetCredentialWithAppRoleTokenResponse struct { +func (x *ConfigureClusterK8SAuthRequest) GetEnable() bool { + if x != nil { + return x.Enable + } + return false +} + +type ConfigureClusterK8SAuthResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Credential map[string]string `protobuf:"bytes,1,rep,name=credential,proto3" json:"credential,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Status StatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=vaultcredpb.StatusCode" json:"status,omitempty"` + StatusMessage string `protobuf:"bytes,2,opt,name=statusMessage,proto3" json:"statusMessage,omitempty"` } -func (x *GetCredentialWithAppRoleTokenResponse) Reset() { - *x = GetCredentialWithAppRoleTokenResponse{} +func (x *ConfigureClusterK8SAuthResponse) Reset() { + *x = ConfigureClusterK8SAuthResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vault_cred_proto_msgTypes[9] + mi := &file_vault_cred_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetCredentialWithAppRoleTokenResponse) String() string { +func (x *ConfigureClusterK8SAuthResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetCredentialWithAppRoleTokenResponse) ProtoMessage() {} +func (*ConfigureClusterK8SAuthResponse) ProtoMessage() {} -func (x *GetCredentialWithAppRoleTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_vault_cred_proto_msgTypes[9] +func (x *ConfigureClusterK8SAuthResponse) ProtoReflect() protoreflect.Message { + mi := &file_vault_cred_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -536,16 +1248,23 @@ func (x *GetCredentialWithAppRoleTokenResponse) ProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -// Deprecated: Use GetCredentialWithAppRoleTokenResponse.ProtoReflect.Descriptor instead. -func (*GetCredentialWithAppRoleTokenResponse) Descriptor() ([]byte, []int) { - return file_vault_cred_proto_rawDescGZIP(), []int{9} +// Deprecated: Use ConfigureClusterK8SAuthResponse.ProtoReflect.Descriptor instead. +func (*ConfigureClusterK8SAuthResponse) Descriptor() ([]byte, []int) { + return file_vault_cred_proto_rawDescGZIP(), []int{20} } -func (x *GetCredentialWithAppRoleTokenResponse) GetCredential() map[string]string { +func (x *ConfigureClusterK8SAuthResponse) GetStatus() StatusCode { if x != nil { - return x.Credential + return x.Status } - return nil + return StatusCode_OK +} + +func (x *ConfigureClusterK8SAuthResponse) GetStatusMessage() string { + if x != nil { + return x.StatusMessage + } + return "" } var File_vault_cred_proto protoreflect.FileDescriptor @@ -553,114 +1272,237 @@ var File_vault_cred_proto protoreflect.FileDescriptor var file_vault_cred_proto_rawDesc = []byte{ 0x0a, 0x10, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2d, 0x63, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x22, - 0x88, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, - 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x9e, 0x01, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x1a, 0x3d, 0x0a, 0x0f, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x94, 0x02, 0x0a, 0x0e, - 0x50, 0x75, 0x74, 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, - 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x63, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, - 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x74, 0x43, 0x72, 0x65, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x1a, 0x3d, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x11, 0x0a, 0x0f, 0x50, 0x75, 0x74, 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, - 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, - 0x72, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x70, 0x70, 0x52, 0x6f, 0x6c, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x22, 0x2f, 0x0a, - 0x17, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x8e, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x22, 0xaa, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, + 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x1a, 0x3d, + 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa0, 0x02, + 0x0a, 0x14, 0x50, 0x75, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, + 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x63, 0x72, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x51, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, + 0x2e, 0x50, 0x75, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x1a, 0x3d, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x17, 0x0a, 0x15, 0x50, 0x75, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x17, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, + 0x0e, 0x63, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, + 0x72, 0x65, 0x64, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x1a, 0x0a, + 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x0a, 0x19, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x52, 0x6f, 0x6c, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x70, 0x70, + 0x52, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x73, 0x22, 0x32, 0x0a, 0x1a, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x64, - 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x57, - 0x69, 0x74, 0x68, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x0a, 0x0e, - 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x50, 0x61, 0x74, 0x68, 0x22, 0xca, 0x01, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, - 0x74, 0x68, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x1a, 0x3d, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x32, 0xd7, 0x03, 0x0a, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x72, 0x65, 0x64, 0x12, - 0x46, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, - 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x07, 0x50, 0x75, 0x74, 0x43, 0x72, - 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, - 0x2e, 0x50, 0x75, 0x74, 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x50, 0x75, - 0x74, 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4f, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x12, 0x1e, 0x2e, - 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x5e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, - 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, - 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x88, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x32, + 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x22, 0x6e, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x52, + 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0x5c, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, + 0x22, 0xca, 0x01, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x31, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, - 0x74, 0x68, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, - 0x64, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x57, 0x69, 0x74, 0x68, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0e, 0x5a, 0x0c, 0x2f, - 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, + 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x41, 0x70, + 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x1a, 0x3d, + 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x61, 0x0a, + 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1e, 0x0a, + 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x31, 0x0a, + 0x06, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, + 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x22, 0x97, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, + 0x74, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x72, 0x0a, 0x19, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, + 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x97, + 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, + 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x72, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, + 0x64, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x58, 0x0a, 0x18, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x6f, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x72, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, + 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x1e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x38, + 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x78, 0x0a, 0x1f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, + 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x4e, 0x0a, 0x0a, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, + 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x52, 0x41, 0x4c, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, + 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4e, + 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x03, 0x2a, 0x23, 0x0a, 0x0c, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, + 0x41, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x01, 0x32, + 0x9a, 0x08, 0x0a, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x72, 0x65, 0x64, 0x12, 0x58, 0x0a, + 0x0d, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x21, + 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0d, 0x50, 0x75, 0x74, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x21, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, + 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x74, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x61, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x24, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, + 0x64, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, + 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x2e, 0x76, 0x61, 0x75, + 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, + 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x21, + 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x88, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x41, 0x70, 0x70, + 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x31, 0x2e, 0x76, 0x61, 0x75, 0x6c, + 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x76, + 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x41, 0x70, 0x70, 0x52, + 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x76, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x12, 0x2b, 0x2e, + 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x38, 0x53, 0x41, + 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x76, 0x61, 0x75, + 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x11, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x12, + 0x25, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, + 0x65, 0x64, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, + 0x74, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x64, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, + 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, + 0x64, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, + 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, + 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x38, 0x53, 0x41, 0x75, 0x74, 0x68, 0x52, 0x6f, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0e, 0x5a, 0x0c, + 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x63, 0x72, 0x65, 0x64, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -675,41 +1517,73 @@ func file_vault_cred_proto_rawDescGZIP() []byte { return file_vault_cred_proto_rawDescData } -var file_vault_cred_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_vault_cred_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_vault_cred_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_vault_cred_proto_goTypes = []interface{}{ - (*GetCredRequest)(nil), // 0: vaultcredpb.GetCredRequest - (*GetCredResponse)(nil), // 1: vaultcredpb.GetCredResponse - (*PutCredRequest)(nil), // 2: vaultcredpb.PutCredRequest - (*PutCredResponse)(nil), // 3: vaultcredpb.PutCredResponse - (*DeleteCredRequest)(nil), // 4: vaultcredpb.DeleteCredRequest - (*DeleteCredResponse)(nil), // 5: vaultcredpb.DeleteCredResponse - (*GetAppRoleTokenRequest)(nil), // 6: vaultcredpb.GetAppRoleTokenRequest - (*GetAppRoleTokenResponse)(nil), // 7: vaultcredpb.GetAppRoleTokenResponse - (*GetCredentialWithAppRoleTokenRequest)(nil), // 8: vaultcredpb.GetCredentialWithAppRoleTokenRequest - (*GetCredentialWithAppRoleTokenResponse)(nil), // 9: vaultcredpb.GetCredentialWithAppRoleTokenResponse - nil, // 10: vaultcredpb.GetCredResponse.CredentialEntry - nil, // 11: vaultcredpb.PutCredRequest.CredentialEntry - nil, // 12: vaultcredpb.GetCredentialWithAppRoleTokenResponse.CredentialEntry + (StatusCode)(0), // 0: vaultcredpb.StatusCode + (SecretAccess)(0), // 1: vaultcredpb.SecretAccess + (*GetCredentialRequest)(nil), // 2: vaultcredpb.GetCredentialRequest + (*GetCredentialResponse)(nil), // 3: vaultcredpb.GetCredentialResponse + (*PutCredentialRequest)(nil), // 4: vaultcredpb.PutCredentialRequest + (*PutCredentialResponse)(nil), // 5: vaultcredpb.PutCredentialResponse + (*DeleteCredentialRequest)(nil), // 6: vaultcredpb.DeleteCredentialRequest + (*DeleteCredentialResponse)(nil), // 7: vaultcredpb.DeleteCredentialResponse + (*CreateAppRoleTokenRequest)(nil), // 8: vaultcredpb.CreateAppRoleTokenRequest + (*CreateAppRoleTokenResponse)(nil), // 9: vaultcredpb.CreateAppRoleTokenResponse + (*DeleteAppRoleRequest)(nil), // 10: vaultcredpb.DeleteAppRoleRequest + (*DeleteAppRoleResponse)(nil), // 11: vaultcredpb.DeleteAppRoleResponse + (*GetCredentialWithAppRoleTokenRequest)(nil), // 12: vaultcredpb.GetCredentialWithAppRoleTokenRequest + (*GetCredentialWithAppRoleTokenResponse)(nil), // 13: vaultcredpb.GetCredentialWithAppRoleTokenResponse + (*SecretPolicy)(nil), // 14: vaultcredpb.secretPolicy + (*CreateK8SAuthRoleRequest)(nil), // 15: vaultcredpb.CreateK8SAuthRoleRequest + (*CreateK8SAuthRoleResponse)(nil), // 16: vaultcredpb.CreateK8SAuthRoleResponse + (*UpdateK8SAuthRoleRequest)(nil), // 17: vaultcredpb.UpdateK8SAuthRoleRequest + (*UpdateK8SAuthRoleResponse)(nil), // 18: vaultcredpb.UpdateK8SAuthRoleResponse + (*DeleteK8SAuthRoleRequest)(nil), // 19: vaultcredpb.DeleteK8SAuthRoleRequest + (*DeleteK8SAuthRoleResponse)(nil), // 20: vaultcredpb.DeleteK8SAuthRoleResponse + (*ConfigureClusterK8SAuthRequest)(nil), // 21: vaultcredpb.ConfigureClusterK8SAuthRequest + (*ConfigureClusterK8SAuthResponse)(nil), // 22: vaultcredpb.ConfigureClusterK8SAuthResponse + nil, // 23: vaultcredpb.GetCredentialResponse.CredentialEntry + nil, // 24: vaultcredpb.PutCredentialRequest.CredentialEntry + nil, // 25: vaultcredpb.GetCredentialWithAppRoleTokenResponse.CredentialEntry } var file_vault_cred_proto_depIdxs = []int32{ - 10, // 0: vaultcredpb.GetCredResponse.credential:type_name -> vaultcredpb.GetCredResponse.CredentialEntry - 11, // 1: vaultcredpb.PutCredRequest.credential:type_name -> vaultcredpb.PutCredRequest.CredentialEntry - 12, // 2: vaultcredpb.GetCredentialWithAppRoleTokenResponse.credential:type_name -> vaultcredpb.GetCredentialWithAppRoleTokenResponse.CredentialEntry - 0, // 3: vaultcredpb.VaultCred.GetCred:input_type -> vaultcredpb.GetCredRequest - 2, // 4: vaultcredpb.VaultCred.PutCred:input_type -> vaultcredpb.PutCredRequest - 4, // 5: vaultcredpb.VaultCred.DeleteCred:input_type -> vaultcredpb.DeleteCredRequest - 6, // 6: vaultcredpb.VaultCred.GetAppRoleToken:input_type -> vaultcredpb.GetAppRoleTokenRequest - 8, // 7: vaultcredpb.VaultCred.GetCredentialWithAppRoleToken:input_type -> vaultcredpb.GetCredentialWithAppRoleTokenRequest - 1, // 8: vaultcredpb.VaultCred.GetCred:output_type -> vaultcredpb.GetCredResponse - 3, // 9: vaultcredpb.VaultCred.PutCred:output_type -> vaultcredpb.PutCredResponse - 5, // 10: vaultcredpb.VaultCred.DeleteCred:output_type -> vaultcredpb.DeleteCredResponse - 7, // 11: vaultcredpb.VaultCred.GetAppRoleToken:output_type -> vaultcredpb.GetAppRoleTokenResponse - 9, // 12: vaultcredpb.VaultCred.GetCredentialWithAppRoleToken:output_type -> vaultcredpb.GetCredentialWithAppRoleTokenResponse - 8, // [8:13] is the sub-list for method output_type - 3, // [3:8] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 23, // 0: vaultcredpb.GetCredentialResponse.credential:type_name -> vaultcredpb.GetCredentialResponse.CredentialEntry + 24, // 1: vaultcredpb.PutCredentialRequest.credential:type_name -> vaultcredpb.PutCredentialRequest.CredentialEntry + 0, // 2: vaultcredpb.DeleteAppRoleResponse.status:type_name -> vaultcredpb.StatusCode + 25, // 3: vaultcredpb.GetCredentialWithAppRoleTokenResponse.credential:type_name -> vaultcredpb.GetCredentialWithAppRoleTokenResponse.CredentialEntry + 1, // 4: vaultcredpb.secretPolicy.access:type_name -> vaultcredpb.SecretAccess + 14, // 5: vaultcredpb.CreateK8SAuthRoleRequest.secretPolicy:type_name -> vaultcredpb.secretPolicy + 0, // 6: vaultcredpb.CreateK8SAuthRoleResponse.status:type_name -> vaultcredpb.StatusCode + 14, // 7: vaultcredpb.UpdateK8SAuthRoleRequest.secretPolicy:type_name -> vaultcredpb.secretPolicy + 0, // 8: vaultcredpb.UpdateK8SAuthRoleResponse.status:type_name -> vaultcredpb.StatusCode + 0, // 9: vaultcredpb.DeleteK8SAuthRoleResponse.status:type_name -> vaultcredpb.StatusCode + 0, // 10: vaultcredpb.ConfigureClusterK8SAuthResponse.status:type_name -> vaultcredpb.StatusCode + 2, // 11: vaultcredpb.VaultCred.GetCredential:input_type -> vaultcredpb.GetCredentialRequest + 4, // 12: vaultcredpb.VaultCred.PutCredential:input_type -> vaultcredpb.PutCredentialRequest + 6, // 13: vaultcredpb.VaultCred.DeleteCredential:input_type -> vaultcredpb.DeleteCredentialRequest + 8, // 14: vaultcredpb.VaultCred.CreateAppRoleToken:input_type -> vaultcredpb.CreateAppRoleTokenRequest + 10, // 15: vaultcredpb.VaultCred.DeleteAppRole:input_type -> vaultcredpb.DeleteAppRoleRequest + 12, // 16: vaultcredpb.VaultCred.GetCredentialWithAppRoleToken:input_type -> vaultcredpb.GetCredentialWithAppRoleTokenRequest + 21, // 17: vaultcredpb.VaultCred.ConfigureClusterK8SAuth:input_type -> vaultcredpb.ConfigureClusterK8SAuthRequest + 15, // 18: vaultcredpb.VaultCred.CreateK8SAuthRole:input_type -> vaultcredpb.CreateK8SAuthRoleRequest + 17, // 19: vaultcredpb.VaultCred.UpdateK8SAuthRole:input_type -> vaultcredpb.UpdateK8SAuthRoleRequest + 19, // 20: vaultcredpb.VaultCred.DeleteK8SAuthRole:input_type -> vaultcredpb.DeleteK8SAuthRoleRequest + 3, // 21: vaultcredpb.VaultCred.GetCredential:output_type -> vaultcredpb.GetCredentialResponse + 5, // 22: vaultcredpb.VaultCred.PutCredential:output_type -> vaultcredpb.PutCredentialResponse + 7, // 23: vaultcredpb.VaultCred.DeleteCredential:output_type -> vaultcredpb.DeleteCredentialResponse + 9, // 24: vaultcredpb.VaultCred.CreateAppRoleToken:output_type -> vaultcredpb.CreateAppRoleTokenResponse + 11, // 25: vaultcredpb.VaultCred.DeleteAppRole:output_type -> vaultcredpb.DeleteAppRoleResponse + 13, // 26: vaultcredpb.VaultCred.GetCredentialWithAppRoleToken:output_type -> vaultcredpb.GetCredentialWithAppRoleTokenResponse + 22, // 27: vaultcredpb.VaultCred.ConfigureClusterK8SAuth:output_type -> vaultcredpb.ConfigureClusterK8SAuthResponse + 16, // 28: vaultcredpb.VaultCred.CreateK8SAuthRole:output_type -> vaultcredpb.CreateK8SAuthRoleResponse + 18, // 29: vaultcredpb.VaultCred.UpdateK8SAuthRole:output_type -> vaultcredpb.UpdateK8SAuthRoleResponse + 20, // 30: vaultcredpb.VaultCred.DeleteK8SAuthRole:output_type -> vaultcredpb.DeleteK8SAuthRoleResponse + 21, // [21:31] is the sub-list for method output_type + 11, // [11:21] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_vault_cred_proto_init() } @@ -719,7 +1593,7 @@ func file_vault_cred_proto_init() { } if !protoimpl.UnsafeEnabled { file_vault_cred_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCredRequest); i { + switch v := v.(*GetCredentialRequest); i { case 0: return &v.state case 1: @@ -731,7 +1605,7 @@ func file_vault_cred_proto_init() { } } file_vault_cred_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCredResponse); i { + switch v := v.(*GetCredentialResponse); i { case 0: return &v.state case 1: @@ -743,7 +1617,7 @@ func file_vault_cred_proto_init() { } } file_vault_cred_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PutCredRequest); i { + switch v := v.(*PutCredentialRequest); i { case 0: return &v.state case 1: @@ -755,7 +1629,7 @@ func file_vault_cred_proto_init() { } } file_vault_cred_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PutCredResponse); i { + switch v := v.(*PutCredentialResponse); i { case 0: return &v.state case 1: @@ -767,7 +1641,7 @@ func file_vault_cred_proto_init() { } } file_vault_cred_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteCredRequest); i { + switch v := v.(*DeleteCredentialRequest); i { case 0: return &v.state case 1: @@ -779,7 +1653,7 @@ func file_vault_cred_proto_init() { } } file_vault_cred_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteCredResponse); i { + switch v := v.(*DeleteCredentialResponse); i { case 0: return &v.state case 1: @@ -791,7 +1665,7 @@ func file_vault_cred_proto_init() { } } file_vault_cred_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAppRoleTokenRequest); i { + switch v := v.(*CreateAppRoleTokenRequest); i { case 0: return &v.state case 1: @@ -803,7 +1677,7 @@ func file_vault_cred_proto_init() { } } file_vault_cred_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAppRoleTokenResponse); i { + switch v := v.(*CreateAppRoleTokenResponse); i { case 0: return &v.state case 1: @@ -815,7 +1689,7 @@ func file_vault_cred_proto_init() { } } file_vault_cred_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCredentialWithAppRoleTokenRequest); i { + switch v := v.(*DeleteAppRoleRequest); i { case 0: return &v.state case 1: @@ -827,6 +1701,30 @@ func file_vault_cred_proto_init() { } } file_vault_cred_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteAppRoleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_cred_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCredentialWithAppRoleTokenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_cred_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetCredentialWithAppRoleTokenResponse); i { case 0: return &v.state @@ -838,19 +1736,128 @@ func file_vault_cred_proto_init() { return nil } } + file_vault_cred_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecretPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_cred_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateK8SAuthRoleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_cred_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateK8SAuthRoleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_cred_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateK8SAuthRoleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_cred_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateK8SAuthRoleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_cred_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteK8SAuthRoleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_cred_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteK8SAuthRoleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_cred_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfigureClusterK8SAuthRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_cred_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfigureClusterK8SAuthResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vault_cred_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, + NumEnums: 2, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, GoTypes: file_vault_cred_proto_goTypes, DependencyIndexes: file_vault_cred_proto_depIdxs, + EnumInfos: file_vault_cred_proto_enumTypes, MessageInfos: file_vault_cred_proto_msgTypes, }.Build() File_vault_cred_proto = out.File diff --git a/proto/pb/vaultcredpb/vault-cred_grpc.pb.go b/proto/pb/vaultcredpb/vault-cred_grpc.pb.go index c9ffb98..6ba6618 100644 --- a/proto/pb/vaultcredpb/vault-cred_grpc.pb.go +++ b/proto/pb/vaultcredpb/vault-cred_grpc.pb.go @@ -19,11 +19,16 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - VaultCred_GetCred_FullMethodName = "/vaultcredpb.VaultCred/GetCred" - VaultCred_PutCred_FullMethodName = "/vaultcredpb.VaultCred/PutCred" - VaultCred_DeleteCred_FullMethodName = "/vaultcredpb.VaultCred/DeleteCred" - VaultCred_GetAppRoleToken_FullMethodName = "/vaultcredpb.VaultCred/GetAppRoleToken" + VaultCred_GetCredential_FullMethodName = "/vaultcredpb.VaultCred/GetCredential" + VaultCred_PutCredential_FullMethodName = "/vaultcredpb.VaultCred/PutCredential" + VaultCred_DeleteCredential_FullMethodName = "/vaultcredpb.VaultCred/DeleteCredential" + VaultCred_CreateAppRoleToken_FullMethodName = "/vaultcredpb.VaultCred/CreateAppRoleToken" + VaultCred_DeleteAppRole_FullMethodName = "/vaultcredpb.VaultCred/DeleteAppRole" VaultCred_GetCredentialWithAppRoleToken_FullMethodName = "/vaultcredpb.VaultCred/GetCredentialWithAppRoleToken" + VaultCred_ConfigureClusterK8SAuth_FullMethodName = "/vaultcredpb.VaultCred/ConfigureClusterK8SAuth" + VaultCred_CreateK8SAuthRole_FullMethodName = "/vaultcredpb.VaultCred/CreateK8SAuthRole" + VaultCred_UpdateK8SAuthRole_FullMethodName = "/vaultcredpb.VaultCred/UpdateK8SAuthRole" + VaultCred_DeleteK8SAuthRole_FullMethodName = "/vaultcredpb.VaultCred/DeleteK8SAuthRole" ) // VaultCredClient is the client API for VaultCred service. @@ -35,11 +40,16 @@ type VaultCredClient interface { // for example, client-certs path will be certs/client/clientA // for example, cassandra root user path will be service-cred/cassandra/root // pass authentication token with service account token to authenticate & authorize the request with vault - GetCred(ctx context.Context, in *GetCredRequest, opts ...grpc.CallOption) (*GetCredResponse, error) - PutCred(ctx context.Context, in *PutCredRequest, opts ...grpc.CallOption) (*PutCredResponse, error) - DeleteCred(ctx context.Context, in *DeleteCredRequest, opts ...grpc.CallOption) (*DeleteCredResponse, error) - GetAppRoleToken(ctx context.Context, in *GetAppRoleTokenRequest, opts ...grpc.CallOption) (*GetAppRoleTokenResponse, error) + GetCredential(ctx context.Context, in *GetCredentialRequest, opts ...grpc.CallOption) (*GetCredentialResponse, error) + PutCredential(ctx context.Context, in *PutCredentialRequest, opts ...grpc.CallOption) (*PutCredentialResponse, error) + DeleteCredential(ctx context.Context, in *DeleteCredentialRequest, opts ...grpc.CallOption) (*DeleteCredentialResponse, error) + CreateAppRoleToken(ctx context.Context, in *CreateAppRoleTokenRequest, opts ...grpc.CallOption) (*CreateAppRoleTokenResponse, error) + DeleteAppRole(ctx context.Context, in *DeleteAppRoleRequest, opts ...grpc.CallOption) (*DeleteAppRoleResponse, error) GetCredentialWithAppRoleToken(ctx context.Context, in *GetCredentialWithAppRoleTokenRequest, opts ...grpc.CallOption) (*GetCredentialWithAppRoleTokenResponse, error) + ConfigureClusterK8SAuth(ctx context.Context, in *ConfigureClusterK8SAuthRequest, opts ...grpc.CallOption) (*ConfigureClusterK8SAuthResponse, error) + CreateK8SAuthRole(ctx context.Context, in *CreateK8SAuthRoleRequest, opts ...grpc.CallOption) (*CreateK8SAuthRoleResponse, error) + UpdateK8SAuthRole(ctx context.Context, in *UpdateK8SAuthRoleRequest, opts ...grpc.CallOption) (*UpdateK8SAuthRoleResponse, error) + DeleteK8SAuthRole(ctx context.Context, in *DeleteK8SAuthRoleRequest, opts ...grpc.CallOption) (*DeleteK8SAuthRoleResponse, error) } type vaultCredClient struct { @@ -50,36 +60,45 @@ func NewVaultCredClient(cc grpc.ClientConnInterface) VaultCredClient { return &vaultCredClient{cc} } -func (c *vaultCredClient) GetCred(ctx context.Context, in *GetCredRequest, opts ...grpc.CallOption) (*GetCredResponse, error) { - out := new(GetCredResponse) - err := c.cc.Invoke(ctx, VaultCred_GetCred_FullMethodName, in, out, opts...) +func (c *vaultCredClient) GetCredential(ctx context.Context, in *GetCredentialRequest, opts ...grpc.CallOption) (*GetCredentialResponse, error) { + out := new(GetCredentialResponse) + err := c.cc.Invoke(ctx, VaultCred_GetCredential_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *vaultCredClient) PutCred(ctx context.Context, in *PutCredRequest, opts ...grpc.CallOption) (*PutCredResponse, error) { - out := new(PutCredResponse) - err := c.cc.Invoke(ctx, VaultCred_PutCred_FullMethodName, in, out, opts...) +func (c *vaultCredClient) PutCredential(ctx context.Context, in *PutCredentialRequest, opts ...grpc.CallOption) (*PutCredentialResponse, error) { + out := new(PutCredentialResponse) + err := c.cc.Invoke(ctx, VaultCred_PutCredential_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *vaultCredClient) DeleteCred(ctx context.Context, in *DeleteCredRequest, opts ...grpc.CallOption) (*DeleteCredResponse, error) { - out := new(DeleteCredResponse) - err := c.cc.Invoke(ctx, VaultCred_DeleteCred_FullMethodName, in, out, opts...) +func (c *vaultCredClient) DeleteCredential(ctx context.Context, in *DeleteCredentialRequest, opts ...grpc.CallOption) (*DeleteCredentialResponse, error) { + out := new(DeleteCredentialResponse) + err := c.cc.Invoke(ctx, VaultCred_DeleteCredential_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *vaultCredClient) GetAppRoleToken(ctx context.Context, in *GetAppRoleTokenRequest, opts ...grpc.CallOption) (*GetAppRoleTokenResponse, error) { - out := new(GetAppRoleTokenResponse) - err := c.cc.Invoke(ctx, VaultCred_GetAppRoleToken_FullMethodName, in, out, opts...) +func (c *vaultCredClient) CreateAppRoleToken(ctx context.Context, in *CreateAppRoleTokenRequest, opts ...grpc.CallOption) (*CreateAppRoleTokenResponse, error) { + out := new(CreateAppRoleTokenResponse) + err := c.cc.Invoke(ctx, VaultCred_CreateAppRoleToken_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vaultCredClient) DeleteAppRole(ctx context.Context, in *DeleteAppRoleRequest, opts ...grpc.CallOption) (*DeleteAppRoleResponse, error) { + out := new(DeleteAppRoleResponse) + err := c.cc.Invoke(ctx, VaultCred_DeleteAppRole_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -95,6 +114,42 @@ func (c *vaultCredClient) GetCredentialWithAppRoleToken(ctx context.Context, in return out, nil } +func (c *vaultCredClient) ConfigureClusterK8SAuth(ctx context.Context, in *ConfigureClusterK8SAuthRequest, opts ...grpc.CallOption) (*ConfigureClusterK8SAuthResponse, error) { + out := new(ConfigureClusterK8SAuthResponse) + err := c.cc.Invoke(ctx, VaultCred_ConfigureClusterK8SAuth_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vaultCredClient) CreateK8SAuthRole(ctx context.Context, in *CreateK8SAuthRoleRequest, opts ...grpc.CallOption) (*CreateK8SAuthRoleResponse, error) { + out := new(CreateK8SAuthRoleResponse) + err := c.cc.Invoke(ctx, VaultCred_CreateK8SAuthRole_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vaultCredClient) UpdateK8SAuthRole(ctx context.Context, in *UpdateK8SAuthRoleRequest, opts ...grpc.CallOption) (*UpdateK8SAuthRoleResponse, error) { + out := new(UpdateK8SAuthRoleResponse) + err := c.cc.Invoke(ctx, VaultCred_UpdateK8SAuthRole_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vaultCredClient) DeleteK8SAuthRole(ctx context.Context, in *DeleteK8SAuthRoleRequest, opts ...grpc.CallOption) (*DeleteK8SAuthRoleResponse, error) { + out := new(DeleteK8SAuthRoleResponse) + err := c.cc.Invoke(ctx, VaultCred_DeleteK8SAuthRole_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // VaultCredServer is the server API for VaultCred service. // All implementations must embed UnimplementedVaultCredServer // for forward compatibility @@ -104,11 +159,16 @@ type VaultCredServer interface { // for example, client-certs path will be certs/client/clientA // for example, cassandra root user path will be service-cred/cassandra/root // pass authentication token with service account token to authenticate & authorize the request with vault - GetCred(context.Context, *GetCredRequest) (*GetCredResponse, error) - PutCred(context.Context, *PutCredRequest) (*PutCredResponse, error) - DeleteCred(context.Context, *DeleteCredRequest) (*DeleteCredResponse, error) - GetAppRoleToken(context.Context, *GetAppRoleTokenRequest) (*GetAppRoleTokenResponse, error) + GetCredential(context.Context, *GetCredentialRequest) (*GetCredentialResponse, error) + PutCredential(context.Context, *PutCredentialRequest) (*PutCredentialResponse, error) + DeleteCredential(context.Context, *DeleteCredentialRequest) (*DeleteCredentialResponse, error) + CreateAppRoleToken(context.Context, *CreateAppRoleTokenRequest) (*CreateAppRoleTokenResponse, error) + DeleteAppRole(context.Context, *DeleteAppRoleRequest) (*DeleteAppRoleResponse, error) GetCredentialWithAppRoleToken(context.Context, *GetCredentialWithAppRoleTokenRequest) (*GetCredentialWithAppRoleTokenResponse, error) + ConfigureClusterK8SAuth(context.Context, *ConfigureClusterK8SAuthRequest) (*ConfigureClusterK8SAuthResponse, error) + CreateK8SAuthRole(context.Context, *CreateK8SAuthRoleRequest) (*CreateK8SAuthRoleResponse, error) + UpdateK8SAuthRole(context.Context, *UpdateK8SAuthRoleRequest) (*UpdateK8SAuthRoleResponse, error) + DeleteK8SAuthRole(context.Context, *DeleteK8SAuthRoleRequest) (*DeleteK8SAuthRoleResponse, error) mustEmbedUnimplementedVaultCredServer() } @@ -116,21 +176,36 @@ type VaultCredServer interface { type UnimplementedVaultCredServer struct { } -func (UnimplementedVaultCredServer) GetCred(context.Context, *GetCredRequest) (*GetCredResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCred not implemented") +func (UnimplementedVaultCredServer) GetCredential(context.Context, *GetCredentialRequest) (*GetCredentialResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCredential not implemented") } -func (UnimplementedVaultCredServer) PutCred(context.Context, *PutCredRequest) (*PutCredResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PutCred not implemented") +func (UnimplementedVaultCredServer) PutCredential(context.Context, *PutCredentialRequest) (*PutCredentialResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PutCredential not implemented") } -func (UnimplementedVaultCredServer) DeleteCred(context.Context, *DeleteCredRequest) (*DeleteCredResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteCred not implemented") +func (UnimplementedVaultCredServer) DeleteCredential(context.Context, *DeleteCredentialRequest) (*DeleteCredentialResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteCredential not implemented") } -func (UnimplementedVaultCredServer) GetAppRoleToken(context.Context, *GetAppRoleTokenRequest) (*GetAppRoleTokenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAppRoleToken not implemented") +func (UnimplementedVaultCredServer) CreateAppRoleToken(context.Context, *CreateAppRoleTokenRequest) (*CreateAppRoleTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAppRoleToken not implemented") +} +func (UnimplementedVaultCredServer) DeleteAppRole(context.Context, *DeleteAppRoleRequest) (*DeleteAppRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAppRole not implemented") } func (UnimplementedVaultCredServer) GetCredentialWithAppRoleToken(context.Context, *GetCredentialWithAppRoleTokenRequest) (*GetCredentialWithAppRoleTokenResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCredentialWithAppRoleToken not implemented") } +func (UnimplementedVaultCredServer) ConfigureClusterK8SAuth(context.Context, *ConfigureClusterK8SAuthRequest) (*ConfigureClusterK8SAuthResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConfigureClusterK8SAuth not implemented") +} +func (UnimplementedVaultCredServer) CreateK8SAuthRole(context.Context, *CreateK8SAuthRoleRequest) (*CreateK8SAuthRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateK8SAuthRole not implemented") +} +func (UnimplementedVaultCredServer) UpdateK8SAuthRole(context.Context, *UpdateK8SAuthRoleRequest) (*UpdateK8SAuthRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateK8SAuthRole not implemented") +} +func (UnimplementedVaultCredServer) DeleteK8SAuthRole(context.Context, *DeleteK8SAuthRoleRequest) (*DeleteK8SAuthRoleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteK8SAuthRole not implemented") +} func (UnimplementedVaultCredServer) mustEmbedUnimplementedVaultCredServer() {} // UnsafeVaultCredServer may be embedded to opt out of forward compatibility for this service. @@ -144,74 +219,92 @@ func RegisterVaultCredServer(s grpc.ServiceRegistrar, srv VaultCredServer) { s.RegisterService(&VaultCred_ServiceDesc, srv) } -func _VaultCred_GetCred_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCredRequest) +func _VaultCred_GetCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCredentialRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(VaultCredServer).GetCred(ctx, in) + return srv.(VaultCredServer).GetCredential(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: VaultCred_GetCred_FullMethodName, + FullMethod: VaultCred_GetCredential_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VaultCredServer).GetCred(ctx, req.(*GetCredRequest)) + return srv.(VaultCredServer).GetCredential(ctx, req.(*GetCredentialRequest)) } return interceptor(ctx, in, info, handler) } -func _VaultCred_PutCred_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutCredRequest) +func _VaultCred_PutCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutCredentialRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(VaultCredServer).PutCred(ctx, in) + return srv.(VaultCredServer).PutCredential(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: VaultCred_PutCred_FullMethodName, + FullMethod: VaultCred_PutCredential_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VaultCredServer).PutCred(ctx, req.(*PutCredRequest)) + return srv.(VaultCredServer).PutCredential(ctx, req.(*PutCredentialRequest)) } return interceptor(ctx, in, info, handler) } -func _VaultCred_DeleteCred_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteCredRequest) +func _VaultCred_DeleteCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteCredentialRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(VaultCredServer).DeleteCred(ctx, in) + return srv.(VaultCredServer).DeleteCredential(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: VaultCred_DeleteCred_FullMethodName, + FullMethod: VaultCred_DeleteCredential_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VaultCredServer).DeleteCred(ctx, req.(*DeleteCredRequest)) + return srv.(VaultCredServer).DeleteCredential(ctx, req.(*DeleteCredentialRequest)) } return interceptor(ctx, in, info, handler) } -func _VaultCred_GetAppRoleToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAppRoleTokenRequest) +func _VaultCred_CreateAppRoleToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAppRoleTokenRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(VaultCredServer).GetAppRoleToken(ctx, in) + return srv.(VaultCredServer).CreateAppRoleToken(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: VaultCred_GetAppRoleToken_FullMethodName, + FullMethod: VaultCred_CreateAppRoleToken_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VaultCredServer).GetAppRoleToken(ctx, req.(*GetAppRoleTokenRequest)) + return srv.(VaultCredServer).CreateAppRoleToken(ctx, req.(*CreateAppRoleTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VaultCred_DeleteAppRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAppRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VaultCredServer).DeleteAppRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VaultCred_DeleteAppRole_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VaultCredServer).DeleteAppRole(ctx, req.(*DeleteAppRoleRequest)) } return interceptor(ctx, in, info, handler) } @@ -234,6 +327,78 @@ func _VaultCred_GetCredentialWithAppRoleToken_Handler(srv interface{}, ctx conte return interceptor(ctx, in, info, handler) } +func _VaultCred_ConfigureClusterK8SAuth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ConfigureClusterK8SAuthRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VaultCredServer).ConfigureClusterK8SAuth(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VaultCred_ConfigureClusterK8SAuth_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VaultCredServer).ConfigureClusterK8SAuth(ctx, req.(*ConfigureClusterK8SAuthRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VaultCred_CreateK8SAuthRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateK8SAuthRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VaultCredServer).CreateK8SAuthRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VaultCred_CreateK8SAuthRole_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VaultCredServer).CreateK8SAuthRole(ctx, req.(*CreateK8SAuthRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VaultCred_UpdateK8SAuthRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateK8SAuthRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VaultCredServer).UpdateK8SAuthRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VaultCred_UpdateK8SAuthRole_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VaultCredServer).UpdateK8SAuthRole(ctx, req.(*UpdateK8SAuthRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VaultCred_DeleteK8SAuthRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteK8SAuthRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VaultCredServer).DeleteK8SAuthRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VaultCred_DeleteK8SAuthRole_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VaultCredServer).DeleteK8SAuthRole(ctx, req.(*DeleteK8SAuthRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + // VaultCred_ServiceDesc is the grpc.ServiceDesc for VaultCred service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -242,25 +407,45 @@ var VaultCred_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*VaultCredServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "GetCred", - Handler: _VaultCred_GetCred_Handler, + MethodName: "GetCredential", + Handler: _VaultCred_GetCredential_Handler, }, { - MethodName: "PutCred", - Handler: _VaultCred_PutCred_Handler, + MethodName: "PutCredential", + Handler: _VaultCred_PutCredential_Handler, }, { - MethodName: "DeleteCred", - Handler: _VaultCred_DeleteCred_Handler, + MethodName: "DeleteCredential", + Handler: _VaultCred_DeleteCredential_Handler, }, { - MethodName: "GetAppRoleToken", - Handler: _VaultCred_GetAppRoleToken_Handler, + MethodName: "CreateAppRoleToken", + Handler: _VaultCred_CreateAppRoleToken_Handler, + }, + { + MethodName: "DeleteAppRole", + Handler: _VaultCred_DeleteAppRole_Handler, }, { MethodName: "GetCredentialWithAppRoleToken", Handler: _VaultCred_GetCredentialWithAppRoleToken_Handler, }, + { + MethodName: "ConfigureClusterK8SAuth", + Handler: _VaultCred_ConfigureClusterK8SAuth_Handler, + }, + { + MethodName: "CreateK8SAuthRole", + Handler: _VaultCred_CreateK8SAuthRole_Handler, + }, + { + MethodName: "UpdateK8SAuthRole", + Handler: _VaultCred_UpdateK8SAuthRole_Handler, + }, + { + MethodName: "DeleteK8SAuthRole", + Handler: _VaultCred_DeleteK8SAuthRole_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "vault-cred.proto", diff --git a/proto/vault-cred.proto b/proto/vault-cred.proto index d834e29..63d1a2c 100644 --- a/proto/vault-cred.proto +++ b/proto/vault-cred.proto @@ -9,26 +9,38 @@ service VaultCred { // for example, client-certs path will be certs/client/clientA // for example, cassandra root user path will be service-cred/cassandra/root // pass authentication token with service account token to authenticate & authorize the request with vault - rpc GetCred (GetCredRequest) returns (GetCredResponse) {}; - rpc PutCred (PutCredRequest) returns (PutCredResponse) {}; - rpc DeleteCred (DeleteCredRequest) returns (DeleteCredResponse) {}; - rpc GetAppRoleToken(GetAppRoleTokenRequest) returns (GetAppRoleTokenResponse) {}; + rpc GetCredential (GetCredentialRequest) returns (GetCredentialResponse) {}; + rpc PutCredential (PutCredentialRequest) returns (PutCredentialResponse) {}; + rpc DeleteCredential (DeleteCredentialRequest) returns (DeleteCredentialResponse) {}; + rpc CreateAppRoleToken(CreateAppRoleTokenRequest) returns (CreateAppRoleTokenResponse) {}; + rpc DeleteAppRole(DeleteAppRoleRequest) returns (DeleteAppRoleResponse) {}; rpc GetCredentialWithAppRoleToken(GetCredentialWithAppRoleTokenRequest) returns (GetCredentialWithAppRoleTokenResponse) {}; + rpc ConfigureClusterK8SAuth(ConfigureClusterK8SAuthRequest) returns (ConfigureClusterK8SAuthResponse) {}; + rpc CreateK8SAuthRole(CreateK8SAuthRoleRequest) returns (CreateK8SAuthRoleResponse) {}; + rpc UpdateK8SAuthRole(UpdateK8SAuthRoleRequest) returns (UpdateK8SAuthRoleResponse) {}; + rpc DeleteK8SAuthRole(DeleteK8SAuthRoleRequest) returns (DeleteK8SAuthRoleResponse) {}; } -message GetCredRequest { +enum StatusCode { + OK = 0; + INTERNRAL_ERROR = 1; + INVALID_ARGUMENT = 2; + NOT_FOUND = 3; +} + +message GetCredentialRequest { string credentialType = 1; string credEntityName = 2; string credIdentifier = 3; } -message GetCredResponse { +message GetCredentialResponse { //service-cred credential, for example: "userName": "iam-root", "password:: "hello" //client-cert credential, for example: "clientId": "intelops-user", "ca.crt": "...", "client.crt": "...", "client.key": "..." map credential = 1; } -message PutCredRequest { +message PutCredentialRequest { string credentialType = 1; string credEntityName = 2; string credIdentifier = 3; @@ -37,32 +49,95 @@ message PutCredRequest { map credential = 6; } -message PutCredResponse { +message PutCredentialResponse { } -message DeleteCredRequest { +message DeleteCredentialRequest { string credentialType = 1; string credEntityName = 2; string credIdentifier = 3; } -message DeleteCredResponse { +message DeleteCredentialResponse { } -message GetAppRoleTokenRequest { +message CreateAppRoleTokenRequest { string appRoleName = 1; - string credentialPath = 2; + repeated string secretPaths = 2; } -message GetAppRoleTokenResponse { +message CreateAppRoleTokenResponse { string token = 1; } +message DeleteAppRoleRequest { + string roleName = 1; +} + +message DeleteAppRoleResponse { + StatusCode status = 1; + string statusMessage = 2; +} + message GetCredentialWithAppRoleTokenRequest { string token = 1; - string credentialPath = 2; + string secretPath = 2; } message GetCredentialWithAppRoleTokenResponse { map credential = 1; -} \ No newline at end of file +} + + +enum SecretAccess { + READ = 0; + WRITE = 1; +} + +message secretPolicy { + string secretPath = 1; + SecretAccess access = 2; +} + +message CreateK8SAuthRoleRequest { + string roleName = 1; + repeated secretPolicy secretPolicy = 2; + string clusterName = 3; +} + +message CreateK8SAuthRoleResponse { + StatusCode status = 1; + string statusMessage = 2; +} + +message UpdateK8SAuthRoleRequest { + string roleName = 1; + repeated secretPolicy secretPolicy = 2; + string clusterName = 3; +} + +message UpdateK8SAuthRoleResponse { + StatusCode status = 1; + string statusMessage = 2; +} + +message DeleteK8SAuthRoleRequest { + string roleName = 1; + string clusterName = 3; +} + +message DeleteK8SAuthRoleResponse { + StatusCode status = 1; + string statusMessage = 2; +} + +message ConfigureClusterK8SAuthRequest { + string host = 1; + string caCert = 2; + bool enable = 3; +} + +message ConfigureClusterK8SAuthResponse { + StatusCode status = 1; + string statusMessage = 2; +}