Documentation
¶
Overview ¶
Package authorizer is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAuthorizerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAuthorizerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthorizerClient) error
- func RegisterAuthorizerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthorizerServer) error
- func RegisterAuthorizerServer(s grpc.ServiceRegistrar, srv AuthorizerServer)
- type AuthorizerClient
- type AuthorizerServer
- type CompileRequest
- func (*CompileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CompileRequest) GetDisableInlining() []string
- func (x *CompileRequest) GetIdentityContext() *api.IdentityContext
- func (x *CompileRequest) GetInput() string
- func (x *CompileRequest) GetOptions() *QueryOptions
- func (x *CompileRequest) GetPolicyContext() *api.PolicyContext
- func (x *CompileRequest) GetPolicyInstance() *api.PolicyInstancedeprecated
- func (x *CompileRequest) GetQuery() string
- func (x *CompileRequest) GetResourceContext() *structpb.Struct
- func (x *CompileRequest) GetUnknowns() []string
- func (*CompileRequest) ProtoMessage()
- func (x *CompileRequest) ProtoReflect() protoreflect.Message
- func (x *CompileRequest) Reset()
- func (x *CompileRequest) String() string
- type CompileResponse
- func (*CompileResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CompileResponse) GetMetrics() *structpb.Struct
- func (x *CompileResponse) GetResult() *structpb.Struct
- func (x *CompileResponse) GetTrace() []*structpb.Struct
- func (x *CompileResponse) GetTraceSummary() []string
- func (*CompileResponse) ProtoMessage()
- func (x *CompileResponse) ProtoReflect() protoreflect.Message
- func (x *CompileResponse) Reset()
- func (x *CompileResponse) String() string
- type Decision
- type DecisionTreeOptions
- func (*DecisionTreeOptions) Descriptor() ([]byte, []int)deprecated
- func (x *DecisionTreeOptions) GetPathSeparator() PathSeparator
- func (*DecisionTreeOptions) ProtoMessage()
- func (x *DecisionTreeOptions) ProtoReflect() protoreflect.Message
- func (x *DecisionTreeOptions) Reset()
- func (x *DecisionTreeOptions) String() string
- type DecisionTreeRequest
- func (*DecisionTreeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DecisionTreeRequest) GetIdentityContext() *api.IdentityContext
- func (x *DecisionTreeRequest) GetOptions() *DecisionTreeOptions
- func (x *DecisionTreeRequest) GetPolicyContext() *api.PolicyContext
- func (x *DecisionTreeRequest) GetPolicyInstance() *api.PolicyInstancedeprecated
- func (x *DecisionTreeRequest) GetResourceContext() *structpb.Struct
- func (*DecisionTreeRequest) ProtoMessage()
- func (x *DecisionTreeRequest) ProtoReflect() protoreflect.Message
- func (x *DecisionTreeRequest) Reset()
- func (x *DecisionTreeRequest) String() string
- type DecisionTreeResponse
- func (*DecisionTreeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DecisionTreeResponse) GetPath() *structpb.Struct
- func (x *DecisionTreeResponse) GetPathRoot() string
- func (*DecisionTreeResponse) ProtoMessage()
- func (x *DecisionTreeResponse) ProtoReflect() protoreflect.Message
- func (x *DecisionTreeResponse) Reset()
- func (x *DecisionTreeResponse) String() string
- type GetPolicyRequest
- func (*GetPolicyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetPolicyRequest) GetFieldMask() *fieldmaskpb.FieldMask
- func (x *GetPolicyRequest) GetId() string
- func (x *GetPolicyRequest) GetPolicyInstance() *api.PolicyInstancedeprecated
- func (*GetPolicyRequest) ProtoMessage()
- func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message
- func (x *GetPolicyRequest) Reset()
- func (x *GetPolicyRequest) String() string
- type GetPolicyResponse
- func (*GetPolicyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetPolicyResponse) GetResult() *api.Module
- func (*GetPolicyResponse) ProtoMessage()
- func (x *GetPolicyResponse) ProtoReflect() protoreflect.Message
- func (x *GetPolicyResponse) Reset()
- func (x *GetPolicyResponse) String() string
- type InfoRequest
- type InfoResponse
- func (*InfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InfoResponse) GetArch() string
- func (x *InfoResponse) GetCommit() string
- func (x *InfoResponse) GetDate() string
- func (x *InfoResponse) GetOs() string
- func (x *InfoResponse) GetVersion() string
- func (*InfoResponse) ProtoMessage()
- func (x *InfoResponse) ProtoReflect() protoreflect.Message
- func (x *InfoResponse) Reset()
- func (x *InfoResponse) String() string
- type IsRequest
- func (*IsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *IsRequest) GetIdentityContext() *api.IdentityContext
- func (x *IsRequest) GetPolicyContext() *api.PolicyContext
- func (x *IsRequest) GetPolicyInstance() *api.PolicyInstancedeprecated
- func (x *IsRequest) GetResourceContext() *structpb.Struct
- func (*IsRequest) ProtoMessage()
- func (x *IsRequest) ProtoReflect() protoreflect.Message
- func (x *IsRequest) Reset()
- func (x *IsRequest) String() string
- type IsResponse
- type ListPoliciesRequest
- func (*ListPoliciesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListPoliciesRequest) GetFieldMask() *fieldmaskpb.FieldMask
- func (x *ListPoliciesRequest) GetPolicyInstance() *api.PolicyInstancedeprecated
- func (*ListPoliciesRequest) ProtoMessage()
- func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message
- func (x *ListPoliciesRequest) Reset()
- func (x *ListPoliciesRequest) String() string
- type ListPoliciesResponse
- func (*ListPoliciesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListPoliciesResponse) GetResult() []*api.Module
- func (*ListPoliciesResponse) ProtoMessage()
- func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message
- func (x *ListPoliciesResponse) Reset()
- func (x *ListPoliciesResponse) String() string
- type PathSeparator
- func (PathSeparator) Descriptor() protoreflect.EnumDescriptor
- func (x PathSeparator) Enum() *PathSeparator
- func (PathSeparator) EnumDescriptor() ([]byte, []int)deprecated
- func (x PathSeparator) Number() protoreflect.EnumNumber
- func (x PathSeparator) String() string
- func (PathSeparator) Type() protoreflect.EnumType
- type QueryOptions
- func (*QueryOptions) Descriptor() ([]byte, []int)deprecated
- func (x *QueryOptions) GetInstrument() bool
- func (x *QueryOptions) GetMetrics() bool
- func (x *QueryOptions) GetTrace() TraceLevel
- func (x *QueryOptions) GetTraceSummary() bool
- func (*QueryOptions) ProtoMessage()
- func (x *QueryOptions) ProtoReflect() protoreflect.Message
- func (x *QueryOptions) Reset()
- func (x *QueryOptions) String() string
- type QueryRequest
- func (*QueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRequest) GetIdentityContext() *api.IdentityContext
- func (x *QueryRequest) GetInput() string
- func (x *QueryRequest) GetOptions() *QueryOptions
- func (x *QueryRequest) GetPolicyContext() *api.PolicyContext
- func (x *QueryRequest) GetPolicyInstance() *api.PolicyInstancedeprecated
- func (x *QueryRequest) GetQuery() string
- func (x *QueryRequest) GetResourceContext() *structpb.Struct
- func (*QueryRequest) ProtoMessage()
- func (x *QueryRequest) ProtoReflect() protoreflect.Message
- func (x *QueryRequest) Reset()
- func (x *QueryRequest) String() string
- type QueryResponse
- func (*QueryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryResponse) GetMetrics() *structpb.Struct
- func (x *QueryResponse) GetResponse() *structpb.Struct
- func (x *QueryResponse) GetTrace() []*structpb.Struct
- func (x *QueryResponse) GetTraceSummary() []string
- func (*QueryResponse) ProtoMessage()
- func (x *QueryResponse) ProtoReflect() protoreflect.Message
- func (x *QueryResponse) Reset()
- func (x *QueryResponse) String() string
- type TraceLevel
- type UnimplementedAuthorizerServer
- func (UnimplementedAuthorizerServer) Compile(context.Context, *CompileRequest) (*CompileResponse, error)
- func (UnimplementedAuthorizerServer) DecisionTree(context.Context, *DecisionTreeRequest) (*DecisionTreeResponse, error)
- func (UnimplementedAuthorizerServer) GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error)
- func (UnimplementedAuthorizerServer) Info(context.Context, *InfoRequest) (*InfoResponse, error)
- func (UnimplementedAuthorizerServer) Is(context.Context, *IsRequest) (*IsResponse, error)
- func (UnimplementedAuthorizerServer) ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error)
- func (UnimplementedAuthorizerServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)
- type UnsafeAuthorizerServer
Constants ¶
const ( Authorizer_DecisionTree_FullMethodName = "/aserto.authorizer.v2.Authorizer/DecisionTree" Authorizer_Is_FullMethodName = "/aserto.authorizer.v2.Authorizer/Is" Authorizer_Query_FullMethodName = "/aserto.authorizer.v2.Authorizer/Query" Authorizer_Compile_FullMethodName = "/aserto.authorizer.v2.Authorizer/Compile" Authorizer_ListPolicies_FullMethodName = "/aserto.authorizer.v2.Authorizer/ListPolicies" Authorizer_GetPolicy_FullMethodName = "/aserto.authorizer.v2.Authorizer/GetPolicy" Authorizer_Info_FullMethodName = "/aserto.authorizer.v2.Authorizer/Info" )
Variables ¶
var ( PathSeparator_name = map[int32]string{ 0: "PATH_SEPARATOR_UNKNOWN", 1: "PATH_SEPARATOR_DOT", 2: "PATH_SEPARATOR_SLASH", } PathSeparator_value = map[string]int32{ "PATH_SEPARATOR_UNKNOWN": 0, "PATH_SEPARATOR_DOT": 1, "PATH_SEPARATOR_SLASH": 2, } )
Enum value maps for PathSeparator.
var ( TraceLevel_name = map[int32]string{ 0: "TRACE_LEVEL_UNKNOWN", 1: "TRACE_LEVEL_OFF", 2: "TRACE_LEVEL_FULL", 3: "TRACE_LEVEL_NOTES", 4: "TRACE_LEVEL_FAILS", } TraceLevel_value = map[string]int32{ "TRACE_LEVEL_UNKNOWN": 0, "TRACE_LEVEL_OFF": 1, "TRACE_LEVEL_FULL": 2, "TRACE_LEVEL_NOTES": 3, "TRACE_LEVEL_FAILS": 4, } )
Enum value maps for TraceLevel.
var Authorizer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "aserto.authorizer.v2.Authorizer", HandlerType: (*AuthorizerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DecisionTree", Handler: _Authorizer_DecisionTree_Handler, }, { MethodName: "Is", Handler: _Authorizer_Is_Handler, }, { MethodName: "Query", Handler: _Authorizer_Query_Handler, }, { MethodName: "Compile", Handler: _Authorizer_Compile_Handler, }, { MethodName: "ListPolicies", Handler: _Authorizer_ListPolicies_Handler, }, { MethodName: "GetPolicy", Handler: _Authorizer_GetPolicy_Handler, }, { MethodName: "Info", Handler: _Authorizer_Info_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "v2/authorizer.proto", }
Authorizer_ServiceDesc is the grpc.ServiceDesc for Authorizer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAuthorizerHandler ¶
func RegisterAuthorizerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAuthorizerHandler registers the http handlers for service Authorizer to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthorizerHandlerClient ¶
func RegisterAuthorizerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthorizerClient) error
RegisterAuthorizerHandlerClient registers the http handlers for service Authorizer to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthorizerClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthorizerClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthorizerClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterAuthorizerHandlerFromEndpoint ¶
func RegisterAuthorizerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAuthorizerHandlerFromEndpoint is same as RegisterAuthorizerHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthorizerHandlerServer ¶
func RegisterAuthorizerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthorizerServer) error
RegisterAuthorizerHandlerServer registers the http handlers for service Authorizer to "mux". UnaryRPC :call AuthorizerServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthorizerHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterAuthorizerServer ¶
func RegisterAuthorizerServer(s grpc.ServiceRegistrar, srv AuthorizerServer)
Types ¶
type AuthorizerClient ¶
type AuthorizerClient interface {
// Deprecated: Do not use.
DecisionTree(ctx context.Context, in *DecisionTreeRequest, opts ...grpc.CallOption) (*DecisionTreeResponse, error)
Is(ctx context.Context, in *IsRequest, opts ...grpc.CallOption) (*IsResponse, error)
Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
Compile(ctx context.Context, in *CompileRequest, opts ...grpc.CallOption) (*CompileResponse, error)
ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error)
GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error)
Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
}
AuthorizerClient is the client API for Authorizer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAuthorizerClient ¶
func NewAuthorizerClient(cc grpc.ClientConnInterface) AuthorizerClient
type AuthorizerServer ¶
type AuthorizerServer interface {
// Deprecated: Do not use.
DecisionTree(context.Context, *DecisionTreeRequest) (*DecisionTreeResponse, error)
Is(context.Context, *IsRequest) (*IsResponse, error)
Query(context.Context, *QueryRequest) (*QueryResponse, error)
Compile(context.Context, *CompileRequest) (*CompileResponse, error)
ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error)
GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error)
Info(context.Context, *InfoRequest) (*InfoResponse, error)
}
AuthorizerServer is the server API for Authorizer service. All implementations should embed UnimplementedAuthorizerServer for forward compatibility.
type CompileRequest ¶
type CompileRequest struct {
// query
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
// input block
Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"`
// unknowns
Unknowns []string `protobuf:"bytes,3,rep,name=unknowns,proto3" json:"unknowns,omitempty"`
// disable inlining
DisableInlining []string `protobuf:"bytes,4,rep,name=disable_inlining,proto3" json:"disable_inlining,omitempty"`
// query options
Options *QueryOptions `protobuf:"bytes,5,opt,name=options,proto3,oneof" json:"options,omitempty"`
// policy context
PolicyContext *api.PolicyContext `protobuf:"bytes,6,opt,name=policy_context,proto3,oneof" json:"policy_context,omitempty"`
// identity context
IdentityContext *api.IdentityContext `protobuf:"bytes,7,opt,name=identity_context,proto3,oneof" json:"identity_context,omitempty"`
// resource context
ResourceContext *structpb.Struct `protobuf:"bytes,8,opt,name=resource_context,proto3,oneof" json:"resource_context,omitempty"`
// policy instance
//
// Deprecated: Marked as deprecated in v2/authorizer.proto.
PolicyInstance *api.PolicyInstance `protobuf:"bytes,9,opt,name=policy_instance,proto3,oneof" json:"policy_instance,omitempty"`
// contains filtered or unexported fields
}
func (*CompileRequest) Descriptor
deprecated
func (*CompileRequest) Descriptor() ([]byte, []int)
Deprecated: Use CompileRequest.ProtoReflect.Descriptor instead.
func (*CompileRequest) GetDisableInlining ¶
func (x *CompileRequest) GetDisableInlining() []string
func (*CompileRequest) GetIdentityContext ¶
func (x *CompileRequest) GetIdentityContext() *api.IdentityContext
func (*CompileRequest) GetInput ¶
func (x *CompileRequest) GetInput() string
func (*CompileRequest) GetOptions ¶
func (x *CompileRequest) GetOptions() *QueryOptions
func (*CompileRequest) GetPolicyContext ¶
func (x *CompileRequest) GetPolicyContext() *api.PolicyContext
func (*CompileRequest) GetPolicyInstance
deprecated
func (x *CompileRequest) GetPolicyInstance() *api.PolicyInstance
Deprecated: Marked as deprecated in v2/authorizer.proto.
func (*CompileRequest) GetQuery ¶
func (x *CompileRequest) GetQuery() string
func (*CompileRequest) GetResourceContext ¶
func (x *CompileRequest) GetResourceContext() *structpb.Struct
func (*CompileRequest) GetUnknowns ¶
func (x *CompileRequest) GetUnknowns() []string
func (*CompileRequest) ProtoMessage ¶
func (*CompileRequest) ProtoMessage()
func (*CompileRequest) ProtoReflect ¶
func (x *CompileRequest) ProtoReflect() protoreflect.Message
func (*CompileRequest) Reset ¶
func (x *CompileRequest) Reset()
func (*CompileRequest) String ¶
func (x *CompileRequest) String() string
type CompileResponse ¶
type CompileResponse struct {
Result *structpb.Struct `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
Metrics *structpb.Struct `protobuf:"bytes,2,opt,name=metrics,proto3" json:"metrics,omitempty"`
Trace []*structpb.Struct `protobuf:"bytes,3,rep,name=trace,proto3" json:"trace,omitempty"`
TraceSummary []string `protobuf:"bytes,4,rep,name=trace_summary,proto3" json:"trace_summary,omitempty"`
// contains filtered or unexported fields
}
func (*CompileResponse) Descriptor
deprecated
func (*CompileResponse) Descriptor() ([]byte, []int)
Deprecated: Use CompileResponse.ProtoReflect.Descriptor instead.
func (*CompileResponse) GetMetrics ¶
func (x *CompileResponse) GetMetrics() *structpb.Struct
func (*CompileResponse) GetResult ¶
func (x *CompileResponse) GetResult() *structpb.Struct
func (*CompileResponse) GetTrace ¶
func (x *CompileResponse) GetTrace() []*structpb.Struct
func (*CompileResponse) GetTraceSummary ¶
func (x *CompileResponse) GetTraceSummary() []string
func (*CompileResponse) ProtoMessage ¶
func (*CompileResponse) ProtoMessage()
func (*CompileResponse) ProtoReflect ¶
func (x *CompileResponse) ProtoReflect() protoreflect.Message
func (*CompileResponse) Reset ¶
func (x *CompileResponse) Reset()
func (*CompileResponse) String ¶
func (x *CompileResponse) String() string
type Decision ¶
type Decision struct {
// decision
Decision string `protobuf:"bytes,1,opt,name=decision,proto3" json:"decision,omitempty"`
// is (decision outcome)
Is bool `protobuf:"varint,2,opt,name=is,json=ise,proto3" json:"is,omitempty"`
// contains filtered or unexported fields
}
func (*Decision) Descriptor
deprecated
func (*Decision) GetDecision ¶
func (*Decision) ProtoMessage ¶
func (*Decision) ProtoMessage()
func (*Decision) ProtoReflect ¶
func (x *Decision) ProtoReflect() protoreflect.Message
type DecisionTreeOptions ¶
type DecisionTreeOptions struct {
PathSeparator PathSeparator `protobuf:"varint,1,opt,name=path_separator,proto3,enum=aserto.authorizer.v2.PathSeparator" json:"path_separator,omitempty"`
// contains filtered or unexported fields
}
func (*DecisionTreeOptions) Descriptor
deprecated
func (*DecisionTreeOptions) Descriptor() ([]byte, []int)
Deprecated: Use DecisionTreeOptions.ProtoReflect.Descriptor instead.
func (*DecisionTreeOptions) GetPathSeparator ¶
func (x *DecisionTreeOptions) GetPathSeparator() PathSeparator
func (*DecisionTreeOptions) ProtoMessage ¶
func (*DecisionTreeOptions) ProtoMessage()
func (*DecisionTreeOptions) ProtoReflect ¶
func (x *DecisionTreeOptions) ProtoReflect() protoreflect.Message
func (*DecisionTreeOptions) Reset ¶
func (x *DecisionTreeOptions) Reset()
func (*DecisionTreeOptions) String ¶
func (x *DecisionTreeOptions) String() string
type DecisionTreeRequest ¶
type DecisionTreeRequest struct {
// policy context
PolicyContext *api.PolicyContext `protobuf:"bytes,1,opt,name=policy_context,proto3" json:"policy_context,omitempty"`
// identity context
IdentityContext *api.IdentityContext `protobuf:"bytes,2,opt,name=identity_context,proto3" json:"identity_context,omitempty"`
// decision tree options
Options *DecisionTreeOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
// resource context
ResourceContext *structpb.Struct `protobuf:"bytes,4,opt,name=resource_context,proto3" json:"resource_context,omitempty"`
// policy instance
//
// Deprecated: Marked as deprecated in v2/authorizer.proto.
PolicyInstance *api.PolicyInstance `protobuf:"bytes,5,opt,name=policy_instance,proto3,oneof" json:"policy_instance,omitempty"`
// contains filtered or unexported fields
}
func (*DecisionTreeRequest) Descriptor
deprecated
func (*DecisionTreeRequest) Descriptor() ([]byte, []int)
Deprecated: Use DecisionTreeRequest.ProtoReflect.Descriptor instead.
func (*DecisionTreeRequest) GetIdentityContext ¶
func (x *DecisionTreeRequest) GetIdentityContext() *api.IdentityContext
func (*DecisionTreeRequest) GetOptions ¶
func (x *DecisionTreeRequest) GetOptions() *DecisionTreeOptions
func (*DecisionTreeRequest) GetPolicyContext ¶
func (x *DecisionTreeRequest) GetPolicyContext() *api.PolicyContext
func (*DecisionTreeRequest) GetPolicyInstance
deprecated
func (x *DecisionTreeRequest) GetPolicyInstance() *api.PolicyInstance
Deprecated: Marked as deprecated in v2/authorizer.proto.
func (*DecisionTreeRequest) GetResourceContext ¶
func (x *DecisionTreeRequest) GetResourceContext() *structpb.Struct
func (*DecisionTreeRequest) ProtoMessage ¶
func (*DecisionTreeRequest) ProtoMessage()
func (*DecisionTreeRequest) ProtoReflect ¶
func (x *DecisionTreeRequest) ProtoReflect() protoreflect.Message
func (*DecisionTreeRequest) Reset ¶
func (x *DecisionTreeRequest) Reset()
func (*DecisionTreeRequest) String ¶
func (x *DecisionTreeRequest) String() string
type DecisionTreeResponse ¶
type DecisionTreeResponse struct {
// path root
PathRoot string `protobuf:"bytes,1,opt,name=path_root,proto3" json:"path_root,omitempty"`
// path
Path *structpb.Struct `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
// contains filtered or unexported fields
}
func (*DecisionTreeResponse) Descriptor
deprecated
func (*DecisionTreeResponse) Descriptor() ([]byte, []int)
Deprecated: Use DecisionTreeResponse.ProtoReflect.Descriptor instead.
func (*DecisionTreeResponse) GetPath ¶
func (x *DecisionTreeResponse) GetPath() *structpb.Struct
func (*DecisionTreeResponse) GetPathRoot ¶
func (x *DecisionTreeResponse) GetPathRoot() string
func (*DecisionTreeResponse) ProtoMessage ¶
func (*DecisionTreeResponse) ProtoMessage()
func (*DecisionTreeResponse) ProtoReflect ¶
func (x *DecisionTreeResponse) ProtoReflect() protoreflect.Message
func (*DecisionTreeResponse) Reset ¶
func (x *DecisionTreeResponse) Reset()
func (*DecisionTreeResponse) String ¶
func (x *DecisionTreeResponse) String() string
type GetPolicyRequest ¶
type GetPolicyRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=field_mask,proto3" json:"field_mask,omitempty"`
// Deprecated: Marked as deprecated in v2/authorizer.proto.
PolicyInstance *api.PolicyInstance `protobuf:"bytes,3,opt,name=policy_instance,proto3,oneof" json:"policy_instance,omitempty"`
// contains filtered or unexported fields
}
func (*GetPolicyRequest) Descriptor
deprecated
func (*GetPolicyRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPolicyRequest.ProtoReflect.Descriptor instead.
func (*GetPolicyRequest) GetFieldMask ¶
func (x *GetPolicyRequest) GetFieldMask() *fieldmaskpb.FieldMask
func (*GetPolicyRequest) GetId ¶
func (x *GetPolicyRequest) GetId() string
func (*GetPolicyRequest) GetPolicyInstance
deprecated
func (x *GetPolicyRequest) GetPolicyInstance() *api.PolicyInstance
Deprecated: Marked as deprecated in v2/authorizer.proto.
func (*GetPolicyRequest) ProtoMessage ¶
func (*GetPolicyRequest) ProtoMessage()
func (*GetPolicyRequest) ProtoReflect ¶
func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message
func (*GetPolicyRequest) Reset ¶
func (x *GetPolicyRequest) Reset()
func (*GetPolicyRequest) String ¶
func (x *GetPolicyRequest) String() string
type GetPolicyResponse ¶
type GetPolicyResponse struct {
Result *api.Module `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
// contains filtered or unexported fields
}
func (*GetPolicyResponse) Descriptor
deprecated
func (*GetPolicyResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPolicyResponse.ProtoReflect.Descriptor instead.
func (*GetPolicyResponse) GetResult ¶
func (x *GetPolicyResponse) GetResult() *api.Module
func (*GetPolicyResponse) ProtoMessage ¶
func (*GetPolicyResponse) ProtoMessage()
func (*GetPolicyResponse) ProtoReflect ¶
func (x *GetPolicyResponse) ProtoReflect() protoreflect.Message
func (*GetPolicyResponse) Reset ¶
func (x *GetPolicyResponse) Reset()
func (*GetPolicyResponse) String ¶
func (x *GetPolicyResponse) String() string
type InfoRequest ¶
type InfoRequest struct {
// contains filtered or unexported fields
}
func (*InfoRequest) Descriptor
deprecated
func (*InfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.
func (*InfoRequest) ProtoMessage ¶
func (*InfoRequest) ProtoMessage()
func (*InfoRequest) ProtoReflect ¶
func (x *InfoRequest) ProtoReflect() protoreflect.Message
func (*InfoRequest) Reset ¶
func (x *InfoRequest) Reset()
func (*InfoRequest) String ¶
func (x *InfoRequest) String() string
type InfoResponse ¶
type InfoResponse struct {
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
Commit string `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
Date string `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"`
Os string `protobuf:"bytes,4,opt,name=os,proto3" json:"os,omitempty"`
Arch string `protobuf:"bytes,5,opt,name=arch,proto3" json:"arch,omitempty"`
// contains filtered or unexported fields
}
func (*InfoResponse) Descriptor
deprecated
func (*InfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.
func (*InfoResponse) GetArch ¶
func (x *InfoResponse) GetArch() string
func (*InfoResponse) GetCommit ¶
func (x *InfoResponse) GetCommit() string
func (*InfoResponse) GetDate ¶
func (x *InfoResponse) GetDate() string
func (*InfoResponse) GetOs ¶
func (x *InfoResponse) GetOs() string
func (*InfoResponse) GetVersion ¶
func (x *InfoResponse) GetVersion() string
func (*InfoResponse) ProtoMessage ¶
func (*InfoResponse) ProtoMessage()
func (*InfoResponse) ProtoReflect ¶
func (x *InfoResponse) ProtoReflect() protoreflect.Message
func (*InfoResponse) Reset ¶
func (x *InfoResponse) Reset()
func (*InfoResponse) String ¶
func (x *InfoResponse) String() string
type IsRequest ¶
type IsRequest struct {
// policy context
PolicyContext *api.PolicyContext `protobuf:"bytes,1,opt,name=policy_context,proto3" json:"policy_context,omitempty"`
// identity context
IdentityContext *api.IdentityContext `protobuf:"bytes,2,opt,name=identity_context,proto3" json:"identity_context,omitempty"`
// resource context
ResourceContext *structpb.Struct `protobuf:"bytes,3,opt,name=resource_context,proto3" json:"resource_context,omitempty"`
// policy instance
//
// Deprecated: Marked as deprecated in v2/authorizer.proto.
PolicyInstance *api.PolicyInstance `protobuf:"bytes,4,opt,name=policy_instance,proto3,oneof" json:"policy_instance,omitempty"`
// contains filtered or unexported fields
}
func (*IsRequest) Descriptor
deprecated
func (*IsRequest) GetIdentityContext ¶
func (x *IsRequest) GetIdentityContext() *api.IdentityContext
func (*IsRequest) GetPolicyContext ¶
func (x *IsRequest) GetPolicyContext() *api.PolicyContext
func (*IsRequest) GetPolicyInstance
deprecated
func (x *IsRequest) GetPolicyInstance() *api.PolicyInstance
Deprecated: Marked as deprecated in v2/authorizer.proto.
func (*IsRequest) GetResourceContext ¶
func (*IsRequest) ProtoMessage ¶
func (*IsRequest) ProtoMessage()
func (*IsRequest) ProtoReflect ¶
func (x *IsRequest) ProtoReflect() protoreflect.Message
type IsResponse ¶
type IsResponse struct {
// decisions
Decisions []*Decision `protobuf:"bytes,1,rep,name=decisions,proto3" json:"decisions,omitempty"`
// contains filtered or unexported fields
}
func (*IsResponse) Descriptor
deprecated
func (*IsResponse) Descriptor() ([]byte, []int)
Deprecated: Use IsResponse.ProtoReflect.Descriptor instead.
func (*IsResponse) GetDecisions ¶
func (x *IsResponse) GetDecisions() []*Decision
func (*IsResponse) ProtoMessage ¶
func (*IsResponse) ProtoMessage()
func (*IsResponse) ProtoReflect ¶
func (x *IsResponse) ProtoReflect() protoreflect.Message
func (*IsResponse) Reset ¶
func (x *IsResponse) Reset()
func (*IsResponse) String ¶
func (x *IsResponse) String() string
type ListPoliciesRequest ¶
type ListPoliciesRequest struct {
FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=field_mask,proto3" json:"field_mask,omitempty"`
// Deprecated: Marked as deprecated in v2/authorizer.proto.
PolicyInstance *api.PolicyInstance `protobuf:"bytes,2,opt,name=policy_instance,proto3,oneof" json:"policy_instance,omitempty"`
// contains filtered or unexported fields
}
func (*ListPoliciesRequest) Descriptor
deprecated
func (*ListPoliciesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListPoliciesRequest.ProtoReflect.Descriptor instead.
func (*ListPoliciesRequest) GetFieldMask ¶
func (x *ListPoliciesRequest) GetFieldMask() *fieldmaskpb.FieldMask
func (*ListPoliciesRequest) GetPolicyInstance
deprecated
func (x *ListPoliciesRequest) GetPolicyInstance() *api.PolicyInstance
Deprecated: Marked as deprecated in v2/authorizer.proto.
func (*ListPoliciesRequest) ProtoMessage ¶
func (*ListPoliciesRequest) ProtoMessage()
func (*ListPoliciesRequest) ProtoReflect ¶
func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message
func (*ListPoliciesRequest) Reset ¶
func (x *ListPoliciesRequest) Reset()
func (*ListPoliciesRequest) String ¶
func (x *ListPoliciesRequest) String() string
type ListPoliciesResponse ¶
type ListPoliciesResponse struct {
Result []*api.Module `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"`
// contains filtered or unexported fields
}
func (*ListPoliciesResponse) Descriptor
deprecated
func (*ListPoliciesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListPoliciesResponse.ProtoReflect.Descriptor instead.
func (*ListPoliciesResponse) GetResult ¶
func (x *ListPoliciesResponse) GetResult() []*api.Module
func (*ListPoliciesResponse) ProtoMessage ¶
func (*ListPoliciesResponse) ProtoMessage()
func (*ListPoliciesResponse) ProtoReflect ¶
func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message
func (*ListPoliciesResponse) Reset ¶
func (x *ListPoliciesResponse) Reset()
func (*ListPoliciesResponse) String ¶
func (x *ListPoliciesResponse) String() string
type PathSeparator ¶
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 separator )
func (PathSeparator) Descriptor ¶
func (PathSeparator) Descriptor() protoreflect.EnumDescriptor
func (PathSeparator) Enum ¶
func (x PathSeparator) Enum() *PathSeparator
func (PathSeparator) EnumDescriptor
deprecated
func (PathSeparator) EnumDescriptor() ([]byte, []int)
Deprecated: Use PathSeparator.Descriptor instead.
func (PathSeparator) Number ¶
func (x PathSeparator) Number() protoreflect.EnumNumber
func (PathSeparator) String ¶
func (x PathSeparator) String() string
func (PathSeparator) Type ¶
func (PathSeparator) Type() protoreflect.EnumType
type QueryOptions ¶
type QueryOptions struct {
// metrics (default false)
Metrics bool `protobuf:"varint,1,opt,name=metrics,proto3" json:"metrics,omitempty"`
// instrument (default false)
Instrument bool `protobuf:"varint,2,opt,name=instrument,proto3" json:"instrument,omitempty"` // default false
// trace level (default ExplainOffV1)
Trace TraceLevel `protobuf:"varint,3,opt,name=trace,proto3,enum=aserto.authorizer.v2.TraceLevel" json:"trace,omitempty"`
// trace summary (default false)
TraceSummary bool `protobuf:"varint,4,opt,name=trace_summary,proto3" json:"trace_summary,omitempty"`
// contains filtered or unexported fields
}
func (*QueryOptions) Descriptor
deprecated
func (*QueryOptions) Descriptor() ([]byte, []int)
Deprecated: Use QueryOptions.ProtoReflect.Descriptor instead.
func (*QueryOptions) GetInstrument ¶
func (x *QueryOptions) GetInstrument() bool
func (*QueryOptions) GetMetrics ¶
func (x *QueryOptions) GetMetrics() bool
func (*QueryOptions) GetTrace ¶
func (x *QueryOptions) GetTrace() TraceLevel
func (*QueryOptions) GetTraceSummary ¶
func (x *QueryOptions) GetTraceSummary() bool
func (*QueryOptions) ProtoMessage ¶
func (*QueryOptions) ProtoMessage()
func (*QueryOptions) ProtoReflect ¶
func (x *QueryOptions) ProtoReflect() protoreflect.Message
func (*QueryOptions) Reset ¶
func (x *QueryOptions) Reset()
func (*QueryOptions) String ¶
func (x *QueryOptions) String() string
type QueryRequest ¶
type QueryRequest struct {
// query
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
// query input block
Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"`
// query options
Options *QueryOptions `protobuf:"bytes,3,opt,name=options,proto3,oneof" json:"options,omitempty"`
// policy context
PolicyContext *api.PolicyContext `protobuf:"bytes,4,opt,name=policy_context,proto3,oneof" json:"policy_context,omitempty"`
// identity context
IdentityContext *api.IdentityContext `protobuf:"bytes,5,opt,name=identity_context,proto3,oneof" json:"identity_context,omitempty"`
// resource context
ResourceContext *structpb.Struct `protobuf:"bytes,6,opt,name=resource_context,proto3,oneof" json:"resource_context,omitempty"`
// policy instance
//
// Deprecated: Marked as deprecated in v2/authorizer.proto.
PolicyInstance *api.PolicyInstance `protobuf:"bytes,7,opt,name=policy_instance,proto3,oneof" json:"policy_instance,omitempty"`
// contains filtered or unexported fields
}
func (*QueryRequest) Descriptor
deprecated
func (*QueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
func (*QueryRequest) GetIdentityContext ¶
func (x *QueryRequest) GetIdentityContext() *api.IdentityContext
func (*QueryRequest) GetInput ¶
func (x *QueryRequest) GetInput() string
func (*QueryRequest) GetOptions ¶
func (x *QueryRequest) GetOptions() *QueryOptions
func (*QueryRequest) GetPolicyContext ¶
func (x *QueryRequest) GetPolicyContext() *api.PolicyContext
func (*QueryRequest) GetPolicyInstance
deprecated
func (x *QueryRequest) GetPolicyInstance() *api.PolicyInstance
Deprecated: Marked as deprecated in v2/authorizer.proto.
func (*QueryRequest) GetQuery ¶
func (x *QueryRequest) GetQuery() string
func (*QueryRequest) GetResourceContext ¶
func (x *QueryRequest) GetResourceContext() *structpb.Struct
func (*QueryRequest) ProtoMessage ¶
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) ProtoReflect ¶
func (x *QueryRequest) ProtoReflect() protoreflect.Message
func (*QueryRequest) Reset ¶
func (x *QueryRequest) Reset()
func (*QueryRequest) String ¶
func (x *QueryRequest) String() string
type QueryResponse ¶
type QueryResponse struct {
// query response
Response *structpb.Struct `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
// metrics
Metrics *structpb.Struct `protobuf:"bytes,2,opt,name=metrics,proto3" json:"metrics,omitempty"`
// trace
Trace []*structpb.Struct `protobuf:"bytes,3,rep,name=trace,proto3" json:"trace,omitempty"`
// trace summary
TraceSummary []string `protobuf:"bytes,4,rep,name=trace_summary,proto3" json:"trace_summary,omitempty"`
// contains filtered or unexported fields
}
func (*QueryResponse) Descriptor
deprecated
func (*QueryResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.
func (*QueryResponse) GetMetrics ¶
func (x *QueryResponse) GetMetrics() *structpb.Struct
func (*QueryResponse) GetResponse ¶
func (x *QueryResponse) GetResponse() *structpb.Struct
func (*QueryResponse) GetTrace ¶
func (x *QueryResponse) GetTrace() []*structpb.Struct
func (*QueryResponse) GetTraceSummary ¶
func (x *QueryResponse) GetTraceSummary() []string
func (*QueryResponse) ProtoMessage ¶
func (*QueryResponse) ProtoMessage()
func (*QueryResponse) ProtoReflect ¶
func (x *QueryResponse) ProtoReflect() protoreflect.Message
func (*QueryResponse) Reset ¶
func (x *QueryResponse) Reset()
func (*QueryResponse) String ¶
func (x *QueryResponse) String() string
type TraceLevel ¶
type TraceLevel int32
const ( TraceLevel_TRACE_LEVEL_UNKNOWN TraceLevel = 0 // Value not set. TraceLevel_TRACE_LEVEL_OFF TraceLevel = 1 // ExplainOffV1 ExplainModeV1 = "off" TraceLevel_TRACE_LEVEL_FULL TraceLevel = 2 // ExplainFullV1 ExplainModeV1 = "full" TraceLevel_TRACE_LEVEL_NOTES TraceLevel = 3 // ExplainNotesV1 ExplainModeV1 = "notes" TraceLevel_TRACE_LEVEL_FAILS TraceLevel = 4 // ExplainFailsV1 ExplainModeV1 = "fails" )
func (TraceLevel) Descriptor ¶
func (TraceLevel) Descriptor() protoreflect.EnumDescriptor
func (TraceLevel) Enum ¶
func (x TraceLevel) Enum() *TraceLevel
func (TraceLevel) EnumDescriptor
deprecated
func (TraceLevel) EnumDescriptor() ([]byte, []int)
Deprecated: Use TraceLevel.Descriptor instead.
func (TraceLevel) Number ¶
func (x TraceLevel) Number() protoreflect.EnumNumber
func (TraceLevel) String ¶
func (x TraceLevel) String() string
func (TraceLevel) Type ¶
func (TraceLevel) Type() protoreflect.EnumType
type UnimplementedAuthorizerServer ¶
type UnimplementedAuthorizerServer struct{}
UnimplementedAuthorizerServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAuthorizerServer) Compile ¶
func (UnimplementedAuthorizerServer) Compile(context.Context, *CompileRequest) (*CompileResponse, error)
func (UnimplementedAuthorizerServer) DecisionTree ¶
func (UnimplementedAuthorizerServer) DecisionTree(context.Context, *DecisionTreeRequest) (*DecisionTreeResponse, error)
func (UnimplementedAuthorizerServer) GetPolicy ¶
func (UnimplementedAuthorizerServer) GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error)
func (UnimplementedAuthorizerServer) Info ¶
func (UnimplementedAuthorizerServer) Info(context.Context, *InfoRequest) (*InfoResponse, error)
func (UnimplementedAuthorizerServer) Is ¶
func (UnimplementedAuthorizerServer) Is(context.Context, *IsRequest) (*IsResponse, error)
func (UnimplementedAuthorizerServer) ListPolicies ¶
func (UnimplementedAuthorizerServer) ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error)
func (UnimplementedAuthorizerServer) Query ¶
func (UnimplementedAuthorizerServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)
type UnsafeAuthorizerServer ¶
type UnsafeAuthorizerServer interface {
// contains filtered or unexported methods
}
UnsafeAuthorizerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthorizerServer will result in compilation errors.