diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0d84b95..6d0dbc0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,10 +18,9 @@ on: env: BUF_REPO: "buf.build/aserto-dev/authorizer" - BUF_VERSION: 1.64.0 - GO_VERSION: 1.25 - GO_LANGCI_LINT_VERSION: 2.6.2 - GO_TESTSUM_VERSION: 1.13.0 + BUF_VER: 1.66.1 + GO_LANGCI_LINT_VER: 2.11.4 + GO_TESTSUM_VER: 1.13.0 jobs: build: @@ -43,12 +42,13 @@ jobs: name: Setup Go uses: actions/setup-go@v6 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'go.mod' + cache: true - name: Setup buf uses: bufbuild/buf-action@v1 with: - version: ${{ env.BUF_VERSION }} + version: ${{ env.BUF_VER }} setup_only: true - name: Delete generated code @@ -68,13 +68,13 @@ jobs: name: Lint uses: golangci/golangci-lint-action@v9 with: - version: v${{ env.GO_LANGCI_LINT_VERSION }} + version: v${{ env.GO_LANGCI_LINT_VER }} args: --timeout=5m - name: Test Setup uses: gertd/action-gotestsum@v3.0.0 with: - gotestsum_version: ${{ env.GO_TESTSUM_VERSION }} + gotestsum_version: ${{ env.GO_TESTSUM_VER }} - name: Test run: | diff --git a/aserto/authorizer/v2/api/decision_logs.pb.go b/aserto/authorizer/v2/api/decision_logs.pb.go index 8e366ec..df073be 100644 --- a/aserto/authorizer/v2/api/decision_logs.pb.go +++ b/aserto/authorizer/v2/api/decision_logs.pb.go @@ -193,8 +193,10 @@ type DecisionPolicy struct { RegistryImage string `protobuf:"bytes,3,opt,name=registry_image,json=registryImage,proto3" json:"registry_image,omitempty"` // image of the policy in the registry, including org (e.g. acmecorp/peoplefinder-abac) RegistryTag string `protobuf:"bytes,4,opt,name=registry_tag,json=registryTag,proto3" json:"registry_tag,omitempty"` // tag of the policy image (e.g. 0.8.2 or latest) RegistryDigest string `protobuf:"bytes,5,opt,name=registry_digest,json=registryDigest,proto3" json:"registry_digest,omitempty"` // digest of the policy image - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Deprecated: Marked as deprecated in aserto/authorizer/v2/api/decision_logs.proto. + PolicyInstance *PolicyInstance `protobuf:"bytes,6,opt,name=policy_instance,json=policyInstance,proto3" json:"policy_instance,omitempty"` // policy instance used in decision + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DecisionPolicy) Reset() { @@ -262,11 +264,19 @@ func (x *DecisionPolicy) GetRegistryDigest() string { return "" } +// Deprecated: Marked as deprecated in aserto/authorizer/v2/api/decision_logs.proto. +func (x *DecisionPolicy) GetPolicyInstance() *PolicyInstance { + if x != nil { + return x.PolicyInstance + } + return nil +} + var File_aserto_authorizer_v2_api_decision_logs_proto protoreflect.FileDescriptor const file_aserto_authorizer_v2_api_decision_logs_proto_rawDesc = "" + "\n" + - ",aserto/authorizer/v2/api/decision_logs.proto\x12\x18aserto.authorizer.v2.api\x1a/aserto/authorizer/v2/api/identity_context.proto\x1a-aserto/authorizer/v2/api/policy_context.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\x04\n" + + ",aserto/authorizer/v2/api/decision_logs.proto\x12\x18aserto.authorizer.v2.api\x1a/aserto/authorizer/v2/api/identity_context.proto\x1a-aserto/authorizer/v2/api/policy_context.proto\x1a.aserto/authorizer/v2/api/policy_instance.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\x04\n" + "\bDecision\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x128\n" + "\ttimestamp\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\ttimestamp\x12\x12\n" + @@ -286,13 +296,14 @@ const file_aserto_authorizer_v2_api_decision_logs_proto_rawDesc = "" + "\fDecisionUser\x12C\n" + "\acontext\x18\x01 \x01(\v2).aserto.authorizer.v2.api.IdentityContextR\acontext\x12\x0e\n" + "\x02id\x18\x02 \x01(\tR\x02id\x12\x14\n" + - "\x05email\x18\x03 \x01(\tR\x05email\"\x88\x02\n" + + "\x05email\x18\x03 \x01(\tR\x05email\"\xc8\x02\n" + "\x0eDecisionPolicy\x12A\n" + "\acontext\x18\x01 \x01(\v2'.aserto.authorizer.v2.api.PolicyContextR\acontext\x12)\n" + "\x10registry_service\x18\x02 \x01(\tR\x0fregistryService\x12%\n" + "\x0eregistry_image\x18\x03 \x01(\tR\rregistryImage\x12!\n" + "\fregistry_tag\x18\x04 \x01(\tR\vregistryTag\x12'\n" + - "\x0fregistry_digest\x18\x05 \x01(\tR\x0eregistryDigestJ\x04\b\x06\x10\aR\x0fpolicy_instanceB]Z@github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api;api\xaa\x02\x18Aserto.Authorizer.V2.APIb\x06proto3" + "\x0fregistry_digest\x18\x05 \x01(\tR\x0eregistryDigest\x12U\n" + + "\x0fpolicy_instance\x18\x06 \x01(\v2(.aserto.authorizer.v2.api.PolicyInstanceB\x02\x18\x01R\x0epolicyInstanceB]Z@github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api;api\xaa\x02\x18Aserto.Authorizer.V2.APIb\x06proto3" var ( file_aserto_authorizer_v2_api_decision_logs_proto_rawDescOnce sync.Once @@ -317,6 +328,7 @@ var file_aserto_authorizer_v2_api_decision_logs_proto_goTypes = []any{ (*structpb.Struct)(nil), // 6: google.protobuf.Struct (*IdentityContext)(nil), // 7: aserto.authorizer.v2.api.IdentityContext (*PolicyContext)(nil), // 8: aserto.authorizer.v2.api.PolicyContext + (*PolicyInstance)(nil), // 9: aserto.authorizer.v2.api.PolicyInstance } var file_aserto_authorizer_v2_api_decision_logs_proto_depIdxs = []int32{ 5, // 0: aserto.authorizer.v2.api.Decision.timestamp:type_name -> google.protobuf.Timestamp @@ -327,11 +339,12 @@ var file_aserto_authorizer_v2_api_decision_logs_proto_depIdxs = []int32{ 4, // 5: aserto.authorizer.v2.api.Decision.annotations:type_name -> aserto.authorizer.v2.api.Decision.AnnotationsEntry 7, // 6: aserto.authorizer.v2.api.DecisionUser.context:type_name -> aserto.authorizer.v2.api.IdentityContext 8, // 7: aserto.authorizer.v2.api.DecisionPolicy.context:type_name -> aserto.authorizer.v2.api.PolicyContext - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 9, // 8: aserto.authorizer.v2.api.DecisionPolicy.policy_instance:type_name -> aserto.authorizer.v2.api.PolicyInstance + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_aserto_authorizer_v2_api_decision_logs_proto_init() } @@ -341,6 +354,7 @@ func file_aserto_authorizer_v2_api_decision_logs_proto_init() { } file_aserto_authorizer_v2_api_identity_context_proto_init() file_aserto_authorizer_v2_api_policy_context_proto_init() + file_aserto_authorizer_v2_api_policy_instance_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/aserto/authorizer/v2/api/policy_instance.pb.go b/aserto/authorizer/v2/api/policy_instance.pb.go new file mode 100644 index 0000000..97a7172 --- /dev/null +++ b/aserto/authorizer/v2/api/policy_instance.pb.go @@ -0,0 +1,140 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: aserto/authorizer/v2/api/policy_instance.proto + +package api + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deprecated: No longer required. +type PolicyInstance struct { + state protoimpl.MessageState `protogen:"open.v1"` + // policy name + // + // Deprecated: Marked as deprecated in aserto/authorizer/v2/api/policy_instance.proto. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // label identifying the instance of the policy + // + // Deprecated: Marked as deprecated in aserto/authorizer/v2/api/policy_instance.proto. + InstanceLabel string `protobuf:"bytes,2,opt,name=instance_label,json=instanceLabel,proto3" json:"instance_label,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PolicyInstance) Reset() { + *x = PolicyInstance{} + mi := &file_aserto_authorizer_v2_api_policy_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PolicyInstance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PolicyInstance) ProtoMessage() {} + +func (x *PolicyInstance) ProtoReflect() protoreflect.Message { + mi := &file_aserto_authorizer_v2_api_policy_instance_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PolicyInstance.ProtoReflect.Descriptor instead. +func (*PolicyInstance) Descriptor() ([]byte, []int) { + return file_aserto_authorizer_v2_api_policy_instance_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: Marked as deprecated in aserto/authorizer/v2/api/policy_instance.proto. +func (x *PolicyInstance) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Deprecated: Marked as deprecated in aserto/authorizer/v2/api/policy_instance.proto. +func (x *PolicyInstance) GetInstanceLabel() string { + if x != nil { + return x.InstanceLabel + } + return "" +} + +var File_aserto_authorizer_v2_api_policy_instance_proto protoreflect.FileDescriptor + +const file_aserto_authorizer_v2_api_policy_instance_proto_rawDesc = "" + + "\n" + + ".aserto/authorizer/v2/api/policy_instance.proto\x12\x18aserto.authorizer.v2.api\"S\n" + + "\x0ePolicyInstance\x12\x16\n" + + "\x04name\x18\x01 \x01(\tB\x02\x18\x01R\x04name\x12)\n" + + "\x0einstance_label\x18\x02 \x01(\tB\x02\x18\x01R\rinstanceLabelB]Z@github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api;api\xaa\x02\x18Aserto.Authorizer.V2.APIb\x06proto3" + +var ( + file_aserto_authorizer_v2_api_policy_instance_proto_rawDescOnce sync.Once + file_aserto_authorizer_v2_api_policy_instance_proto_rawDescData []byte +) + +func file_aserto_authorizer_v2_api_policy_instance_proto_rawDescGZIP() []byte { + file_aserto_authorizer_v2_api_policy_instance_proto_rawDescOnce.Do(func() { + file_aserto_authorizer_v2_api_policy_instance_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_aserto_authorizer_v2_api_policy_instance_proto_rawDesc), len(file_aserto_authorizer_v2_api_policy_instance_proto_rawDesc))) + }) + return file_aserto_authorizer_v2_api_policy_instance_proto_rawDescData +} + +var file_aserto_authorizer_v2_api_policy_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_aserto_authorizer_v2_api_policy_instance_proto_goTypes = []any{ + (*PolicyInstance)(nil), // 0: aserto.authorizer.v2.api.PolicyInstance +} +var file_aserto_authorizer_v2_api_policy_instance_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_aserto_authorizer_v2_api_policy_instance_proto_init() } +func file_aserto_authorizer_v2_api_policy_instance_proto_init() { + if File_aserto_authorizer_v2_api_policy_instance_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_aserto_authorizer_v2_api_policy_instance_proto_rawDesc), len(file_aserto_authorizer_v2_api_policy_instance_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_aserto_authorizer_v2_api_policy_instance_proto_goTypes, + DependencyIndexes: file_aserto_authorizer_v2_api_policy_instance_proto_depIdxs, + MessageInfos: file_aserto_authorizer_v2_api_policy_instance_proto_msgTypes, + }.Build() + File_aserto_authorizer_v2_api_policy_instance_proto = out.File + file_aserto_authorizer_v2_api_policy_instance_proto_goTypes = nil + file_aserto_authorizer_v2_api_policy_instance_proto_depIdxs = nil +} diff --git a/aserto/authorizer/v2/authorizer.pb.go b/aserto/authorizer/v2/authorizer.pb.go index 14f8673..9bdc334 100644 --- a/aserto/authorizer/v2/authorizer.pb.go +++ b/aserto/authorizer/v2/authorizer.pb.go @@ -31,7 +31,7 @@ type PathSeparator int32 const ( PathSeparator_PATH_SEPARATOR_UNKNOWN PathSeparator = 0 // Value not set. PathSeparator_PATH_SEPARATOR_DOT PathSeparator = 1 // Dot "." path separator - PathSeparator_PATH_SEPARATOR_SLASH PathSeparator = 2 // Slash "/" path separtor + PathSeparator_PATH_SEPARATOR_SLASH PathSeparator = 2 // Slash "/" path separator ) // Enum value maps for PathSeparator. @@ -243,11 +243,13 @@ func (x *InfoResponse) GetArch() string { } type GetPolicyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` + // Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. + PolicyInstance *api.PolicyInstance `protobuf:"bytes,3,opt,name=policy_instance,json=policyInstance,proto3,oneof" json:"policy_instance,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPolicyRequest) Reset() { @@ -294,6 +296,14 @@ func (x *GetPolicyRequest) GetFieldMask() *fieldmaskpb.FieldMask { return nil } +// Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. +func (x *GetPolicyRequest) GetPolicyInstance() *api.PolicyInstance { + if x != nil { + return x.PolicyInstance + } + return nil +} + type GetPolicyResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Result *api.Module `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` @@ -339,10 +349,12 @@ func (x *GetPolicyResponse) GetResult() *api.Module { } type ListPoliciesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` + // Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. + PolicyInstance *api.PolicyInstance `protobuf:"bytes,2,opt,name=policy_instance,json=policyInstance,proto3,oneof" json:"policy_instance,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListPoliciesRequest) Reset() { @@ -382,6 +394,14 @@ func (x *ListPoliciesRequest) GetFieldMask() *fieldmaskpb.FieldMask { return nil } +// Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. +func (x *ListPoliciesRequest) GetPolicyInstance() *api.PolicyInstance { + if x != nil { + return x.PolicyInstance + } + return nil +} + type ListPoliciesResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Result []*api.Module `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"` @@ -432,8 +452,10 @@ type DecisionTreeRequest struct { IdentityContext *api.IdentityContext `protobuf:"bytes,2,opt,name=identity_context,json=identityContext,proto3" json:"identity_context,omitempty"` Options *DecisionTreeOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` ResourceContext *structpb.Struct `protobuf:"bytes,4,opt,name=resource_context,json=resourceContext,proto3" json:"resource_context,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. + PolicyInstance *api.PolicyInstance `protobuf:"bytes,5,opt,name=policy_instance,json=policyInstance,proto3,oneof" json:"policy_instance,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DecisionTreeRequest) Reset() { @@ -494,6 +516,14 @@ func (x *DecisionTreeRequest) GetResourceContext() *structpb.Struct { return nil } +// Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. +func (x *DecisionTreeRequest) GetPolicyInstance() *api.PolicyInstance { + if x != nil { + return x.PolicyInstance + } + return nil +} + type DecisionTreeOptions struct { state protoimpl.MessageState `protogen:"open.v1"` PathSeparator PathSeparator `protobuf:"varint,1,opt,name=path_separator,json=pathSeparator,proto3,enum=aserto.authorizer.v2.PathSeparator" json:"path_separator,omitempty"` @@ -595,8 +625,10 @@ type IsRequest struct { PolicyContext *api.PolicyContext `protobuf:"bytes,1,opt,name=policy_context,json=policyContext,proto3" json:"policy_context,omitempty"` IdentityContext *api.IdentityContext `protobuf:"bytes,2,opt,name=identity_context,json=identityContext,proto3" json:"identity_context,omitempty"` ResourceContext *structpb.Struct `protobuf:"bytes,3,opt,name=resource_context,json=resourceContext,proto3" json:"resource_context,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. + PolicyInstance *api.PolicyInstance `protobuf:"bytes,4,opt,name=policy_instance,json=policyInstance,proto3,oneof" json:"policy_instance,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *IsRequest) Reset() { @@ -650,6 +682,14 @@ func (x *IsRequest) GetResourceContext() *structpb.Struct { return nil } +// Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. +func (x *IsRequest) GetPolicyInstance() *api.PolicyInstance { + if x != nil { + return x.PolicyInstance + } + return nil +} + type Decision struct { state protoimpl.MessageState `protogen:"open.v1"` Decision string `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"` @@ -822,8 +862,10 @@ type QueryRequest struct { PolicyContext *api.PolicyContext `protobuf:"bytes,4,opt,name=policy_context,json=policyContext,proto3,oneof" json:"policy_context,omitempty"` IdentityContext *api.IdentityContext `protobuf:"bytes,5,opt,name=identity_context,json=identityContext,proto3,oneof" json:"identity_context,omitempty"` ResourceContext *structpb.Struct `protobuf:"bytes,6,opt,name=resource_context,json=resourceContext,proto3,oneof" json:"resource_context,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. + PolicyInstance *api.PolicyInstance `protobuf:"bytes,7,opt,name=policy_instance,json=policyInstance,proto3,oneof" json:"policy_instance,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *QueryRequest) Reset() { @@ -898,6 +940,14 @@ func (x *QueryRequest) GetResourceContext() *structpb.Struct { return nil } +// Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. +func (x *QueryRequest) GetPolicyInstance() *api.PolicyInstance { + if x != nil { + return x.PolicyInstance + } + return nil +} + type CompileRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` @@ -908,8 +958,10 @@ type CompileRequest struct { PolicyContext *api.PolicyContext `protobuf:"bytes,6,opt,name=policy_context,json=policyContext,proto3,oneof" json:"policy_context,omitempty"` IdentityContext *api.IdentityContext `protobuf:"bytes,7,opt,name=identity_context,json=identityContext,proto3,oneof" json:"identity_context,omitempty"` ResourceContext *structpb.Struct `protobuf:"bytes,8,opt,name=resource_context,json=resourceContext,proto3,oneof" json:"resource_context,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. + PolicyInstance *api.PolicyInstance `protobuf:"bytes,9,opt,name=policy_instance,json=policyInstance,proto3,oneof" json:"policy_instance,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CompileRequest) Reset() { @@ -998,6 +1050,14 @@ func (x *CompileRequest) GetResourceContext() *structpb.Struct { return nil } +// Deprecated: Marked as deprecated in aserto/authorizer/v2/authorizer.proto. +func (x *CompileRequest) GetPolicyInstance() *api.PolicyInstance { + if x != nil { + return x.PolicyInstance + } + return nil +} + type CompileResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Result *structpb.Struct `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` @@ -1138,39 +1198,47 @@ var File_aserto_authorizer_v2_authorizer_proto protoreflect.FileDescriptor const file_aserto_authorizer_v2_authorizer_proto_rawDesc = "" + "\n" + - "%aserto/authorizer/v2/authorizer.proto\x12\x14aserto.authorizer.v2\x1a/aserto/authorizer/v2/api/identity_context.proto\x1a%aserto/authorizer/v2/api/module.proto\x1a-aserto/authorizer/v2/api/policy_context.proto\x1a\x1cgoogle/api/annotations.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\r\n" + + "%aserto/authorizer/v2/authorizer.proto\x12\x14aserto.authorizer.v2\x1a/aserto/authorizer/v2/api/identity_context.proto\x1a%aserto/authorizer/v2/api/module.proto\x1a-aserto/authorizer/v2/api/policy_context.proto\x1a.aserto/authorizer/v2/api/policy_instance.proto\x1a\x1cgoogle/api/annotations.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\r\n" + "\vInfoRequest\"x\n" + "\fInfoResponse\x12\x18\n" + "\aversion\x18\x01 \x01(\tR\aversion\x12\x16\n" + "\x06commit\x18\x02 \x01(\tR\x06commit\x12\x12\n" + "\x04date\x18\x03 \x01(\tR\x04date\x12\x0e\n" + "\x02os\x18\x04 \x01(\tR\x02os\x12\x12\n" + - "\x04arch\x18\x05 \x01(\tR\x04arch\"t\n" + + "\x04arch\x18\x05 \x01(\tR\x04arch\"\xcd\x01\n" + "\x10GetPolicyRequest\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x129\n" + "\n" + - "field_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\tfieldMaskJ\x04\b\x03\x10\x04R\x0fpolicy_instance\"M\n" + + "field_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\tfieldMask\x12Z\n" + + "\x0fpolicy_instance\x18\x03 \x01(\v2(.aserto.authorizer.v2.api.PolicyInstanceB\x02\x18\x01H\x00R\x0epolicyInstance\x88\x01\x01B\x12\n" + + "\x10_policy_instance\"M\n" + "\x11GetPolicyResponse\x128\n" + - "\x06result\x18\x01 \x01(\v2 .aserto.authorizer.v2.api.ModuleR\x06result\"g\n" + + "\x06result\x18\x01 \x01(\v2 .aserto.authorizer.v2.api.ModuleR\x06result\"\xc0\x01\n" + "\x13ListPoliciesRequest\x129\n" + "\n" + - "field_mask\x18\x01 \x01(\v2\x1a.google.protobuf.FieldMaskR\tfieldMaskJ\x04\b\x03\x10\x04R\x0fpolicy_instance\"P\n" + + "field_mask\x18\x01 \x01(\v2\x1a.google.protobuf.FieldMaskR\tfieldMask\x12Z\n" + + "\x0fpolicy_instance\x18\x02 \x01(\v2(.aserto.authorizer.v2.api.PolicyInstanceB\x02\x18\x01H\x00R\x0epolicyInstance\x88\x01\x01B\x12\n" + + "\x10_policy_instance\"P\n" + "\x14ListPoliciesResponse\x128\n" + - "\x06result\x18\x01 \x03(\v2 .aserto.authorizer.v2.api.ModuleR\x06result\"\xdb\x02\n" + + "\x06result\x18\x01 \x03(\v2 .aserto.authorizer.v2.api.ModuleR\x06result\"\xb4\x03\n" + "\x13DecisionTreeRequest\x12N\n" + "\x0epolicy_context\x18\x01 \x01(\v2'.aserto.authorizer.v2.api.PolicyContextR\rpolicyContext\x12T\n" + "\x10identity_context\x18\x02 \x01(\v2).aserto.authorizer.v2.api.IdentityContextR\x0fidentityContext\x12C\n" + "\aoptions\x18\x03 \x01(\v2).aserto.authorizer.v2.DecisionTreeOptionsR\aoptions\x12B\n" + - "\x10resource_context\x18\x04 \x01(\v2\x17.google.protobuf.StructR\x0fresourceContextJ\x04\b\x05\x10\x06R\x0fpolicy_instance\"g\n" + + "\x10resource_context\x18\x04 \x01(\v2\x17.google.protobuf.StructR\x0fresourceContext\x12Z\n" + + "\x0fpolicy_instance\x18\x05 \x01(\v2(.aserto.authorizer.v2.api.PolicyInstanceB\x02\x18\x01H\x00R\x0epolicyInstance\x88\x01\x01B\x12\n" + + "\x10_policy_instance\"g\n" + "\x13DecisionTreeOptions\x12J\n" + "\x0epath_separator\x18\x01 \x01(\x0e2#.aserto.authorizer.v2.PathSeparatorR\rpathSeparatorJ\x04\b\x02\x10\x03\"f\n" + "\x14DecisionTreeResponse\x12\x1b\n" + "\tpath_root\x18\x01 \x01(\tR\bpathRoot\x12+\n" + - "\x04path\x18\x03 \x01(\v2\x17.google.protobuf.StructR\x04pathJ\x04\b\x02\x10\x03\"\x8c\x02\n" + + "\x04path\x18\x03 \x01(\v2\x17.google.protobuf.StructR\x04pathJ\x04\b\x02\x10\x03\"\xe5\x02\n" + "\tIsRequest\x12N\n" + "\x0epolicy_context\x18\x01 \x01(\v2'.aserto.authorizer.v2.api.PolicyContextR\rpolicyContext\x12T\n" + "\x10identity_context\x18\x02 \x01(\v2).aserto.authorizer.v2.api.IdentityContextR\x0fidentityContext\x12B\n" + - "\x10resource_context\x18\x03 \x01(\v2\x17.google.protobuf.StructR\x0fresourceContextJ\x04\b\x04\x10\x05R\x0fpolicy_instance\"6\n" + + "\x10resource_context\x18\x03 \x01(\v2\x17.google.protobuf.StructR\x0fresourceContext\x12Z\n" + + "\x0fpolicy_instance\x18\x04 \x01(\v2(.aserto.authorizer.v2.api.PolicyInstanceB\x02\x18\x01H\x00R\x0epolicyInstance\x88\x01\x01B\x12\n" + + "\x10_policy_instance\"6\n" + "\bDecision\x12\x1a\n" + "\bdecision\x18\x01 \x01(\tR\bdecision\x12\x0e\n" + "\x02is\x18\x02 \x01(\bR\x02is\"J\n" + @@ -1183,19 +1251,21 @@ const file_aserto_authorizer_v2_authorizer_proto_rawDesc = "" + "instrument\x18\x02 \x01(\bR\n" + "instrument\x126\n" + "\x05trace\x18\x03 \x01(\x0e2 .aserto.authorizer.v2.TraceLevelR\x05trace\x12#\n" + - "\rtrace_summary\x18\x04 \x01(\bR\ftraceSummary\"\xd6\x03\n" + + "\rtrace_summary\x18\x04 \x01(\bR\ftraceSummary\"\xaf\x04\n" + "\fQueryRequest\x12\x14\n" + "\x05query\x18\x01 \x01(\tR\x05query\x12\x14\n" + "\x05input\x18\x02 \x01(\tR\x05input\x12A\n" + "\aoptions\x18\x03 \x01(\v2\".aserto.authorizer.v2.QueryOptionsH\x00R\aoptions\x88\x01\x01\x12S\n" + "\x0epolicy_context\x18\x04 \x01(\v2'.aserto.authorizer.v2.api.PolicyContextH\x01R\rpolicyContext\x88\x01\x01\x12Y\n" + "\x10identity_context\x18\x05 \x01(\v2).aserto.authorizer.v2.api.IdentityContextH\x02R\x0fidentityContext\x88\x01\x01\x12G\n" + - "\x10resource_context\x18\x06 \x01(\v2\x17.google.protobuf.StructH\x03R\x0fresourceContext\x88\x01\x01B\n" + + "\x10resource_context\x18\x06 \x01(\v2\x17.google.protobuf.StructH\x03R\x0fresourceContext\x88\x01\x01\x12Z\n" + + "\x0fpolicy_instance\x18\a \x01(\v2(.aserto.authorizer.v2.api.PolicyInstanceB\x02\x18\x01H\x04R\x0epolicyInstance\x88\x01\x01B\n" + "\n" + "\b_optionsB\x11\n" + "\x0f_policy_contextB\x13\n" + "\x11_identity_contextB\x13\n" + - "\x11_resource_contextJ\x04\b\a\x10\bR\x0fpolicy_instance\"\x9f\x04\n" + + "\x11_resource_contextB\x12\n" + + "\x10_policy_instance\"\xf8\x04\n" + "\x0eCompileRequest\x12\x14\n" + "\x05query\x18\x01 \x01(\tR\x05query\x12\x14\n" + "\x05input\x18\x02 \x01(\tR\x05input\x12\x1a\n" + @@ -1204,13 +1274,14 @@ const file_aserto_authorizer_v2_authorizer_proto_rawDesc = "" + "\aoptions\x18\x05 \x01(\v2\".aserto.authorizer.v2.QueryOptionsH\x00R\aoptions\x88\x01\x01\x12S\n" + "\x0epolicy_context\x18\x06 \x01(\v2'.aserto.authorizer.v2.api.PolicyContextH\x01R\rpolicyContext\x88\x01\x01\x12Y\n" + "\x10identity_context\x18\a \x01(\v2).aserto.authorizer.v2.api.IdentityContextH\x02R\x0fidentityContext\x88\x01\x01\x12G\n" + - "\x10resource_context\x18\b \x01(\v2\x17.google.protobuf.StructH\x03R\x0fresourceContext\x88\x01\x01B\n" + + "\x10resource_context\x18\b \x01(\v2\x17.google.protobuf.StructH\x03R\x0fresourceContext\x88\x01\x01\x12Z\n" + + "\x0fpolicy_instance\x18\t \x01(\v2(.aserto.authorizer.v2.api.PolicyInstanceB\x02\x18\x01H\x04R\x0epolicyInstance\x88\x01\x01B\n" + "\n" + "\b_optionsB\x11\n" + "\x0f_policy_contextB\x13\n" + "\x11_identity_contextB\x13\n" + - "\x11_resource_contextJ\x04\b\t\x10\n" + - "R\x0fpolicy_instance\"\xc9\x01\n" + + "\x11_resource_contextB\x12\n" + + "\x10_policy_instance\"\xc9\x01\n" + "\x0fCompileResponse\x12/\n" + "\x06result\x18\x01 \x01(\v2\x17.google.protobuf.StructR\x06result\x121\n" + "\ametrics\x18\x02 \x01(\v2\x17.google.protobuf.StructR\ametrics\x12-\n" + @@ -1309,60 +1380,67 @@ var file_aserto_authorizer_v2_authorizer_proto_goTypes = []any{ (*CompileResponse)(nil), // 17: aserto.authorizer.v2.CompileResponse (*QueryResponse)(nil), // 18: aserto.authorizer.v2.QueryResponse (*fieldmaskpb.FieldMask)(nil), // 19: google.protobuf.FieldMask - (*api.Module)(nil), // 20: aserto.authorizer.v2.api.Module - (*api.PolicyContext)(nil), // 21: aserto.authorizer.v2.api.PolicyContext - (*api.IdentityContext)(nil), // 22: aserto.authorizer.v2.api.IdentityContext - (*structpb.Struct)(nil), // 23: google.protobuf.Struct + (*api.PolicyInstance)(nil), // 20: aserto.authorizer.v2.api.PolicyInstance + (*api.Module)(nil), // 21: aserto.authorizer.v2.api.Module + (*api.PolicyContext)(nil), // 22: aserto.authorizer.v2.api.PolicyContext + (*api.IdentityContext)(nil), // 23: aserto.authorizer.v2.api.IdentityContext + (*structpb.Struct)(nil), // 24: google.protobuf.Struct } var file_aserto_authorizer_v2_authorizer_proto_depIdxs = []int32{ 19, // 0: aserto.authorizer.v2.GetPolicyRequest.field_mask:type_name -> google.protobuf.FieldMask - 20, // 1: aserto.authorizer.v2.GetPolicyResponse.result:type_name -> aserto.authorizer.v2.api.Module - 19, // 2: aserto.authorizer.v2.ListPoliciesRequest.field_mask:type_name -> google.protobuf.FieldMask - 20, // 3: aserto.authorizer.v2.ListPoliciesResponse.result:type_name -> aserto.authorizer.v2.api.Module - 21, // 4: aserto.authorizer.v2.DecisionTreeRequest.policy_context:type_name -> aserto.authorizer.v2.api.PolicyContext - 22, // 5: aserto.authorizer.v2.DecisionTreeRequest.identity_context:type_name -> aserto.authorizer.v2.api.IdentityContext - 9, // 6: aserto.authorizer.v2.DecisionTreeRequest.options:type_name -> aserto.authorizer.v2.DecisionTreeOptions - 23, // 7: aserto.authorizer.v2.DecisionTreeRequest.resource_context:type_name -> google.protobuf.Struct - 0, // 8: aserto.authorizer.v2.DecisionTreeOptions.path_separator:type_name -> aserto.authorizer.v2.PathSeparator - 23, // 9: aserto.authorizer.v2.DecisionTreeResponse.path:type_name -> google.protobuf.Struct - 21, // 10: aserto.authorizer.v2.IsRequest.policy_context:type_name -> aserto.authorizer.v2.api.PolicyContext - 22, // 11: aserto.authorizer.v2.IsRequest.identity_context:type_name -> aserto.authorizer.v2.api.IdentityContext - 23, // 12: aserto.authorizer.v2.IsRequest.resource_context:type_name -> google.protobuf.Struct - 12, // 13: aserto.authorizer.v2.IsResponse.decisions:type_name -> aserto.authorizer.v2.Decision - 1, // 14: aserto.authorizer.v2.QueryOptions.trace:type_name -> aserto.authorizer.v2.TraceLevel - 14, // 15: aserto.authorizer.v2.QueryRequest.options:type_name -> aserto.authorizer.v2.QueryOptions - 21, // 16: aserto.authorizer.v2.QueryRequest.policy_context:type_name -> aserto.authorizer.v2.api.PolicyContext - 22, // 17: aserto.authorizer.v2.QueryRequest.identity_context:type_name -> aserto.authorizer.v2.api.IdentityContext - 23, // 18: aserto.authorizer.v2.QueryRequest.resource_context:type_name -> google.protobuf.Struct - 14, // 19: aserto.authorizer.v2.CompileRequest.options:type_name -> aserto.authorizer.v2.QueryOptions - 21, // 20: aserto.authorizer.v2.CompileRequest.policy_context:type_name -> aserto.authorizer.v2.api.PolicyContext - 22, // 21: aserto.authorizer.v2.CompileRequest.identity_context:type_name -> aserto.authorizer.v2.api.IdentityContext - 23, // 22: aserto.authorizer.v2.CompileRequest.resource_context:type_name -> google.protobuf.Struct - 23, // 23: aserto.authorizer.v2.CompileResponse.result:type_name -> google.protobuf.Struct - 23, // 24: aserto.authorizer.v2.CompileResponse.metrics:type_name -> google.protobuf.Struct - 23, // 25: aserto.authorizer.v2.CompileResponse.trace:type_name -> google.protobuf.Struct - 23, // 26: aserto.authorizer.v2.QueryResponse.response:type_name -> google.protobuf.Struct - 23, // 27: aserto.authorizer.v2.QueryResponse.metrics:type_name -> google.protobuf.Struct - 23, // 28: aserto.authorizer.v2.QueryResponse.trace:type_name -> google.protobuf.Struct - 8, // 29: aserto.authorizer.v2.Authorizer.DecisionTree:input_type -> aserto.authorizer.v2.DecisionTreeRequest - 11, // 30: aserto.authorizer.v2.Authorizer.Is:input_type -> aserto.authorizer.v2.IsRequest - 15, // 31: aserto.authorizer.v2.Authorizer.Query:input_type -> aserto.authorizer.v2.QueryRequest - 16, // 32: aserto.authorizer.v2.Authorizer.Compile:input_type -> aserto.authorizer.v2.CompileRequest - 6, // 33: aserto.authorizer.v2.Authorizer.ListPolicies:input_type -> aserto.authorizer.v2.ListPoliciesRequest - 4, // 34: aserto.authorizer.v2.Authorizer.GetPolicy:input_type -> aserto.authorizer.v2.GetPolicyRequest - 2, // 35: aserto.authorizer.v2.Authorizer.Info:input_type -> aserto.authorizer.v2.InfoRequest - 10, // 36: aserto.authorizer.v2.Authorizer.DecisionTree:output_type -> aserto.authorizer.v2.DecisionTreeResponse - 13, // 37: aserto.authorizer.v2.Authorizer.Is:output_type -> aserto.authorizer.v2.IsResponse - 18, // 38: aserto.authorizer.v2.Authorizer.Query:output_type -> aserto.authorizer.v2.QueryResponse - 17, // 39: aserto.authorizer.v2.Authorizer.Compile:output_type -> aserto.authorizer.v2.CompileResponse - 7, // 40: aserto.authorizer.v2.Authorizer.ListPolicies:output_type -> aserto.authorizer.v2.ListPoliciesResponse - 5, // 41: aserto.authorizer.v2.Authorizer.GetPolicy:output_type -> aserto.authorizer.v2.GetPolicyResponse - 3, // 42: aserto.authorizer.v2.Authorizer.Info:output_type -> aserto.authorizer.v2.InfoResponse - 36, // [36:43] is the sub-list for method output_type - 29, // [29:36] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name + 20, // 1: aserto.authorizer.v2.GetPolicyRequest.policy_instance:type_name -> aserto.authorizer.v2.api.PolicyInstance + 21, // 2: aserto.authorizer.v2.GetPolicyResponse.result:type_name -> aserto.authorizer.v2.api.Module + 19, // 3: aserto.authorizer.v2.ListPoliciesRequest.field_mask:type_name -> google.protobuf.FieldMask + 20, // 4: aserto.authorizer.v2.ListPoliciesRequest.policy_instance:type_name -> aserto.authorizer.v2.api.PolicyInstance + 21, // 5: aserto.authorizer.v2.ListPoliciesResponse.result:type_name -> aserto.authorizer.v2.api.Module + 22, // 6: aserto.authorizer.v2.DecisionTreeRequest.policy_context:type_name -> aserto.authorizer.v2.api.PolicyContext + 23, // 7: aserto.authorizer.v2.DecisionTreeRequest.identity_context:type_name -> aserto.authorizer.v2.api.IdentityContext + 9, // 8: aserto.authorizer.v2.DecisionTreeRequest.options:type_name -> aserto.authorizer.v2.DecisionTreeOptions + 24, // 9: aserto.authorizer.v2.DecisionTreeRequest.resource_context:type_name -> google.protobuf.Struct + 20, // 10: aserto.authorizer.v2.DecisionTreeRequest.policy_instance:type_name -> aserto.authorizer.v2.api.PolicyInstance + 0, // 11: aserto.authorizer.v2.DecisionTreeOptions.path_separator:type_name -> aserto.authorizer.v2.PathSeparator + 24, // 12: aserto.authorizer.v2.DecisionTreeResponse.path:type_name -> google.protobuf.Struct + 22, // 13: aserto.authorizer.v2.IsRequest.policy_context:type_name -> aserto.authorizer.v2.api.PolicyContext + 23, // 14: aserto.authorizer.v2.IsRequest.identity_context:type_name -> aserto.authorizer.v2.api.IdentityContext + 24, // 15: aserto.authorizer.v2.IsRequest.resource_context:type_name -> google.protobuf.Struct + 20, // 16: aserto.authorizer.v2.IsRequest.policy_instance:type_name -> aserto.authorizer.v2.api.PolicyInstance + 12, // 17: aserto.authorizer.v2.IsResponse.decisions:type_name -> aserto.authorizer.v2.Decision + 1, // 18: aserto.authorizer.v2.QueryOptions.trace:type_name -> aserto.authorizer.v2.TraceLevel + 14, // 19: aserto.authorizer.v2.QueryRequest.options:type_name -> aserto.authorizer.v2.QueryOptions + 22, // 20: aserto.authorizer.v2.QueryRequest.policy_context:type_name -> aserto.authorizer.v2.api.PolicyContext + 23, // 21: aserto.authorizer.v2.QueryRequest.identity_context:type_name -> aserto.authorizer.v2.api.IdentityContext + 24, // 22: aserto.authorizer.v2.QueryRequest.resource_context:type_name -> google.protobuf.Struct + 20, // 23: aserto.authorizer.v2.QueryRequest.policy_instance:type_name -> aserto.authorizer.v2.api.PolicyInstance + 14, // 24: aserto.authorizer.v2.CompileRequest.options:type_name -> aserto.authorizer.v2.QueryOptions + 22, // 25: aserto.authorizer.v2.CompileRequest.policy_context:type_name -> aserto.authorizer.v2.api.PolicyContext + 23, // 26: aserto.authorizer.v2.CompileRequest.identity_context:type_name -> aserto.authorizer.v2.api.IdentityContext + 24, // 27: aserto.authorizer.v2.CompileRequest.resource_context:type_name -> google.protobuf.Struct + 20, // 28: aserto.authorizer.v2.CompileRequest.policy_instance:type_name -> aserto.authorizer.v2.api.PolicyInstance + 24, // 29: aserto.authorizer.v2.CompileResponse.result:type_name -> google.protobuf.Struct + 24, // 30: aserto.authorizer.v2.CompileResponse.metrics:type_name -> google.protobuf.Struct + 24, // 31: aserto.authorizer.v2.CompileResponse.trace:type_name -> google.protobuf.Struct + 24, // 32: aserto.authorizer.v2.QueryResponse.response:type_name -> google.protobuf.Struct + 24, // 33: aserto.authorizer.v2.QueryResponse.metrics:type_name -> google.protobuf.Struct + 24, // 34: aserto.authorizer.v2.QueryResponse.trace:type_name -> google.protobuf.Struct + 8, // 35: aserto.authorizer.v2.Authorizer.DecisionTree:input_type -> aserto.authorizer.v2.DecisionTreeRequest + 11, // 36: aserto.authorizer.v2.Authorizer.Is:input_type -> aserto.authorizer.v2.IsRequest + 15, // 37: aserto.authorizer.v2.Authorizer.Query:input_type -> aserto.authorizer.v2.QueryRequest + 16, // 38: aserto.authorizer.v2.Authorizer.Compile:input_type -> aserto.authorizer.v2.CompileRequest + 6, // 39: aserto.authorizer.v2.Authorizer.ListPolicies:input_type -> aserto.authorizer.v2.ListPoliciesRequest + 4, // 40: aserto.authorizer.v2.Authorizer.GetPolicy:input_type -> aserto.authorizer.v2.GetPolicyRequest + 2, // 41: aserto.authorizer.v2.Authorizer.Info:input_type -> aserto.authorizer.v2.InfoRequest + 10, // 42: aserto.authorizer.v2.Authorizer.DecisionTree:output_type -> aserto.authorizer.v2.DecisionTreeResponse + 13, // 43: aserto.authorizer.v2.Authorizer.Is:output_type -> aserto.authorizer.v2.IsResponse + 18, // 44: aserto.authorizer.v2.Authorizer.Query:output_type -> aserto.authorizer.v2.QueryResponse + 17, // 45: aserto.authorizer.v2.Authorizer.Compile:output_type -> aserto.authorizer.v2.CompileResponse + 7, // 46: aserto.authorizer.v2.Authorizer.ListPolicies:output_type -> aserto.authorizer.v2.ListPoliciesResponse + 5, // 47: aserto.authorizer.v2.Authorizer.GetPolicy:output_type -> aserto.authorizer.v2.GetPolicyResponse + 3, // 48: aserto.authorizer.v2.Authorizer.Info:output_type -> aserto.authorizer.v2.InfoResponse + 42, // [42:49] is the sub-list for method output_type + 35, // [35:42] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name } func init() { file_aserto_authorizer_v2_authorizer_proto_init() } @@ -1370,6 +1448,10 @@ func file_aserto_authorizer_v2_authorizer_proto_init() { if File_aserto_authorizer_v2_authorizer_proto != nil { return } + file_aserto_authorizer_v2_authorizer_proto_msgTypes[2].OneofWrappers = []any{} + file_aserto_authorizer_v2_authorizer_proto_msgTypes[4].OneofWrappers = []any{} + file_aserto_authorizer_v2_authorizer_proto_msgTypes[6].OneofWrappers = []any{} + file_aserto_authorizer_v2_authorizer_proto_msgTypes[9].OneofWrappers = []any{} file_aserto_authorizer_v2_authorizer_proto_msgTypes[13].OneofWrappers = []any{} file_aserto_authorizer_v2_authorizer_proto_msgTypes[14].OneofWrappers = []any{} type x struct{} diff --git a/go.mod b/go.mod index 9ca3b20..e54af89 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,14 @@ module github.com/aserto-dev/go-authorizer -go 1.24.0 +go 1.25.0 -toolchain go1.25.6 +toolchain go1.26.1 require ( github.com/aserto-dev/errors v0.0.17 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 - google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20 - google.golang.org/grpc v1.78.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 + google.golang.org/genproto/googleapis/api v0.0.0-20260406210006-6f92a3bedf2d + google.golang.org/grpc v1.80.0 google.golang.org/protobuf v1.36.11 ) @@ -16,9 +16,9 @@ require ( github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/rs/zerolog v1.34.0 // indirect - golang.org/x/net v0.49.0 // indirect - golang.org/x/sys v0.40.0 // indirect - golang.org/x/text v0.33.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20 // indirect + github.com/rs/zerolog v1.35.0 // indirect + golang.org/x/net v0.52.0 // indirect + golang.org/x/sys v0.42.0 // indirect + golang.org/x/text v0.35.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d // indirect ) diff --git a/go.sum b/go.sum index b401459..ada7fa8 100644 --- a/go.sum +++ b/go.sum @@ -1,66 +1,60 @@ github.com/aserto-dev/errors v0.0.17 h1:Jlb38zvMAEOhbl8SSt8pz0p4/r3wgRMNcnBtnhzhD2g= github.com/aserto-dev/errors v0.0.17/go.mod h1:42SHPNyCVOYYLgmz5KPvoc9GESAUuff0lN4S/hXLrz4= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 h1:X+2YciYSxvMQK0UZ7sg45ZVabVZBeBuvMkmuI2V3Fak= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7/go.mod h1:lW34nIZuQ8UDPdkon5fmfp2l3+ZkQ2me/+oecHYLOII= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 h1:HWRh5R2+9EifMyIHV7ZV+MIZqgz+PMpZ14Jynv3O2Zs= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0/go.mod h1:JfhWUomR1baixubs02l85lZYYOm7LV6om4ceouMv45c= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= -github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= -github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= +github.com/rs/zerolog v1.35.0 h1:VD0ykx7HMiMJytqINBsKcbLS+BJ4WYjz+05us+LRTdI= +github.com/rs/zerolog v1.35.0/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+jcw= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= -go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= -go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= -go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= -go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= -go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= -go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= -go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= -go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= -go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= -golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= -golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= +go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= +go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= +go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= +go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= +golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= -golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= -golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= -gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= -gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20 h1:7ei4lp52gK1uSejlA8AZl5AJjeLUOHBQscRQZUgAcu0= -google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20/go.mod h1:ZdbssH/1SOVnjnDlXzxDHK2MCidiqXtbYccJNzNYPEE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20 h1:Jr5R2J6F6qWyzINc+4AM8t5pfUz6beZpHp678GNrMbE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260203192932-546029d2fa20/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= -google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= -google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= +golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= +gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= +gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= +google.golang.org/genproto/googleapis/api v0.0.0-20260406210006-6f92a3bedf2d h1:/aDRtSZJjyLQzm75d+a1wOJaqyKBMvIAfeQmoa3ORiI= +google.golang.org/genproto/googleapis/api v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:etfGUgejTiadZAUaEP14NP97xi1RGeawqkjDARA/UOs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d h1:wT2n40TBqFY6wiwazVK9/iTWbsQrgk5ZfCSVFLO9LQA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM= +google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/makefile b/makefile index 587b44d..a7bf420 100644 --- a/makefile +++ b/makefile @@ -14,12 +14,12 @@ EXT_DIR := ${PWD}/.ext EXT_BIN_DIR := ${EXT_DIR}/bin EXT_TMP_DIR := ${EXT_DIR}/tmp -GO_VER := 1.25 -SVU_VER := 3.3.0 +GO_VER := 1.26 +SVU_VER := 3.3.0 GOTESTSUM_VER := 1.13.0 -GOLANGCI-LINT_VER := 2.6.2 -GORELEASER_VER := 2.9.0 -BUF_VER := 1.64.0 +GOLANGCI-LINT_VER := 2.11.4 +GORELEASER_VER := 2.14.1 +BUF_VER := 1.66.1 PROJECT := authorizer PROTO_REPO := pb-${PROJECT}