mirror of https://github.com/milvus-io/milvus.git
Add the rbac for the GetLoadingProgress and GetLoadState api (#22320)
Signed-off-by: SimFG <bang.fu@zilliz.com>pull/22352/head
parent
cc5d72a9f2
commit
7e19a924b7
2
go.mod
2
go.mod
|
@ -27,7 +27,7 @@ require (
|
|||
github.com/klauspost/compress v1.14.4
|
||||
github.com/lingdor/stackerror v0.0.0-20191119040541-976d8885ed76
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
|
||||
github.com/milvus-io/milvus-proto/go-api v0.0.0-20230209081028-aabbca7f95ae
|
||||
github.com/milvus-io/milvus-proto/go-api v0.0.0-20230220081023-3cf200738ae7
|
||||
github.com/minio/minio-go/v7 v7.0.17
|
||||
github.com/panjf2000/ants/v2 v2.4.8
|
||||
github.com/pkg/errors v0.9.1
|
||||
|
|
2
go.sum
2
go.sum
|
@ -493,6 +493,8 @@ github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b h1:TfeY0NxYxZz
|
|||
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b/go.mod h1:iwW+9cWfIzzDseEBCCeDSN5SD16Tidvy8cwQ7ZY8Qj4=
|
||||
github.com/milvus-io/milvus-proto/go-api v0.0.0-20230209081028-aabbca7f95ae h1:4PPf72uc+pUFIT22yUHKrMMVyiJu8Q5l8FrQ4IkvAAY=
|
||||
github.com/milvus-io/milvus-proto/go-api v0.0.0-20230209081028-aabbca7f95ae/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
|
||||
github.com/milvus-io/milvus-proto/go-api v0.0.0-20230220081023-3cf200738ae7 h1:G3qXTVWaHXQkgnPOxuCb/NIxb2oD4xHHViyuTGs5KQU=
|
||||
github.com/milvus-io/milvus-proto/go-api v0.0.0-20230220081023-3cf200738ae7/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk=
|
||||
github.com/milvus-io/pulsar-client-go v0.6.10 h1:eqpJjU+/QX0iIhEo3nhOqMNXL+TyInAs1IAHZCrCM/A=
|
||||
github.com/milvus-io/pulsar-client-go v0.6.10/go.mod h1:lQqCkgwDF8YFYjKA+zOheTk1tev2B+bKj5j7+nm8M1w=
|
||||
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs=
|
||||
|
|
|
@ -332,7 +332,7 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(
|
|||
".ObjectType\022>\n\020object_privilege\030\002 \001(\0162$."
|
||||
"milvus.proto.common.ObjectPrivilege\022\031\n\021o"
|
||||
"bject_name_index\030\003 \001(\005\022\032\n\022object_name_in"
|
||||
"dexs\030\004 \001(\005*\223\n\n\tErrorCode\022\013\n\007Success\020\000\022\023\n"
|
||||
"dexs\030\004 \001(\005*\303\n\n\tErrorCode\022\013\n\007Success\020\000\022\023\n"
|
||||
"\017UnexpectedError\020\001\022\021\n\rConnectFailed\020\002\022\024\n"
|
||||
"\020PermissionDenied\020\003\022\027\n\023CollectionNotExis"
|
||||
"ts\020\004\022\023\n\017IllegalArgument\020\005\022\024\n\020IllegalDime"
|
||||
|
@ -363,111 +363,113 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(
|
|||
"ateLimit\0201\022\022\n\016NodeIDNotMatch\0202\022\024\n\020Upsert"
|
||||
"AutoIDTrue\0203\022\034\n\030InsufficientMemoryToLoad"
|
||||
"\0204\022\030\n\024MemoryQuotaExhausted\0205\022\026\n\022DiskQuot"
|
||||
"aExhausted\0206\022\025\n\021TimeTickLongDelay\0207\022\017\n\013D"
|
||||
"ataCoordNA\020d\022\022\n\rDDRequestRace\020\350\007*c\n\nInde"
|
||||
"xState\022\022\n\016IndexStateNone\020\000\022\014\n\010Unissued\020\001"
|
||||
"\022\016\n\nInProgress\020\002\022\014\n\010Finished\020\003\022\n\n\006Failed"
|
||||
"\020\004\022\t\n\005Retry\020\005*\202\001\n\014SegmentState\022\024\n\020Segmen"
|
||||
"tStateNone\020\000\022\014\n\010NotExist\020\001\022\013\n\007Growing\020\002\022"
|
||||
"\n\n\006Sealed\020\003\022\013\n\007Flushed\020\004\022\014\n\010Flushing\020\005\022\013"
|
||||
"\n\007Dropped\020\006\022\r\n\tImporting\020\007*>\n\017Placeholde"
|
||||
"rType\022\010\n\004None\020\000\022\020\n\014BinaryVector\020d\022\017\n\013Flo"
|
||||
"atVector\020e*\300\016\n\007MsgType\022\r\n\tUndefined\020\000\022\024\n"
|
||||
"\020CreateCollection\020d\022\022\n\016DropCollection\020e\022"
|
||||
"\021\n\rHasCollection\020f\022\026\n\022DescribeCollection"
|
||||
"\020g\022\023\n\017ShowCollections\020h\022\024\n\020GetSystemConf"
|
||||
"igs\020i\022\022\n\016LoadCollection\020j\022\025\n\021ReleaseColl"
|
||||
"ection\020k\022\017\n\013CreateAlias\020l\022\r\n\tDropAlias\020m"
|
||||
"\022\016\n\nAlterAlias\020n\022\023\n\017AlterCollection\020o\022\024\n"
|
||||
"\020RenameCollection\020p\022\024\n\017CreatePartition\020\310"
|
||||
"\001\022\022\n\rDropPartition\020\311\001\022\021\n\014HasPartition\020\312\001"
|
||||
"\022\026\n\021DescribePartition\020\313\001\022\023\n\016ShowPartitio"
|
||||
"ns\020\314\001\022\023\n\016LoadPartitions\020\315\001\022\026\n\021ReleasePar"
|
||||
"titions\020\316\001\022\021\n\014ShowSegments\020\372\001\022\024\n\017Describ"
|
||||
"eSegment\020\373\001\022\021\n\014LoadSegments\020\374\001\022\024\n\017Releas"
|
||||
"eSegments\020\375\001\022\024\n\017HandoffSegments\020\376\001\022\030\n\023Lo"
|
||||
"adBalanceSegments\020\377\001\022\025\n\020DescribeSegments"
|
||||
"\020\200\002\022\020\n\013CreateIndex\020\254\002\022\022\n\rDescribeIndex\020\255"
|
||||
"\002\022\016\n\tDropIndex\020\256\002\022\013\n\006Insert\020\220\003\022\013\n\006Delete"
|
||||
"\020\221\003\022\n\n\005Flush\020\222\003\022\027\n\022ResendSegmentStats\020\223\003"
|
||||
"\022\013\n\006Upsert\020\224\003\022\013\n\006Search\020\364\003\022\021\n\014SearchResu"
|
||||
"lt\020\365\003\022\022\n\rGetIndexState\020\366\003\022\032\n\025GetIndexBui"
|
||||
"ldProgress\020\367\003\022\034\n\027GetCollectionStatistics"
|
||||
"\020\370\003\022\033\n\026GetPartitionStatistics\020\371\003\022\r\n\010Retr"
|
||||
"ieve\020\372\003\022\023\n\016RetrieveResult\020\373\003\022\024\n\017WatchDmC"
|
||||
"hannels\020\374\003\022\025\n\020RemoveDmChannels\020\375\003\022\027\n\022Wat"
|
||||
"chQueryChannels\020\376\003\022\030\n\023RemoveQueryChannel"
|
||||
"s\020\377\003\022\035\n\030SealedSegmentsChangeInfo\020\200\004\022\027\n\022W"
|
||||
"atchDeltaChannels\020\201\004\022\024\n\017GetShardLeaders\020"
|
||||
"\202\004\022\020\n\013GetReplicas\020\203\004\022\023\n\016UnsubDmChannel\020\204"
|
||||
"\004\022\024\n\017GetDistribution\020\205\004\022\025\n\020SyncDistribut"
|
||||
"ion\020\206\004\022\020\n\013SegmentInfo\020\330\004\022\017\n\nSystemInfo\020\331"
|
||||
"\004\022\024\n\017GetRecoveryInfo\020\332\004\022\024\n\017GetSegmentSta"
|
||||
"te\020\333\004\022\r\n\010TimeTick\020\260\t\022\023\n\016QueryNodeStats\020\261"
|
||||
"\t\022\016\n\tLoadIndex\020\262\t\022\016\n\tRequestID\020\263\t\022\017\n\nReq"
|
||||
"uestTSO\020\264\t\022\024\n\017AllocateSegment\020\265\t\022\026\n\021Segm"
|
||||
"entStatistics\020\266\t\022\025\n\020SegmentFlushDone\020\267\t\022"
|
||||
"\017\n\nDataNodeTt\020\270\t\022\025\n\020CreateCredential\020\334\013\022"
|
||||
"\022\n\rGetCredential\020\335\013\022\025\n\020DeleteCredential\020"
|
||||
"\336\013\022\025\n\020UpdateCredential\020\337\013\022\026\n\021ListCredUse"
|
||||
"rnames\020\340\013\022\017\n\nCreateRole\020\300\014\022\r\n\010DropRole\020\301"
|
||||
"\014\022\024\n\017OperateUserRole\020\302\014\022\017\n\nSelectRole\020\303\014"
|
||||
"\022\017\n\nSelectUser\020\304\014\022\023\n\016SelectResource\020\305\014\022\025"
|
||||
"\n\020OperatePrivilege\020\306\014\022\020\n\013SelectGrant\020\307\014\022"
|
||||
"\033\n\026RefreshPolicyInfoCache\020\310\014\022\017\n\nListPoli"
|
||||
"cy\020\311\014\022\030\n\023CreateResourceGroup\020\244\r\022\026\n\021DropR"
|
||||
"esourceGroup\020\245\r\022\027\n\022ListResourceGroups\020\246\r"
|
||||
"\022\032\n\025DescribeResourceGroup\020\247\r\022\021\n\014Transfer"
|
||||
"Node\020\250\r\022\024\n\017TransferReplica\020\251\r*\"\n\007DslType"
|
||||
"\022\007\n\003Dsl\020\000\022\016\n\nBoolExprV1\020\001*B\n\017CompactionS"
|
||||
"tate\022\021\n\rUndefiedState\020\000\022\r\n\tExecuting\020\001\022\r"
|
||||
"\n\tCompleted\020\002*X\n\020ConsistencyLevel\022\n\n\006Str"
|
||||
"ong\020\000\022\013\n\007Session\020\001\022\013\n\007Bounded\020\002\022\016\n\nEvent"
|
||||
"ually\020\003\022\016\n\nCustomized\020\004*\236\001\n\013ImportState\022"
|
||||
"\021\n\rImportPending\020\000\022\020\n\014ImportFailed\020\001\022\021\n\r"
|
||||
"ImportStarted\020\002\022\023\n\017ImportPersisted\020\005\022\021\n\r"
|
||||
"ImportFlushed\020\010\022\023\n\017ImportCompleted\020\006\022\032\n\026"
|
||||
"ImportFailedAndCleaned\020\007*2\n\nObjectType\022\016"
|
||||
"\n\nCollection\020\000\022\n\n\006Global\020\001\022\010\n\004User\020\002*\333\006\n"
|
||||
"\017ObjectPrivilege\022\020\n\014PrivilegeAll\020\000\022\035\n\031Pr"
|
||||
"ivilegeCreateCollection\020\001\022\033\n\027PrivilegeDr"
|
||||
"opCollection\020\002\022\037\n\033PrivilegeDescribeColle"
|
||||
"ction\020\003\022\034\n\030PrivilegeShowCollections\020\004\022\021\n"
|
||||
"\rPrivilegeLoad\020\005\022\024\n\020PrivilegeRelease\020\006\022\027"
|
||||
"\n\023PrivilegeCompaction\020\007\022\023\n\017PrivilegeInse"
|
||||
"rt\020\010\022\023\n\017PrivilegeDelete\020\t\022\032\n\026PrivilegeGe"
|
||||
"tStatistics\020\n\022\030\n\024PrivilegeCreateIndex\020\013\022"
|
||||
"\030\n\024PrivilegeIndexDetail\020\014\022\026\n\022PrivilegeDr"
|
||||
"opIndex\020\r\022\023\n\017PrivilegeSearch\020\016\022\022\n\016Privil"
|
||||
"egeFlush\020\017\022\022\n\016PrivilegeQuery\020\020\022\030\n\024Privil"
|
||||
"egeLoadBalance\020\021\022\023\n\017PrivilegeImport\020\022\022\034\n"
|
||||
"\030PrivilegeCreateOwnership\020\023\022\027\n\023Privilege"
|
||||
"UpdateUser\020\024\022\032\n\026PrivilegeDropOwnership\020\025"
|
||||
"\022\034\n\030PrivilegeSelectOwnership\020\026\022\034\n\030Privil"
|
||||
"egeManageOwnership\020\027\022\027\n\023PrivilegeSelectU"
|
||||
"ser\020\030\022\023\n\017PrivilegeUpsert\020\031\022 \n\034PrivilegeC"
|
||||
"reateResourceGroup\020\032\022\036\n\032PrivilegeDropRes"
|
||||
"ourceGroup\020\033\022\"\n\036PrivilegeDescribeResourc"
|
||||
"eGroup\020\034\022\037\n\033PrivilegeListResourceGroups\020"
|
||||
"\035\022\031\n\025PrivilegeTransferNode\020\036\022\034\n\030Privileg"
|
||||
"eTransferReplica\020\037*S\n\tStateCode\022\020\n\014Initi"
|
||||
"alizing\020\000\022\013\n\007Healthy\020\001\022\014\n\010Abnormal\020\002\022\013\n\007"
|
||||
"StandBy\020\003\022\014\n\010Stopping\020\004*c\n\tLoadState\022\025\n\021"
|
||||
"LoadStateNotExist\020\000\022\024\n\020LoadStateNotLoad\020"
|
||||
"\001\022\024\n\020LoadStateLoading\020\002\022\023\n\017LoadStateLoad"
|
||||
"ed\020\003:^\n\021privilege_ext_obj\022\037.google.proto"
|
||||
"buf.MessageOptions\030\351\007 \001(\0132!.milvus.proto"
|
||||
".common.PrivilegeExtBf\n\016io.milvus.grpcB\013"
|
||||
"CommonProtoP\001Z1github.com/milvus-io/milv"
|
||||
"us-proto/go-api/commonpb\240\001\001\252\002\016IO.Milvus."
|
||||
"Grpcb\006proto3"
|
||||
"aExhausted\0206\022\025\n\021TimeTickLongDelay\0207\022\021\n\rN"
|
||||
"otReadyServe\0208\022\033\n\027NotReadyCoordActivatin"
|
||||
"g\0209\022\017\n\013DataCoordNA\020d\022\022\n\rDDRequestRace\020\350\007"
|
||||
"*c\n\nIndexState\022\022\n\016IndexStateNone\020\000\022\014\n\010Un"
|
||||
"issued\020\001\022\016\n\nInProgress\020\002\022\014\n\010Finished\020\003\022\n"
|
||||
"\n\006Failed\020\004\022\t\n\005Retry\020\005*\202\001\n\014SegmentState\022\024"
|
||||
"\n\020SegmentStateNone\020\000\022\014\n\010NotExist\020\001\022\013\n\007Gr"
|
||||
"owing\020\002\022\n\n\006Sealed\020\003\022\013\n\007Flushed\020\004\022\014\n\010Flus"
|
||||
"hing\020\005\022\013\n\007Dropped\020\006\022\r\n\tImporting\020\007*>\n\017Pl"
|
||||
"aceholderType\022\010\n\004None\020\000\022\020\n\014BinaryVector\020"
|
||||
"d\022\017\n\013FloatVector\020e*\300\016\n\007MsgType\022\r\n\tUndefi"
|
||||
"ned\020\000\022\024\n\020CreateCollection\020d\022\022\n\016DropColle"
|
||||
"ction\020e\022\021\n\rHasCollection\020f\022\026\n\022DescribeCo"
|
||||
"llection\020g\022\023\n\017ShowCollections\020h\022\024\n\020GetSy"
|
||||
"stemConfigs\020i\022\022\n\016LoadCollection\020j\022\025\n\021Rel"
|
||||
"easeCollection\020k\022\017\n\013CreateAlias\020l\022\r\n\tDro"
|
||||
"pAlias\020m\022\016\n\nAlterAlias\020n\022\023\n\017AlterCollect"
|
||||
"ion\020o\022\024\n\020RenameCollection\020p\022\024\n\017CreatePar"
|
||||
"tition\020\310\001\022\022\n\rDropPartition\020\311\001\022\021\n\014HasPart"
|
||||
"ition\020\312\001\022\026\n\021DescribePartition\020\313\001\022\023\n\016Show"
|
||||
"Partitions\020\314\001\022\023\n\016LoadPartitions\020\315\001\022\026\n\021Re"
|
||||
"leasePartitions\020\316\001\022\021\n\014ShowSegments\020\372\001\022\024\n"
|
||||
"\017DescribeSegment\020\373\001\022\021\n\014LoadSegments\020\374\001\022\024"
|
||||
"\n\017ReleaseSegments\020\375\001\022\024\n\017HandoffSegments\020"
|
||||
"\376\001\022\030\n\023LoadBalanceSegments\020\377\001\022\025\n\020Describe"
|
||||
"Segments\020\200\002\022\020\n\013CreateIndex\020\254\002\022\022\n\rDescrib"
|
||||
"eIndex\020\255\002\022\016\n\tDropIndex\020\256\002\022\013\n\006Insert\020\220\003\022\013"
|
||||
"\n\006Delete\020\221\003\022\n\n\005Flush\020\222\003\022\027\n\022ResendSegment"
|
||||
"Stats\020\223\003\022\013\n\006Upsert\020\224\003\022\013\n\006Search\020\364\003\022\021\n\014Se"
|
||||
"archResult\020\365\003\022\022\n\rGetIndexState\020\366\003\022\032\n\025Get"
|
||||
"IndexBuildProgress\020\367\003\022\034\n\027GetCollectionSt"
|
||||
"atistics\020\370\003\022\033\n\026GetPartitionStatistics\020\371\003"
|
||||
"\022\r\n\010Retrieve\020\372\003\022\023\n\016RetrieveResult\020\373\003\022\024\n\017"
|
||||
"WatchDmChannels\020\374\003\022\025\n\020RemoveDmChannels\020\375"
|
||||
"\003\022\027\n\022WatchQueryChannels\020\376\003\022\030\n\023RemoveQuer"
|
||||
"yChannels\020\377\003\022\035\n\030SealedSegmentsChangeInfo"
|
||||
"\020\200\004\022\027\n\022WatchDeltaChannels\020\201\004\022\024\n\017GetShard"
|
||||
"Leaders\020\202\004\022\020\n\013GetReplicas\020\203\004\022\023\n\016UnsubDmC"
|
||||
"hannel\020\204\004\022\024\n\017GetDistribution\020\205\004\022\025\n\020SyncD"
|
||||
"istribution\020\206\004\022\020\n\013SegmentInfo\020\330\004\022\017\n\nSyst"
|
||||
"emInfo\020\331\004\022\024\n\017GetRecoveryInfo\020\332\004\022\024\n\017GetSe"
|
||||
"gmentState\020\333\004\022\r\n\010TimeTick\020\260\t\022\023\n\016QueryNod"
|
||||
"eStats\020\261\t\022\016\n\tLoadIndex\020\262\t\022\016\n\tRequestID\020\263"
|
||||
"\t\022\017\n\nRequestTSO\020\264\t\022\024\n\017AllocateSegment\020\265\t"
|
||||
"\022\026\n\021SegmentStatistics\020\266\t\022\025\n\020SegmentFlush"
|
||||
"Done\020\267\t\022\017\n\nDataNodeTt\020\270\t\022\025\n\020CreateCreden"
|
||||
"tial\020\334\013\022\022\n\rGetCredential\020\335\013\022\025\n\020DeleteCre"
|
||||
"dential\020\336\013\022\025\n\020UpdateCredential\020\337\013\022\026\n\021Lis"
|
||||
"tCredUsernames\020\340\013\022\017\n\nCreateRole\020\300\014\022\r\n\010Dr"
|
||||
"opRole\020\301\014\022\024\n\017OperateUserRole\020\302\014\022\017\n\nSelec"
|
||||
"tRole\020\303\014\022\017\n\nSelectUser\020\304\014\022\023\n\016SelectResou"
|
||||
"rce\020\305\014\022\025\n\020OperatePrivilege\020\306\014\022\020\n\013SelectG"
|
||||
"rant\020\307\014\022\033\n\026RefreshPolicyInfoCache\020\310\014\022\017\n\n"
|
||||
"ListPolicy\020\311\014\022\030\n\023CreateResourceGroup\020\244\r\022"
|
||||
"\026\n\021DropResourceGroup\020\245\r\022\027\n\022ListResourceG"
|
||||
"roups\020\246\r\022\032\n\025DescribeResourceGroup\020\247\r\022\021\n\014"
|
||||
"TransferNode\020\250\r\022\024\n\017TransferReplica\020\251\r*\"\n"
|
||||
"\007DslType\022\007\n\003Dsl\020\000\022\016\n\nBoolExprV1\020\001*B\n\017Com"
|
||||
"pactionState\022\021\n\rUndefiedState\020\000\022\r\n\tExecu"
|
||||
"ting\020\001\022\r\n\tCompleted\020\002*X\n\020ConsistencyLeve"
|
||||
"l\022\n\n\006Strong\020\000\022\013\n\007Session\020\001\022\013\n\007Bounded\020\002\022"
|
||||
"\016\n\nEventually\020\003\022\016\n\nCustomized\020\004*\236\001\n\013Impo"
|
||||
"rtState\022\021\n\rImportPending\020\000\022\020\n\014ImportFail"
|
||||
"ed\020\001\022\021\n\rImportStarted\020\002\022\023\n\017ImportPersist"
|
||||
"ed\020\005\022\021\n\rImportFlushed\020\010\022\023\n\017ImportComplet"
|
||||
"ed\020\006\022\032\n\026ImportFailedAndCleaned\020\007*2\n\nObje"
|
||||
"ctType\022\016\n\nCollection\020\000\022\n\n\006Global\020\001\022\010\n\004Us"
|
||||
"er\020\002*\227\007\n\017ObjectPrivilege\022\020\n\014PrivilegeAll"
|
||||
"\020\000\022\035\n\031PrivilegeCreateCollection\020\001\022\033\n\027Pri"
|
||||
"vilegeDropCollection\020\002\022\037\n\033PrivilegeDescr"
|
||||
"ibeCollection\020\003\022\034\n\030PrivilegeShowCollecti"
|
||||
"ons\020\004\022\021\n\rPrivilegeLoad\020\005\022\024\n\020PrivilegeRel"
|
||||
"ease\020\006\022\027\n\023PrivilegeCompaction\020\007\022\023\n\017Privi"
|
||||
"legeInsert\020\010\022\023\n\017PrivilegeDelete\020\t\022\032\n\026Pri"
|
||||
"vilegeGetStatistics\020\n\022\030\n\024PrivilegeCreate"
|
||||
"Index\020\013\022\030\n\024PrivilegeIndexDetail\020\014\022\026\n\022Pri"
|
||||
"vilegeDropIndex\020\r\022\023\n\017PrivilegeSearch\020\016\022\022"
|
||||
"\n\016PrivilegeFlush\020\017\022\022\n\016PrivilegeQuery\020\020\022\030"
|
||||
"\n\024PrivilegeLoadBalance\020\021\022\023\n\017PrivilegeImp"
|
||||
"ort\020\022\022\034\n\030PrivilegeCreateOwnership\020\023\022\027\n\023P"
|
||||
"rivilegeUpdateUser\020\024\022\032\n\026PrivilegeDropOwn"
|
||||
"ership\020\025\022\034\n\030PrivilegeSelectOwnership\020\026\022\034"
|
||||
"\n\030PrivilegeManageOwnership\020\027\022\027\n\023Privileg"
|
||||
"eSelectUser\020\030\022\023\n\017PrivilegeUpsert\020\031\022 \n\034Pr"
|
||||
"ivilegeCreateResourceGroup\020\032\022\036\n\032Privileg"
|
||||
"eDropResourceGroup\020\033\022\"\n\036PrivilegeDescrib"
|
||||
"eResourceGroup\020\034\022\037\n\033PrivilegeListResourc"
|
||||
"eGroups\020\035\022\031\n\025PrivilegeTransferNode\020\036\022\034\n\030"
|
||||
"PrivilegeTransferReplica\020\037\022\037\n\033PrivilegeG"
|
||||
"etLoadingProgress\020 \022\031\n\025PrivilegeGetLoadS"
|
||||
"tate\020!*S\n\tStateCode\022\020\n\014Initializing\020\000\022\013\n"
|
||||
"\007Healthy\020\001\022\014\n\010Abnormal\020\002\022\013\n\007StandBy\020\003\022\014\n"
|
||||
"\010Stopping\020\004*c\n\tLoadState\022\025\n\021LoadStateNot"
|
||||
"Exist\020\000\022\024\n\020LoadStateNotLoad\020\001\022\024\n\020LoadSta"
|
||||
"teLoading\020\002\022\023\n\017LoadStateLoaded\020\003:^\n\021priv"
|
||||
"ilege_ext_obj\022\037.google.protobuf.MessageO"
|
||||
"ptions\030\351\007 \001(\0132!.milvus.proto.common.Priv"
|
||||
"ilegeExtBf\n\016io.milvus.grpcB\013CommonProtoP"
|
||||
"\001Z1github.com/milvus-io/milvus-proto/go-"
|
||||
"api/commonpb\240\001\001\252\002\016IO.Milvus.Grpcb\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_common_2eproto_deps[1] = {
|
||||
&::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto,
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_common_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_common_2eproto = {
|
||||
false, false, 6052, descriptor_table_protodef_common_2eproto,
|
||||
false, false, 6160, descriptor_table_protodef_common_2eproto,
|
||||
"common.proto",
|
||||
&descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_deps, 1, 11,
|
||||
schemas, file_default_instances, TableStruct_common_2eproto::offsets,
|
||||
|
@ -544,6 +546,8 @@ bool ErrorCode_IsValid(int value) {
|
|||
case 53:
|
||||
case 54:
|
||||
case 55:
|
||||
case 56:
|
||||
case 57:
|
||||
case 100:
|
||||
case 1000:
|
||||
return true;
|
||||
|
@ -824,6 +828,8 @@ bool ObjectPrivilege_IsValid(int value) {
|
|||
case 29:
|
||||
case 30:
|
||||
case 31:
|
||||
case 32:
|
||||
case 33:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
@ -158,6 +158,8 @@ enum ErrorCode : int {
|
|||
MemoryQuotaExhausted = 53,
|
||||
DiskQuotaExhausted = 54,
|
||||
TimeTickLongDelay = 55,
|
||||
NotReadyServe = 56,
|
||||
NotReadyCoordActivating = 57,
|
||||
DataCoordNA = 100,
|
||||
DDRequestRace = 1000,
|
||||
ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
|
||||
|
@ -548,12 +550,14 @@ enum ObjectPrivilege : int {
|
|||
PrivilegeListResourceGroups = 29,
|
||||
PrivilegeTransferNode = 30,
|
||||
PrivilegeTransferReplica = 31,
|
||||
PrivilegeGetLoadingProgress = 32,
|
||||
PrivilegeGetLoadState = 33,
|
||||
ObjectPrivilege_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
|
||||
ObjectPrivilege_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
|
||||
};
|
||||
bool ObjectPrivilege_IsValid(int value);
|
||||
constexpr ObjectPrivilege ObjectPrivilege_MIN = PrivilegeAll;
|
||||
constexpr ObjectPrivilege ObjectPrivilege_MAX = PrivilegeTransferReplica;
|
||||
constexpr ObjectPrivilege ObjectPrivilege_MAX = PrivilegeGetLoadState;
|
||||
constexpr int ObjectPrivilege_ARRAYSIZE = ObjectPrivilege_MAX + 1;
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ObjectPrivilege_descriptor();
|
||||
|
|
|
@ -56,6 +56,8 @@ func TestPrivilegeInterceptor(t *testing.T) {
|
|||
PolicyInfos: []string{
|
||||
funcutil.PolicyForPrivilege("role1", commonpb.ObjectType_Collection.String(), "col1", commonpb.ObjectPrivilege_PrivilegeLoad.String()),
|
||||
funcutil.PolicyForPrivilege("role1", commonpb.ObjectType_Collection.String(), "col1", commonpb.ObjectPrivilege_PrivilegeFlush.String()),
|
||||
funcutil.PolicyForPrivilege("role1", commonpb.ObjectType_Collection.String(), "col1", commonpb.ObjectPrivilege_PrivilegeGetLoadState.String()),
|
||||
funcutil.PolicyForPrivilege("role1", commonpb.ObjectType_Collection.String(), "col1", commonpb.ObjectPrivilege_PrivilegeGetLoadingProgress.String()),
|
||||
funcutil.PolicyForPrivilege("role2", commonpb.ObjectType_Global.String(), "*", commonpb.ObjectPrivilege_PrivilegeAll.String()),
|
||||
},
|
||||
UserRoles: []string{
|
||||
|
@ -89,8 +91,17 @@ func TestPrivilegeInterceptor(t *testing.T) {
|
|||
CollectionName: "col1",
|
||||
})
|
||||
assert.Nil(t, err)
|
||||
_, err = PrivilegeInterceptor(ctx, &milvuspb.GetLoadingProgressRequest{
|
||||
CollectionName: "col1",
|
||||
})
|
||||
assert.Nil(t, err)
|
||||
_, err = PrivilegeInterceptor(ctx, &milvuspb.GetLoadStateRequest{
|
||||
CollectionName: "col1",
|
||||
})
|
||||
assert.Nil(t, err)
|
||||
|
||||
_, err = PrivilegeInterceptor(GetContext(context.Background(), "foo:123456"), &milvuspb.LoadCollectionRequest{
|
||||
fooCtx := GetContext(context.Background(), "foo:123456")
|
||||
_, err = PrivilegeInterceptor(fooCtx, &milvuspb.LoadCollectionRequest{
|
||||
DbName: "db_test",
|
||||
CollectionName: "col1",
|
||||
})
|
||||
|
@ -100,6 +111,14 @@ func TestPrivilegeInterceptor(t *testing.T) {
|
|||
CollectionName: "col1",
|
||||
})
|
||||
assert.NotNil(t, err)
|
||||
_, err = PrivilegeInterceptor(fooCtx, &milvuspb.GetLoadingProgressRequest{
|
||||
CollectionName: "col1",
|
||||
})
|
||||
assert.NotNil(t, err)
|
||||
_, err = PrivilegeInterceptor(fooCtx, &milvuspb.GetLoadStateRequest{
|
||||
CollectionName: "col1",
|
||||
})
|
||||
assert.NotNil(t, err)
|
||||
|
||||
_, err = PrivilegeInterceptor(ctx, &milvuspb.FlushRequest{
|
||||
DbName: "db_test",
|
||||
|
|
|
@ -81,6 +81,9 @@ var (
|
|||
MetaStore2API(commonpb.ObjectPrivilege_PrivilegeQuery.String()),
|
||||
MetaStore2API(commonpb.ObjectPrivilege_PrivilegeLoadBalance.String()),
|
||||
MetaStore2API(commonpb.ObjectPrivilege_PrivilegeImport.String()),
|
||||
|
||||
MetaStore2API(commonpb.ObjectPrivilege_PrivilegeGetLoadingProgress.String()),
|
||||
MetaStore2API(commonpb.ObjectPrivilege_PrivilegeGetLoadState.String()),
|
||||
},
|
||||
commonpb.ObjectType_Global.String(): {
|
||||
MetaStore2API(commonpb.ObjectPrivilege_PrivilegeAll.String()),
|
||||
|
|
Loading…
Reference in New Issue