idspb

package
v0.0.0-...-d3da680 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package idspb contains Spike's Intrusion Detection System (IDS) API.

Index

Constants

View Source
const (
	Inspect_InspectionReport_FullMethodName = "/spike.ids.Inspect/InspectionReport"
)

Variables

View Source
var File_go_chromium_org_luci_provenance_api_spikepb_ids_inspect_proto protoreflect.FileDescriptor
View Source
var Inspect_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "spike.ids.Inspect",
	HandlerType: (*InspectServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "InspectionReport",
			Handler:    _Inspect_InspectionReport_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "go.chromium.org/luci/provenance/api/spikepb/ids/inspect.proto",
}

Inspect_ServiceDesc is the grpc.ServiceDesc for Inspect service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptorpb.FileDescriptorSet

FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.

Will not return nil.

Do NOT modify the returned descriptor.

func RegisterInspectServer

func RegisterInspectServer(s grpc.ServiceRegistrar, srv InspectServer)

Types

type Details

type Details struct {

	// Types that are assignable to Material:
	//
	//	*Details_Sample
	//	*Details_NetworkProxy
	Material isDetails_Material `protobuf_oneof:"material"`
	// contains filtered or unexported fields
}

Details will have the information policy wants to export. It will have unique information depending upon the policy.

func (*Details) Descriptor deprecated

func (*Details) Descriptor() ([]byte, []int)

Deprecated: Use Details.ProtoReflect.Descriptor instead.

func (*Details) GetMaterial

func (m *Details) GetMaterial() isDetails_Material

func (*Details) GetNetworkProxy

func (x *Details) GetNetworkProxy() *NetworkProxy

func (*Details) GetSample

func (x *Details) GetSample() *Sample

func (*Details) ProtoMessage

func (*Details) ProtoMessage()

func (*Details) ProtoReflect

func (x *Details) ProtoReflect() protoreflect.Message

func (*Details) Reset

func (x *Details) Reset()

func (*Details) String

func (x *Details) String() string

type Details_NetworkProxy

type Details_NetworkProxy struct {
	// NetworkProxy is BCID owned network proxy tool capable of enforcing
	// network isolation policies.
	NetworkProxy *NetworkProxy `protobuf:"bytes,2,opt,name=network_proxy,json=networkProxy,proto3,oneof"`
}

type Details_Sample

type Details_Sample struct {
	// Sample is an example policy for SPEE demonstration.
	Sample *Sample `protobuf:"bytes,1,opt,name=sample,proto3,oneof"`
}

type InspectClient

type InspectClient interface {
	// InspectionReport is the endpoint used by policies to report events to
	// Spike, which is used in Spike as IDS indicators.
	InspectionReport(ctx context.Context, in *InspectionReportRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

InspectClient is the client API for Inspect 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.

Inspect supports exporting identified "interesting" events happening on a machine as captured by a policy. A policy's design will define what is an interesting event, e.g. it can be a network call.

func NewInspectClient

func NewInspectClient(cc grpc.ClientConnInterface) InspectClient

type InspectServer

type InspectServer interface {
	// InspectionReport is the endpoint used by policies to report events to
	// Spike, which is used in Spike as IDS indicators.
	InspectionReport(context.Context, *InspectionReportRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

InspectServer is the server API for Inspect service. All implementations must embed UnimplementedInspectServer for forward compatibility.

Inspect supports exporting identified "interesting" events happening on a machine as captured by a policy. A policy's design will define what is an interesting event, e.g. it can be a network call.

type InspectionReportRequest

type InspectionReportRequest struct {

	// An identifier for Spike to use to associate a report to a policy.
	// Since there might be multiple policies running at the same time,
	// Spike needs to know which policy is reporting what.
	PolicySignature string `protobuf:"bytes,1,opt,name=policy_signature,json=policySignature,proto3" json:"policy_signature,omitempty"`
	// Details will have the information policy wants to export. It will
	// have unique information depending upon the policy.
	//
	// For example, network proxy will have `NetworkActivityLog `information
	// from google3/security/bcid/proto/software/network_proxy.proto.
	// Processing of this information will be at Spike, i.e. Spike will
	// learn how to interpret a particular type of report.
	Details *Details `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"`
	// Identifier of a build.
	BuildId   string                 `protobuf:"bytes,3,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Provenance critical dictates whether this inspection report needs is
	// needed for generating provenance.
	ProvenanceCritical bool `protobuf:"varint,5,opt,name=provenance_critical,json=provenanceCritical,proto3" json:"provenance_critical,omitempty"`
	// contains filtered or unexported fields
}

InspectionReportRequest encapsulates a policies inspect report to Spike.

func (*InspectionReportRequest) Descriptor deprecated

func (*InspectionReportRequest) Descriptor() ([]byte, []int)

Deprecated: Use InspectionReportRequest.ProtoReflect.Descriptor instead.

func (*InspectionReportRequest) GetBuildId

func (x *InspectionReportRequest) GetBuildId() string

func (*InspectionReportRequest) GetDetails

func (x *InspectionReportRequest) GetDetails() *Details

func (*InspectionReportRequest) GetPolicySignature

func (x *InspectionReportRequest) GetPolicySignature() string

func (*InspectionReportRequest) GetProvenanceCritical

func (x *InspectionReportRequest) GetProvenanceCritical() bool

func (*InspectionReportRequest) GetTimestamp

func (x *InspectionReportRequest) GetTimestamp() *timestamppb.Timestamp

func (*InspectionReportRequest) ProtoMessage

func (*InspectionReportRequest) ProtoMessage()

func (*InspectionReportRequest) ProtoReflect

func (x *InspectionReportRequest) ProtoReflect() protoreflect.Message

func (*InspectionReportRequest) Reset

func (x *InspectionReportRequest) Reset()

func (*InspectionReportRequest) String

func (x *InspectionReportRequest) String() string

type NetworkProxy

type NetworkProxy struct {

	// URI of the request observed at the proxy.
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// Optional digest of a material downloaded with the network request.
	Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

NetworkProxy provides a transparent proxy between build process and the internet. Read more at: go/luci-network-proxy (Google-internal).

Information received from this policy will be included in SLSA provenance.

func (*NetworkProxy) Descriptor deprecated

func (*NetworkProxy) Descriptor() ([]byte, []int)

Deprecated: Use NetworkProxy.ProtoReflect.Descriptor instead.

func (*NetworkProxy) GetDigest

func (x *NetworkProxy) GetDigest() string

func (*NetworkProxy) GetUri

func (x *NetworkProxy) GetUri() string

func (*NetworkProxy) ProtoMessage

func (*NetworkProxy) ProtoMessage()

func (*NetworkProxy) ProtoReflect

func (x *NetworkProxy) ProtoReflect() protoreflect.Message

func (*NetworkProxy) Reset

func (x *NetworkProxy) Reset()

func (*NetworkProxy) String

func (x *NetworkProxy) String() string

type Sample

type Sample struct {
	Ping bool `protobuf:"varint,1,opt,name=ping,proto3" json:"ping,omitempty"`
	// contains filtered or unexported fields
}

func (*Sample) Descriptor deprecated

func (*Sample) Descriptor() ([]byte, []int)

Deprecated: Use Sample.ProtoReflect.Descriptor instead.

func (*Sample) GetPing

func (x *Sample) GetPing() bool

func (*Sample) ProtoMessage

func (*Sample) ProtoMessage()

func (*Sample) ProtoReflect

func (x *Sample) ProtoReflect() protoreflect.Message

func (*Sample) Reset

func (x *Sample) Reset()

func (*Sample) String

func (x *Sample) String() string

type UnimplementedInspectServer

type UnimplementedInspectServer struct{}

UnimplementedInspectServer must 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 (UnimplementedInspectServer) InspectionReport

type UnsafeInspectServer

type UnsafeInspectServer interface {
	// contains filtered or unexported methods
}

UnsafeInspectServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InspectServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL