Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( S_name = map[int32]string{}/* 103 elements not displayed */ S_value = map[string]int32{}/* 103 elements not displayed */ )
Enum value maps for S.
var ( // indicates whether the given scope should be returned by the Get /scopes/ call // or any other call that returns list of available perms. // // optional bool clarfai_exposed = 80318; E_ClarfaiExposed = &file_proto_clarifai_auth_scope_scope_proto_extTypes[0] // TODO: We have no way of picking extension field numbers within clarifai to guarantee // uniqueness. Note: 50000-99999 are for organizational use (like this) // // repeated clarifai.auth.scope.S clarifai_depending_scopes = 80319; E_ClarifaiDependingScopes = &file_proto_clarifai_auth_scope_scope_proto_extTypes[1] )
Extension fields to descriptorpb.EnumValueOptions.
var File_proto_clarifai_auth_scope_scope_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type S ¶
type S int32
Next index: 41 NOTE: When updating the list of "clarifai_exposed" scopes, please also update the TestScopes function in main_key_test.go and TestGetExposedScopes function in scope_test.go
The dependencies listed for each scope are simply recommendations so that a user cannot make a key that would be useless. Beyond the key creation they are not enforced but rather the scopes are enforce when data is accessed.
There is the following conventions in place, make sure you add them to the scopes for all new resource types:
1. *_Add requires the corresponding _Get. 2. *_Delete requires the corresponding _Add and _Get. 3. *_Patch is deprecated and not check anywhere.
Think of the dependencies in this file at the DB level. If you cannot make a DB call to Get, Add or Delete a resource without having access to another resource then you should add it here. That should for the most part be the same resource type. In service.proto for the API level you will also specify cl_depending_scopes for each API endpoint. Those cover cases where an endpoint might need to access more than just that one resource type in order to operate (ie. API handlers that make multiple DB calls of various resource types likely have more cl_depending_scopes than the ones listed below). For example: PostCollectors to create a collector we make sure that you can do model predictions, get concepts, etc. so that you don't have a collector that would be useless at the end of that API handler but below you can see that the dependencies of Collector scopes are only on other Collector scopes.
const ( // introduce undef so that the zero (default/unset) value of the enum is not a real // permission. undef is only present for this purpose and should not be used // to indicate any "real" value. S_undef S = 0 S_All S = 1 // Make an rpc to our prediction services. S_Predict S = 2 // Write to the inputs table in the DB. S_Inputs_Add S = 4 // Read from the inputs table in the DB. S_Inputs_Get S = 5 // To patch we need read/write. // Deprecated. // Optionally needs Concepts_Add. // // Deprecated: Do not use. S_Inputs_Patch S = 7 // To delete we need read/write S_Inputs_Delete S = 8 // Deprecated. // // Deprecated: Do not use. S_Outputs_Patch S = 9 // Write to the concepts DB tables. S_Concepts_Add S = 10 // Read from the concepts DB tables. S_Concepts_Get S = 11 // To patch we need read/write. // Deprecated // // Deprecated: Do not use. S_Concepts_Patch S = 12 // To delete we need read/write. // Note: not implemented. S_Concepts_Delete S = 13 // Write to the models DB tables. S_Models_Add S = 14 // Read from the models and models versions DB tables. S_Models_Get S = 15 // To patch we need read/write. // Deprecated. // // Deprecated: Do not use. S_Models_Patch S = 16 // To delete we need read/write. S_Models_Delete S = 17 // Note: Models_Train is effectively doing POST /models/{models_id}/versions so it's treated that // way in terms of data access under the hood. // Write to the model versions DB table. S_Models_Train S = 26 // Internal only model syncing. S_Models_Sync S = 27 // To get model version export S_ModelExports_Get S = 142 // To create model version export S_ModelExports_Add S = 143 // To pull the model version's image S_Models_Pull S = 150 // Write to the workflows DB table. S_Workflows_Add S = 18 // Read from the workflows DB table. S_Workflows_Get S = 19 // To patch we need read/write. // Deprecated. // // Deprecated: Do not use. S_Workflows_Patch S = 20 // To delete we need read/write. S_Workflows_Delete S = 21 S_WorkflowMetrics_Get S = 96 S_WorkflowMetrics_Add S = 97 S_WorkflowMetrics_Delete S = 98 // Write to the visualizations DB table. // Deprecated // // Deprecated: Do not use. S_TSNEVisualizations_Add S = 24 // Read from the visualizations DB table. // Deprecated // // Deprecated: Do not use. S_TSNEVisualizations_Get S = 25 // Write to the annotations DB table. S_Annotations_Add S = 37 // Read from the annotations DB table. S_Annotations_Get S = 38 // To patch we need read/write. // Deprecated. // // Deprecated: Do not use. S_Annotations_Patch S = 39 // To delete we need read/write. S_Annotations_Delete S = 40 // Write to the collectors DB table. S_Collectors_Add S = 41 // Read from the collectors DB table. S_Collectors_Get S = 42 // To delete we need read/write. S_Collectors_Delete S = 43 // Write to the apps DB table. S_Apps_Add S = 44 // Read from the apps DB table. S_Apps_Get S = 45 // To delete we need read/write. S_Apps_Delete S = 46 // Write to the keys DB table. S_Keys_Add S = 47 // Read from the keys DB table. S_Keys_Get S = 48 // To delete we need read/write. S_Keys_Delete S = 49 // Write to the app sharing DB table S_Collaborators_Add S = 51 // Read from the app sharing DB table S_Collaborators_Get S = 50 // To delete we need read/write S_Collaborators_Delete S = 52 // Write to the metrics table S_Metrics_Add S = 54 // Read from metrics table S_Metrics_Get S = 53 // To delete we need read/write S_Metrics_Delete S = 63 // Write to tasks DB table. S_Tasks_Add S = 55 // Read from the tasks DB table. S_Tasks_Get S = 56 // To delete we need read/write S_Tasks_Delete S = 70 // Write to the password_policies DB table S_PasswordPolicies_Add S = 57 // Read from the password_policies DB table S_PasswordPolicies_Get S = 58 // To delete password_policies we need read/write S_PasswordPolicies_Delete S = 59 // Read from label orders table S_LabelOrders_Get S = 67 // Write to label orders table S_LabelOrders_Add S = 68 // To delete label orders we need read/write S_LabelOrders_Delete S = 69 // Read from user_feature_configs table S_UserFeatureConfigs_Get S = 71 // CRUD on FindDuplicateAnnotationsJobs table S_FindDuplicateAnnotationsJobs_Add S = 102 S_FindDuplicateAnnotationsJobs_Get S = 103 S_FindDuplicateAnnotationsJobs_Delete S = 104 S_Datasets_Get S = 105 S_Datasets_Add S = 106 S_Datasets_Delete S = 107 // Write to the modules DB tables. S_Modules_Add S = 108 // Read from the modules and modules versions DB tables. S_Modules_Get S = 109 // To delete we need read/write. S_Modules_Delete S = 110 // Write to the InstalledModuleVersions DB tables. S_InstalledModuleVersions_Add S = 111 // Read from the InstalledModuleVersions and InstalledModuleVersions versions DB tables. S_InstalledModuleVersions_Get S = 112 // To delete we need read/write. S_InstalledModuleVersions_Delete S = 113 // Make an rpc to our search services. S_Search S = 3 // To get a saved search. S_SavedSearch_Get S = 114 // To add a saved search S_SavedSearch_Add S = 115 // To delete a saved search S_SavedSearch_Delete S = 116 S_ModelVersionPublications_Add S = 117 S_ModelVersionPublications_Delete S = 118 S_WorkflowPublications_Add S = 119 S_WorkflowPublications_Delete S = 120 // To write bulk operations to the DB S_BulkOperation_Add S = 121 // To Read Bulk Operations from the DB S_BulkOperation_Get S = 122 // To Delete Bulk Operations from the DB S_BulkOperation_Delete S = 123 // To read historical usage from usage.dashboard_items table S_HistoricalUsage_Get S = 124 // To read uploaded files and archives info from Uploads endpoints S_Uploads_Get S = 128 // To upload files or archives through the Uploads endpoints S_Uploads_Add S = 129 S_Uploads_Delete S = 130 // To control remote runners S_Runners_Get S = 131 S_Runners_Add S = 132 S_Runners_Delete S = 133 S_RunnerItems_Get S = 134 S_RunnerItems_Add S = 135 // Pools of compute resources. S_Nodepools_Get S = 136 S_Nodepools_Add S = 137 S_Nodepools_Delete S = 138 // Cluster of machines in a region of cloud S_ComputeClusters_Get S = 139 S_ComputeClusters_Add S = 140 S_ComputeClusters_Delete S = 141 // How to autoscale resources within nodepools. S_Deployments_Get S = 144 S_Deployments_Add S = 145 S_Deployments_Delete S = 146 S_InstanceTypes_Get S = 148 S_AuditLogs_Get S = 149 S_LogEntries_Get S = 151 )
func (S) Descriptor ¶
func (S) Descriptor() protoreflect.EnumDescriptor
func (S) EnumDescriptor
deprecated
func (S) Number ¶
func (x S) Number() protoreflect.EnumNumber
func (S) Type ¶
func (S) Type() protoreflect.EnumType
type ScopeList ¶
type ScopeList struct { // These are the list of low-level scopes to check from the enum below. Scopes []S `protobuf:"varint,1,rep,packed,name=scopes,proto3,enum=clarifai.auth.scope.S" json:"scopes,omitempty"` // This is a list of fully qualified grpc names to check. Endpoints []string `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` // contains filtered or unexported fields }
func (*ScopeList) Descriptor
deprecated
func (*ScopeList) GetEndpoints ¶
func (*ScopeList) ProtoMessage ¶
func (*ScopeList) ProtoMessage()
func (*ScopeList) ProtoReflect ¶
func (x *ScopeList) ProtoReflect() protoreflect.Message