feat(proto): define storage bucket state in worker status

This commit is contained in:
Damian Debkowski authored and Elim Tsiagbey committed 2024-07-17 14:23:11 -04:00
1 parent dc21e714a5
commit 88c67e4eea
12 files changed
+1133 -216

No files matched your search

+4
View File
@@ -7920,6 +7920,10 @@
"description": "",
"title": "Filters to the worker(s) that can handle requests for this storage bucket"
},
"storage_bucket_credential_id": {
"type": "string",
"description": "Internal use only. The storage bucket credential id for this storage bucket."
},
"authorized_actions": {
"type": "array",
"items": {
+73 -38
View File
@@ -10,6 +10,7 @@
package servers
import (
plugin "github.com/hashicorp/boundary/sdk/pbs/plugin"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -110,6 +111,9 @@ type ServerWorkerStatus struct {
// - not configured: The worker does not have a local storage path configured
// - unknown: The default local storage state of a worker. Used when the local storage state of a worker is not yet known
LocalStorageState string `protobuf:"bytes,80,opt,name=local_storage_state,proto3" json:"local_storage_state,omitempty" class:"public" eventstream:"observation"` // @gotags: `class:"public" eventstream:"observation"
// StorageBucketCredentialStates is a map where the key is a storage bucket id
// and the value contains the current state of the storage bucket.
StorageBucketCredentialStates map[string]*plugin.StorageBucketCredentialState `protobuf:"bytes,90,rep,name=storage_bucket_credential_states,json=storageBucketCredentialStates,proto3" json:"storage_bucket_credential_states,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" class:"public" eventstream:"observation"` // @gotags: `class:"public" eventstream:"observation"`
}
func (x *ServerWorkerStatus) Reset() {
@@ -207,43 +211,70 @@ func (x *ServerWorkerStatus) GetLocalStorageState() string {
return ""
}
func (x *ServerWorkerStatus) GetStorageBucketCredentialStates() map[string]*plugin.StorageBucketCredentialState {
if x != nil {
return x.StorageBucketCredentialStates
}
return nil
}
var File_controller_servers_v1_servers_proto protoreflect.FileDescriptor
var file_controller_servers_v1_servers_proto_rawDesc = []byte{
0x0a, 0x23, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x72,
0x76, 0x65, 0x72, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x31, 0x0a, 0x07,
0x54, 0x61, 0x67, 0x50, 0x61, 0x69, 0x72, 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, 0x22,
0xd6, 0x02, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69,
0x63, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x28, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x50, 0x61, 0x69,
0x72, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69,
0x64, 0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x28,
0x0a, 0x0f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x70, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x46, 0x20,
0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f,
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x50, 0x20,
0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61,
0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x47, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70,
0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x26, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x07, 0x54, 0x61, 0x67, 0x50, 0x61, 0x69, 0x72, 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, 0x22, 0xe9, 0x04, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b,
0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x19,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x1e, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x74,
0x61, 0x67, 0x73, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x76,
0x31, 0x2e, 0x54, 0x61, 0x67, 0x50, 0x61, 0x69, 0x72, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12,
0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73,
0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f,
0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x46, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x70, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30,
0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f,
0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x50, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x6f, 0x63,
0x61, 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65,
0x12, 0x95, 0x01, 0x0a, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x63,
0x6b, 0x65, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73,
0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x5a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75,
0x63, 0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74,
0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61,
0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x79, 0x0a, 0x22, 0x53, 0x74, 0x6f, 0x72,
0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x3d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72,
0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x42, 0x47, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e,
0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65,
0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x72,
0x76, 0x65, 0x72, 0x73, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -258,18 +289,22 @@ func file_controller_servers_v1_servers_proto_rawDescGZIP() []byte {
return file_controller_servers_v1_servers_proto_rawDescData
}
var file_controller_servers_v1_servers_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_controller_servers_v1_servers_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_controller_servers_v1_servers_proto_goTypes = []interface{}{
(*TagPair)(nil), // 0: controller.servers.v1.TagPair
(*ServerWorkerStatus)(nil), // 1: controller.servers.v1.ServerWorkerStatus
nil, // 2: controller.servers.v1.ServerWorkerStatus.StorageBucketCredentialStatesEntry
(*plugin.StorageBucketCredentialState)(nil), // 3: plugin.v1.StorageBucketCredentialState
}
var file_controller_servers_v1_servers_proto_depIdxs = []int32{
0, // 0: controller.servers.v1.ServerWorkerStatus.tags:type_name -> controller.servers.v1.TagPair
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
2, // 1: controller.servers.v1.ServerWorkerStatus.storage_bucket_credential_states:type_name -> controller.servers.v1.ServerWorkerStatus.StorageBucketCredentialStatesEntry
3, // 2: controller.servers.v1.ServerWorkerStatus.StorageBucketCredentialStatesEntry.value:type_name -> plugin.v1.StorageBucketCredentialState
3, // [3:3] is the sub-list for method output_type
3, // [3:3] 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
}
func init() { file_controller_servers_v1_servers_proto_init() }
@@ -309,7 +344,7 @@ func file_controller_servers_v1_servers_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_controller_servers_v1_servers_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
@@ -96,6 +96,9 @@ message StorageBucket {
}
]; // @gotags: `class:"public"`
// Internal use only. The storage bucket credential id for this storage bucket.
string storage_bucket_credential_id = 160; // @gotags: `class:"public"`
// Output only. The available actions on this resource for this user.
repeated string authorized_actions = 300 [json_name = "authorized_actions"]; // @gotags: `class:"public"`
}
@@ -5,6 +5,8 @@ syntax = "proto3";
package controller.servers.v1;
import "plugin/v1/storage_plugin_service.proto";
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/servers;servers";
// TagPair matches a key to a value.
@@ -48,4 +50,8 @@ message ServerWorkerStatus {
// - not configured: The worker does not have a local storage path configured
// - unknown: The default local storage state of a worker. Used when the local storage state of a worker is not yet known
string local_storage_state = 80 [json_name = "local_storage_state"]; // @gotags: `class:"public" eventstream:"observation"
// StorageBucketCredentialStates is a map where the key is a storage bucket id
// and the value contains the current state of the storage bucket.
map<string, plugin.v1.StorageBucketCredentialState> storage_bucket_credential_states = 90; // @gotags: `class:"public" eventstream:"observation"`
}
@@ -97,3 +97,30 @@ message WorkerTag {
// @inject_tag: `gorm:"primary_key"`
string source = 40;
}
// WorkerStorageBucketCredentialState is a state for a storage bucket credential for a worker.
// The primary key is comprised of the worker_id, storage_bucket_credential_id, permission_type.
message WorkerStorageBucketCredentialState {
// worker_id is the public key of the worker.
// @inject_tag: `gorm:"primary_key"`
string worker_id = 10;
// storage_bucket_credential_id is the public key of the storage bucket credential.
// @inject_tag: `gorm:"primary_key"`
string storage_bucket_credential_id = 20;
// permission_type is a enum that defines the permission type.
// @inject_tag: `gorm:"primary_key"`
string permission_type = 30;
// state is a enum that defines the permission state.
// @inject_tag: `gorm:"not_null"`
string state = 40;
// error_details is the error message returned from the external object store service.
string error_details = 50;
// checked_at is the utc timestamp of when the permission was tested.
// @inject_tag: `gorm:"not_null"`
timestamp.v1.Timestamp checked_at = 60;
}
@@ -71,6 +71,10 @@ message StorageBucket {
// secrets_hmac is a sha256-hmac of the unencrypted secrets stored in the db.
// @inject_tag: `gorm:"default:null"`
bytes secrets_hmac = 13;
// storage_bucket_credential_id is the private key of the storage bucket credential.
// @inject_tag: `gorm:"default:null"`
string storage_bucket_credential_id = 14;
}
message StorageBucketSecret {
@@ -92,3 +96,47 @@ message StorageBucketSecret {
// @inject_tag: `gorm:"not_null"`
string key_id = 4;
}
message StorageBucketCredential {
// private_id is a surrogate key suitable for use via API.
// @inject_tag: `gorm:"primary_key"`
string private_id = 1;
// storage_bucket_id is the public id of the storage bucket.
// @inject_tag: `gorm:"not_null"`
string storage_bucket_id = 2;
}
message StorageBucketCredentialEnvironmental {
// private_id is a surrogate key suitable for use in a public API.
// @inject_tag: `gorm:"primary_key"`
string private_id = 1;
// storage_bucket_id is the public id of the storage bucket.
// @inject_tag: `gorm:"not_null"`
string storage_bucket_id = 2;
}
message StorageBucketCredentialManagedSecret {
// private_id is a surrogate key suitable for use via API.
// @inject_tag: `gorm:"primary_key"`
string private_id = 1;
// storage_bucket_id is the public id of the storage bucket.
// @inject_tag: `gorm:"not_null"`
string storage_bucket_id = 2;
// secrets is the plain-text of the secret data. We are not storing this plain-text
// value in the database.
// @inject_tag: `gorm:"-" wrapping:"pt,secrets_data"`
bytes secrets = 3;
// ct_secrets is the ciphertext of the secret data stored in the db.
// @inject_tag: `gorm:"column:secrets_encrypted;not_null" wrapping:"ct,secrets_data"`
bytes ct_secrets = 4;
// The key_id of the kms database key used for encrypting this entry.
// It must be set.
// @inject_tag: `gorm:"not_null"`
string key_id = 5;
}
@@ -167,3 +167,40 @@ message DeleteObjectsResponse {
// informational and not meant to be used for validation.
uint32 objects_deleted = 10;
}
enum StateType {
STATE_TYPE_UNSPECIFIED = 0;
STATE_TYPE_OK = 1;
STATE_TYPE_ERROR = 2;
STATE_TYPE_UNKNOWN = 3;
}
message Permission {
// Required. The state of the permission.
StateType state = 10;
// Optional. The error details returned from the external object store service.
string error_details = 20;
// Required. The utc timestamp of when the permission was tested.
google.protobuf.Timestamp checked_at = 30;
}
message Permissions {
// Optional. The write permission state.
Permission write = 10;
// Optional. The read permission state.
Permission read = 20;
// Optional. The delete permission state.
Permission delete = 30;
}
message StorageBucketCredentialState {
// Required. The permission states.
Permissions state = 10;
// Required. The version of the storage bucket.
uint32 version = 20;
}
+152 -18
View File
@@ -283,6 +283,106 @@ func (x *WorkerTag) GetSource() string {
return ""
}
// WorkerStorageBucketCredentialState is a state for a storage bucket credential for a worker.
// The primary key is comprised of the worker_id, storage_bucket_credential_id, permission_type.
type WorkerStorageBucketCredentialState struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// worker_id is the public key of the worker.
// @inject_tag: `gorm:"primary_key"`
WorkerId string `protobuf:"bytes,10,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty" gorm:"primary_key"`
// storage_bucket_credential_id is the public key of the storage bucket credential.
// @inject_tag: `gorm:"primary_key"`
StorageBucketCredentialId string `protobuf:"bytes,20,opt,name=storage_bucket_credential_id,json=storageBucketCredentialId,proto3" json:"storage_bucket_credential_id,omitempty" gorm:"primary_key"`
// permission_type is a enum that defines the permission type.
// @inject_tag: `gorm:"primary_key"`
PermissionType string `protobuf:"bytes,30,opt,name=permission_type,json=permissionType,proto3" json:"permission_type,omitempty" gorm:"primary_key"`
// state is a enum that defines the permission state.
// @inject_tag: `gorm:"not_null"`
State string `protobuf:"bytes,40,opt,name=state,proto3" json:"state,omitempty" gorm:"not_null"`
// error_details is the error message returned from the external object store service.
ErrorDetails string `protobuf:"bytes,50,opt,name=error_details,json=errorDetails,proto3" json:"error_details,omitempty"`
// checked_at is the utc timestamp of when the permission was tested.
// @inject_tag: `gorm:"not_null"`
CheckedAt *timestamp.Timestamp `protobuf:"bytes,60,opt,name=checked_at,json=checkedAt,proto3" json:"checked_at,omitempty" gorm:"not_null"`
}
func (x *WorkerStorageBucketCredentialState) Reset() {
*x = WorkerStorageBucketCredentialState{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_storage_servers_store_v1_worker_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WorkerStorageBucketCredentialState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WorkerStorageBucketCredentialState) ProtoMessage() {}
func (x *WorkerStorageBucketCredentialState) ProtoReflect() protoreflect.Message {
mi := &file_controller_storage_servers_store_v1_worker_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 WorkerStorageBucketCredentialState.ProtoReflect.Descriptor instead.
func (*WorkerStorageBucketCredentialState) Descriptor() ([]byte, []int) {
return file_controller_storage_servers_store_v1_worker_proto_rawDescGZIP(), []int{2}
}
func (x *WorkerStorageBucketCredentialState) GetWorkerId() string {
if x != nil {
return x.WorkerId
}
return ""
}
func (x *WorkerStorageBucketCredentialState) GetStorageBucketCredentialId() string {
if x != nil {
return x.StorageBucketCredentialId
}
return ""
}
func (x *WorkerStorageBucketCredentialState) GetPermissionType() string {
if x != nil {
return x.PermissionType
}
return ""
}
func (x *WorkerStorageBucketCredentialState) GetState() string {
if x != nil {
return x.State
}
return ""
}
func (x *WorkerStorageBucketCredentialState) GetErrorDetails() string {
if x != nil {
return x.ErrorDetails
}
return ""
}
func (x *WorkerStorageBucketCredentialState) GetCheckedAt() *timestamp.Timestamp {
if x != nil {
return x.CheckedAt
}
return nil
}
var File_controller_storage_servers_store_v1_worker_proto protoreflect.FileDescriptor
var file_controller_storage_servers_store_v1_worker_proto_rawDesc = []byte{
@@ -342,11 +442,31 @@ var file_controller_storage_servers_store_v1_worker_proto_rawDesc = []byte{
0x65, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x28, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x3b, 0x5a, 0x39, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63,
0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x73, 0x74, 0x6f,
0x72, 0x65, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x22,
0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63,
0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x74, 0x61,
0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x12,
0x3f, 0x0a, 0x1c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65,
0x74, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18,
0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75,
0x63, 0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64,
0x12, 0x27, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74,
0x79, 0x70, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x65, 0x72, 0x6d, 0x69,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61,
0x74, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12,
0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,
0x18, 0x32, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74,
0x61, 0x69, 0x6c, 0x73, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f,
0x61, 0x74, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x42,
0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61,
0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79,
0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -361,21 +481,23 @@ func file_controller_storage_servers_store_v1_worker_proto_rawDescGZIP() []byte
return file_controller_storage_servers_store_v1_worker_proto_rawDescData
}
var file_controller_storage_servers_store_v1_worker_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_controller_storage_servers_store_v1_worker_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_controller_storage_servers_store_v1_worker_proto_goTypes = []interface{}{
(*Worker)(nil), // 0: controller.storage.servers.store.v1.Worker
(*WorkerTag)(nil), // 1: controller.storage.servers.store.v1.WorkerTag
(*timestamp.Timestamp)(nil), // 2: controller.storage.timestamp.v1.Timestamp
(*Worker)(nil), // 0: controller.storage.servers.store.v1.Worker
(*WorkerTag)(nil), // 1: controller.storage.servers.store.v1.WorkerTag
(*WorkerStorageBucketCredentialState)(nil), // 2: controller.storage.servers.store.v1.WorkerStorageBucketCredentialState
(*timestamp.Timestamp)(nil), // 3: controller.storage.timestamp.v1.Timestamp
}
var file_controller_storage_servers_store_v1_worker_proto_depIdxs = []int32{
2, // 0: controller.storage.servers.store.v1.Worker.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
2, // 1: controller.storage.servers.store.v1.Worker.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
2, // 2: controller.storage.servers.store.v1.Worker.last_status_time:type_name -> controller.storage.timestamp.v1.Timestamp
3, // [3:3] is the sub-list for method output_type
3, // [3:3] 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
3, // 0: controller.storage.servers.store.v1.Worker.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
3, // 1: controller.storage.servers.store.v1.Worker.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
3, // 2: controller.storage.servers.store.v1.Worker.last_status_time:type_name -> controller.storage.timestamp.v1.Timestamp
3, // 3: controller.storage.servers.store.v1.WorkerStorageBucketCredentialState.checked_at:type_name -> controller.storage.timestamp.v1.Timestamp
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_controller_storage_servers_store_v1_worker_proto_init() }
@@ -408,6 +530,18 @@ func file_controller_storage_servers_store_v1_worker_proto_init() {
return nil
}
}
file_controller_storage_servers_store_v1_worker_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WorkerStorageBucketCredentialState); 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{
@@ -415,7 +549,7 @@ func file_controller_storage_servers_store_v1_worker_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_controller_storage_servers_store_v1_worker_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
+311 -23
View File
@@ -70,6 +70,9 @@ type StorageBucket struct {
// secrets_hmac is a sha256-hmac of the unencrypted secrets stored in the db.
// @inject_tag: `gorm:"default:null"`
SecretsHmac []byte `protobuf:"bytes,13,opt,name=secrets_hmac,json=secretsHmac,proto3" json:"secrets_hmac,omitempty" gorm:"default:null"`
// storage_bucket_credential_id is the private key of the storage bucket credential.
// @inject_tag: `gorm:"default:null"`
StorageBucketCredentialId string `protobuf:"bytes,14,opt,name=storage_bucket_credential_id,json=storageBucketCredentialId,proto3" json:"storage_bucket_credential_id,omitempty" gorm:"default:null"`
}
func (x *StorageBucket) Reset() {
@@ -195,6 +198,13 @@ func (x *StorageBucket) GetSecretsHmac() []byte {
return nil
}
func (x *StorageBucket) GetStorageBucketCredentialId() string {
if x != nil {
return x.StorageBucketCredentialId
}
return ""
}
type StorageBucketSecret struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -276,6 +286,215 @@ func (x *StorageBucketSecret) GetKeyId() string {
return ""
}
type StorageBucketCredential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// private_id is a surrogate key suitable for use via API.
// @inject_tag: `gorm:"primary_key"`
PrivateId string `protobuf:"bytes,1,opt,name=private_id,json=privateId,proto3" json:"private_id,omitempty" gorm:"primary_key"`
// storage_bucket_id is the public id of the storage bucket.
// @inject_tag: `gorm:"not_null"`
StorageBucketId string `protobuf:"bytes,2,opt,name=storage_bucket_id,json=storageBucketId,proto3" json:"storage_bucket_id,omitempty" gorm:"not_null"`
}
func (x *StorageBucketCredential) Reset() {
*x = StorageBucketCredential{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_storage_storage_plugin_store_v1_storage_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StorageBucketCredential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StorageBucketCredential) ProtoMessage() {}
func (x *StorageBucketCredential) ProtoReflect() protoreflect.Message {
mi := &file_controller_storage_storage_plugin_store_v1_storage_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 StorageBucketCredential.ProtoReflect.Descriptor instead.
func (*StorageBucketCredential) Descriptor() ([]byte, []int) {
return file_controller_storage_storage_plugin_store_v1_storage_proto_rawDescGZIP(), []int{2}
}
func (x *StorageBucketCredential) GetPrivateId() string {
if x != nil {
return x.PrivateId
}
return ""
}
func (x *StorageBucketCredential) GetStorageBucketId() string {
if x != nil {
return x.StorageBucketId
}
return ""
}
type StorageBucketCredentialEnvironmental struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// private_id is a surrogate key suitable for use in a public API.
// @inject_tag: `gorm:"primary_key"`
PrivateId string `protobuf:"bytes,1,opt,name=private_id,json=privateId,proto3" json:"private_id,omitempty" gorm:"primary_key"`
// storage_bucket_id is the public id of the storage bucket.
// @inject_tag: `gorm:"not_null"`
StorageBucketId string `protobuf:"bytes,2,opt,name=storage_bucket_id,json=storageBucketId,proto3" json:"storage_bucket_id,omitempty" gorm:"not_null"`
}
func (x *StorageBucketCredentialEnvironmental) Reset() {
*x = StorageBucketCredentialEnvironmental{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_storage_storage_plugin_store_v1_storage_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StorageBucketCredentialEnvironmental) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StorageBucketCredentialEnvironmental) ProtoMessage() {}
func (x *StorageBucketCredentialEnvironmental) ProtoReflect() protoreflect.Message {
mi := &file_controller_storage_storage_plugin_store_v1_storage_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 StorageBucketCredentialEnvironmental.ProtoReflect.Descriptor instead.
func (*StorageBucketCredentialEnvironmental) Descriptor() ([]byte, []int) {
return file_controller_storage_storage_plugin_store_v1_storage_proto_rawDescGZIP(), []int{3}
}
func (x *StorageBucketCredentialEnvironmental) GetPrivateId() string {
if x != nil {
return x.PrivateId
}
return ""
}
func (x *StorageBucketCredentialEnvironmental) GetStorageBucketId() string {
if x != nil {
return x.StorageBucketId
}
return ""
}
type StorageBucketCredentialManagedSecret struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// private_id is a surrogate key suitable for use via API.
// @inject_tag: `gorm:"primary_key"`
PrivateId string `protobuf:"bytes,1,opt,name=private_id,json=privateId,proto3" json:"private_id,omitempty" gorm:"primary_key"`
// storage_bucket_id is the public id of the storage bucket.
// @inject_tag: `gorm:"not_null"`
StorageBucketId string `protobuf:"bytes,2,opt,name=storage_bucket_id,json=storageBucketId,proto3" json:"storage_bucket_id,omitempty" gorm:"not_null"`
// secrets is the plain-text of the secret data. We are not storing this plain-text
// value in the database.
// @inject_tag: `gorm:"-" wrapping:"pt,secrets_data"`
Secrets []byte `protobuf:"bytes,3,opt,name=secrets,proto3" json:"secrets,omitempty" gorm:"-" wrapping:"pt,secrets_data"`
// ct_secrets is the ciphertext of the secret data stored in the db.
// @inject_tag: `gorm:"column:secrets_encrypted;not_null" wrapping:"ct,secrets_data"`
CtSecrets []byte `protobuf:"bytes,4,opt,name=ct_secrets,json=ctSecrets,proto3" json:"ct_secrets,omitempty" gorm:"column:secrets_encrypted;not_null" wrapping:"ct,secrets_data"`
// The key_id of the kms database key used for encrypting this entry.
// It must be set.
// @inject_tag: `gorm:"not_null"`
KeyId string `protobuf:"bytes,5,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty" gorm:"not_null"`
}
func (x *StorageBucketCredentialManagedSecret) Reset() {
*x = StorageBucketCredentialManagedSecret{}
if protoimpl.UnsafeEnabled {
mi := &file_controller_storage_storage_plugin_store_v1_storage_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StorageBucketCredentialManagedSecret) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StorageBucketCredentialManagedSecret) ProtoMessage() {}
func (x *StorageBucketCredentialManagedSecret) ProtoReflect() protoreflect.Message {
mi := &file_controller_storage_storage_plugin_store_v1_storage_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 StorageBucketCredentialManagedSecret.ProtoReflect.Descriptor instead.
func (*StorageBucketCredentialManagedSecret) Descriptor() ([]byte, []int) {
return file_controller_storage_storage_plugin_store_v1_storage_proto_rawDescGZIP(), []int{4}
}
func (x *StorageBucketCredentialManagedSecret) GetPrivateId() string {
if x != nil {
return x.PrivateId
}
return ""
}
func (x *StorageBucketCredentialManagedSecret) GetStorageBucketId() string {
if x != nil {
return x.StorageBucketId
}
return ""
}
func (x *StorageBucketCredentialManagedSecret) GetSecrets() []byte {
if x != nil {
return x.Secrets
}
return nil
}
func (x *StorageBucketCredentialManagedSecret) GetCtSecrets() []byte {
if x != nil {
return x.CtSecrets
}
return nil
}
func (x *StorageBucketCredentialManagedSecret) GetKeyId() string {
if x != nil {
return x.KeyId
}
return ""
}
var File_controller_storage_storage_plugin_store_v1_storage_proto protoreflect.FileDescriptor
var file_controller_storage_storage_plugin_store_v1_storage_proto_rawDesc = []byte{
@@ -291,7 +510,7 @@ var file_controller_storage_storage_plugin_store_v1_storage_proto_rawDesc = []by
0x74, 0x6f, 0x1a, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x73,
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x2f, 0x76, 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x04, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42,
0x6f, 0x74, 0x6f, 0x22, 0x92, 0x05, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42,
0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02,
@@ -328,21 +547,51 @@ var file_controller_storage_storage_plugin_store_v1_storage_proto_rawDesc = []by
0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
0x75, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x5f,
0x68, 0x6d, 0x61, 0x63, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x72,
0x65, 0x74, 0x73, 0x48, 0x6d, 0x61, 0x63, 0x22, 0x91, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x72,
0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12,
0x2a, 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65,
0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x6f, 0x72,
0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73,
0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x65,
0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72,
0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x74, 0x53, 0x65, 0x63,
0x72, 0x65, 0x74, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x42, 0x43, 0x5a, 0x41, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63,
0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x74, 0x73, 0x48, 0x6d, 0x61, 0x63, 0x12, 0x3f, 0x0a, 0x1c, 0x73, 0x74, 0x6f, 0x72, 0x61,
0x67, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x73,
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64,
0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x91, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74,
0x12, 0x2a, 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b,
0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73,
0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x63,
0x72, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x74, 0x53, 0x65,
0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x17,
0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x72, 0x65,
0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61,
0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69,
0x76, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74,
0x49, 0x64, 0x22, 0x71, 0x0a, 0x24, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63,
0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x76,
0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72,
0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x63,
0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0xc1, 0x01, 0x0a, 0x24, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67,
0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1d,
0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a,
0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67,
0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63,
0x72, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72,
0x65, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,
0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65,
0x74, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72,
0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -357,15 +606,18 @@ func file_controller_storage_storage_plugin_store_v1_storage_proto_rawDescGZIP()
return file_controller_storage_storage_plugin_store_v1_storage_proto_rawDescData
}
var file_controller_storage_storage_plugin_store_v1_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_controller_storage_storage_plugin_store_v1_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_controller_storage_storage_plugin_store_v1_storage_proto_goTypes = []interface{}{
(*StorageBucket)(nil), // 0: controller.storage.storage.plugin.store.v1.StorageBucket
(*StorageBucketSecret)(nil), // 1: controller.storage.storage.plugin.store.v1.StorageBucketSecret
(*timestamp.Timestamp)(nil), // 2: controller.storage.timestamp.v1.Timestamp
(*StorageBucket)(nil), // 0: controller.storage.storage.plugin.store.v1.StorageBucket
(*StorageBucketSecret)(nil), // 1: controller.storage.storage.plugin.store.v1.StorageBucketSecret
(*StorageBucketCredential)(nil), // 2: controller.storage.storage.plugin.store.v1.StorageBucketCredential
(*StorageBucketCredentialEnvironmental)(nil), // 3: controller.storage.storage.plugin.store.v1.StorageBucketCredentialEnvironmental
(*StorageBucketCredentialManagedSecret)(nil), // 4: controller.storage.storage.plugin.store.v1.StorageBucketCredentialManagedSecret
(*timestamp.Timestamp)(nil), // 5: controller.storage.timestamp.v1.Timestamp
}
var file_controller_storage_storage_plugin_store_v1_storage_proto_depIdxs = []int32{
2, // 0: controller.storage.storage.plugin.store.v1.StorageBucket.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
2, // 1: controller.storage.storage.plugin.store.v1.StorageBucket.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
5, // 0: controller.storage.storage.plugin.store.v1.StorageBucket.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
5, // 1: controller.storage.storage.plugin.store.v1.StorageBucket.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
@@ -403,6 +655,42 @@ func file_controller_storage_storage_plugin_store_v1_storage_proto_init() {
return nil
}
}
file_controller_storage_storage_plugin_store_v1_storage_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StorageBucketCredential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_controller_storage_storage_plugin_store_v1_storage_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StorageBucketCredentialEnvironmental); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_controller_storage_storage_plugin_store_v1_storage_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StorageBucketCredentialManagedSecret); 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{
@@ -410,7 +698,7 @@ func file_controller_storage_storage_plugin_store_v1_storage_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_controller_storage_storage_plugin_store_v1_storage_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},