v1

package
v0.0.0-...-24e3e83 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright © 2020 GUILLAUME FOURNIER

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

+k8s:deepcopy-gen=package +groupName=securityprobe.datadoghq.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	// SecurityProfileCRD - Custom resource definition for SecurityProfile.
	SecurityProfileCRD = &apiextv1.CustomResourceDefinition{
		ObjectMeta: metav1.ObjectMeta{
			Name: "securityprofiles.securityprobe.datadoghq.com",
		},
		Spec: apiextv1.CustomResourceDefinitionSpec{
			Group: securityprobedatadoghqcom.GroupName,
			Names: apiextv1.CustomResourceDefinitionNames{
				Singular: "securityprofile",
				Plural:   "securityprofiles",
				Kind:     "SecurityProfile",
				ListKind: "SecurityProfileList",
				ShortNames: []string{
					"sp",
					"sps",
				},
			},
			Versions: []apiextv1.CustomResourceDefinitionVersion{
				{
					Name:    Version,
					Served:  true,
					Storage: true,
					Schema: &apiextv1.CustomResourceValidation{
						OpenAPIV3Schema: SecurityProfileCRDSchema,
					},
				},
			},
			Scope: apiextv1.NamespaceScoped,
		},
	}

	// SecurityProfileCRDSchema - OpenAPI schema to the SecurityProfileCRD.
	SecurityProfileCRDSchema = &apiextv1.JSONSchemaProps{
		Type: "object",
		Properties: map[string]apiextv1.JSONSchemaProps{
			"spec": apiextv1.JSONSchemaProps{
				Type: "object",
				Properties: map[string]apiextv1.JSONSchemaProps{
					"labelSelector": apiextv1.JSONSchemaProps{
						Type: "object",
						Properties: map[string]apiextv1.JSONSchemaProps{
							"matchLabels": apiextv1.JSONSchemaProps{
								Type:                   "object",
								XPreserveUnknownFields: boolPtr(true),
							},
						},
					},
					"actions": apiextv1.JSONSchemaProps{
						Type: "array",
						Items: &apiextv1.JSONSchemaPropsOrArray{
							Schema: &apiextv1.JSONSchemaProps{
								Type: "string",
							},
						},
					},
					"attacks": apiextv1.JSONSchemaProps{
						Type: "array",
						Items: &apiextv1.JSONSchemaPropsOrArray{
							Schema: &apiextv1.JSONSchemaProps{
								Type: "string",
							},
						},
					},
					"default": NetworkPolicyCRDSchema,
					"processes": apiextv1.JSONSchemaProps{
						Type: "array",
						Items: &apiextv1.JSONSchemaPropsOrArray{
							Schema: &apiextv1.JSONSchemaProps{
								Type: "object",
								Properties: map[string]apiextv1.JSONSchemaProps{
									"path": apiextv1.JSONSchemaProps{
										Type: "string",
									},
									"network": NetworkPolicyCRDSchema,
								},
							},
						},
					},
				},
			},
		},
	}

	// NetworkPolicyCRDSchema - OpenAPI schema for NetworkPolicies.
	NetworkPolicyCRDSchema = apiextv1.JSONSchemaProps{
		Type: "object",
		Properties: map[string]apiextv1.JSONSchemaProps{
			"egress": apiextv1.JSONSchemaProps{
				Type: "object",
				Properties: map[string]apiextv1.JSONSchemaProps{
					"fqdns": apiextv1.JSONSchemaProps{
						Type: "array",
						Items: &apiextv1.JSONSchemaPropsOrArray{
							Schema: &apiextv1.JSONSchemaProps{
								Type: "string",
							},
						},
					},
					"cidr4": apiextv1.JSONSchemaProps{
						Type: "array",
						Items: &apiextv1.JSONSchemaPropsOrArray{
							Schema: &apiextv1.JSONSchemaProps{
								Type: "string",
							},
						},
					},
					"cidr6": apiextv1.JSONSchemaProps{
						Type: "array",
						Items: &apiextv1.JSONSchemaPropsOrArray{
							Schema: &apiextv1.JSONSchemaProps{
								Type: "string",
							},
						},
					},
					"l3": apiextv1.JSONSchemaProps{
						Type: "object",
						Properties: map[string]apiextv1.JSONSchemaProps{
							"protocols": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "string",
									},
								},
							},
						},
					},
					"l4": apiextv1.JSONSchemaProps{
						Type: "object",
						Properties: map[string]apiextv1.JSONSchemaProps{
							"protocols": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "string",
									},
								},
							},
							"protocolPorts": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "object",
										Properties: map[string]apiextv1.JSONSchemaProps{
											"protocol": apiextv1.JSONSchemaProps{
												Type: "string",
											},
											"port": apiextv1.JSONSchemaProps{
												Type: "integer",
											},
										},
									},
								},
							},
						},
					},
					"l7": apiextv1.JSONSchemaProps{
						Type: "object",
						Properties: map[string]apiextv1.JSONSchemaProps{
							"protocols": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "string",
									},
								},
							},
							"dns": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "string",
									},
								},
							},
							"http": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "object",
										Properties: map[string]apiextv1.JSONSchemaProps{
											"method": apiextv1.JSONSchemaProps{
												Type: "string",
											},
											"uri": apiextv1.JSONSchemaProps{
												Type: "string",
											},
										},
									},
								},
							},
						},
					},
				},
			},
			"ingress": apiextv1.JSONSchemaProps{
				Type: "object",
				Properties: map[string]apiextv1.JSONSchemaProps{
					"cidr4": apiextv1.JSONSchemaProps{
						Type: "array",
						Items: &apiextv1.JSONSchemaPropsOrArray{
							Schema: &apiextv1.JSONSchemaProps{
								Type: "string",
							},
						},
					},
					"cidr6": apiextv1.JSONSchemaProps{
						Type: "array",
						Items: &apiextv1.JSONSchemaPropsOrArray{
							Schema: &apiextv1.JSONSchemaProps{
								Type: "string",
							},
						},
					},
					"l3": apiextv1.JSONSchemaProps{
						Type: "object",
						Properties: map[string]apiextv1.JSONSchemaProps{
							"protocols": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "string",
									},
								},
							},
						},
					},
					"l4": apiextv1.JSONSchemaProps{
						Type: "object",
						Properties: map[string]apiextv1.JSONSchemaProps{
							"protocols": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "string",
									},
								},
							},
							"protocolPorts": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "object",
										Properties: map[string]apiextv1.JSONSchemaProps{
											"protocol": apiextv1.JSONSchemaProps{
												Type: "string",
											},
											"port": apiextv1.JSONSchemaProps{
												Type: "integer",
											},
										},
									},
								},
							},
						},
					},
					"l7": apiextv1.JSONSchemaProps{
						Type: "object",
						Properties: map[string]apiextv1.JSONSchemaProps{
							"protocols": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "string",
									},
								},
							},
							"dns": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "string",
									},
								},
							},
							"http": apiextv1.JSONSchemaProps{
								Type: "array",
								Items: &apiextv1.JSONSchemaPropsOrArray{
									Schema: &apiextv1.JSONSchemaProps{
										Type: "object",
										Properties: map[string]apiextv1.JSONSchemaProps{
											"method": apiextv1.JSONSchemaProps{
												Type: "string",
											},
											"uri": apiextv1.JSONSchemaProps{
												Type: "string",
											},
										},
									},
								},
							},
						},
					},
				},
			},
		},
	}
)
View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme is a global function that registers this API
	// group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)

SchemeGroupVersion is group version used to register these objects

View Source
var Version = "v1"

Functions

func CreateSecurityProfileCRD

func CreateSecurityProfileCRD(config *rest.Config) error

CreateSecurityProfileCRD - Creates SecurityProfile v1 CRDs

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource.

Types

type EgressRule

type EgressRule struct {
	FQDNs []string `json:"fqdns"`
	CIDR4 []string `json:"cidr4"`
	CIDR6 []string `json:"cidr6"`
	L3    L3Rule   `json:"l3"`
	L4    L4Rule   `json:"l4"`
	L7    L7Rule   `json:"l7"`
}

EgressRule - Egress rule

func (*EgressRule) DeepCopy

func (in *EgressRule) DeepCopy() *EgressRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRule.

func (*EgressRule) DeepCopyInto

func (in *EgressRule) DeepCopyInto(out *EgressRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (EgressRule) GetDNSKeys

func (er EgressRule) GetDNSKeys(cookie keyvalue.Cookie, trafficType kernel.TrafficType, action interface{}) ([]*keyvalue.KeyValue, error)

GetDNSKeys - Returns the DNS keys for this rule

func (EgressRule) GetProfileKeyValues

func (er EgressRule) GetProfileKeyValues(cookie keyvalue.Cookie, action interface{}) ([]*keyvalue.KeyValue, error)

GetProfileKeyValues - Returns the profile key-values of the EgressRule

func (EgressRule) GetProfileMapOfMapsKeyValue

func (er EgressRule) GetProfileMapOfMapsKeyValue(cookie keyvalue.Cookie, action interface{}) ([]*keyvalue.MapOfMapsKeyValue, error)

GetProfileMapOfMapsKeyValue - Returns the profile MapsOfMaps key-values of the EgressRule

type HTTPRule

type HTTPRule struct {
	Method string `json:"method"`
	URI    string `json:"uri"`
}

HTTPRule - HTTP Rules

func (*HTTPRule) DeepCopy

func (in *HTTPRule) DeepCopy() *HTTPRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRule.

func (*HTTPRule) DeepCopyInto

func (in *HTTPRule) DeepCopyInto(out *HTTPRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IngressRule

type IngressRule struct {
	CIDR4 []string `json:"cidr4"`
	CIDR6 []string `json:"cidr6"`
	L3    L3Rule   `json:"l3"`
	L4    L4Rule   `json:"l4"`
	L7    L7Rule   `json:"l7"`
}

IngressRule - Ingress rule

func (*IngressRule) DeepCopy

func (in *IngressRule) DeepCopy() *IngressRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRule.

func (*IngressRule) DeepCopyInto

func (in *IngressRule) DeepCopyInto(out *IngressRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (IngressRule) GetProfileKeyValues

func (ir IngressRule) GetProfileKeyValues(cookie keyvalue.Cookie, action interface{}) ([]*keyvalue.KeyValue, error)

GetProfileKeyValues - Returns the profile key-values of the IngressRule

func (IngressRule) GetProfileMapOfMapsKeyValue

func (ir IngressRule) GetProfileMapOfMapsKeyValue(cookie keyvalue.Cookie, action interface{}) ([]*keyvalue.MapOfMapsKeyValue, error)

GetProfileMapOfMapsKeyValue - Returns the profile MapsOfMaps key-values of the IngressRule

type L3Rule

type L3Rule struct {
	Protocols []string `json:"protocols"`
}

L3Rule - Layer 3 rule

func (*L3Rule) DeepCopy

func (in *L3Rule) DeepCopy() *L3Rule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L3Rule.

func (*L3Rule) DeepCopyInto

func (in *L3Rule) DeepCopyInto(out *L3Rule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (L3Rule) GetProfileKeyValues

func (rule L3Rule) GetProfileKeyValues(cookie keyvalue.Cookie, trafficType kernel.TrafficType, action interface{}) []*keyvalue.KeyValue

GetProfileKeyValues - Returns the profile key-values of the L3Rule

func (L3Rule) GetProtocolKeys

func (rule L3Rule) GetProtocolKeys(cookie keyvalue.Cookie, trafficType kernel.TrafficType, action interface{}) []*keyvalue.KeyValue

GetProtocolKeys - Returns the protocol keys for this rule

type L4ProtocolPortRule

type L4ProtocolPortRule struct {
	Protocol string `json:"protocol"`
	Port     int    `json:"port"`
}

L4ProtocolPortRule - L4 protocol-port rule

func (*L4ProtocolPortRule) DeepCopy

func (in *L4ProtocolPortRule) DeepCopy() *L4ProtocolPortRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L4ProtocolPortRule.

func (*L4ProtocolPortRule) DeepCopyInto

func (in *L4ProtocolPortRule) DeepCopyInto(out *L4ProtocolPortRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type L4Rule

type L4Rule struct {
	Protocols     []string             `json:"protocols"`
	ProtocolPorts []L4ProtocolPortRule `json:"protocolPorts"`
}

L4Rule - Layer 4 rule

func (*L4Rule) DeepCopy

func (in *L4Rule) DeepCopy() *L4Rule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L4Rule.

func (*L4Rule) DeepCopyInto

func (in *L4Rule) DeepCopyInto(out *L4Rule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (L4Rule) GetProfileKeyValues

func (rule L4Rule) GetProfileKeyValues(cookie keyvalue.Cookie, trafficType kernel.TrafficType, action interface{}) []*keyvalue.KeyValue

GetProfileKeyValues - Returns the profile key-values of the L4Rule

func (L4Rule) GetProtocolKeys

func (rule L4Rule) GetProtocolKeys(cookie keyvalue.Cookie, trafficType kernel.TrafficType, action interface{}) []*keyvalue.KeyValue

GetProtocolKeys - Returns the protocol keys for this rule

func (L4Rule) GetProtocolPortKeys

func (rule L4Rule) GetProtocolPortKeys(cookie keyvalue.Cookie, trafficType kernel.TrafficType, action interface{}) []*keyvalue.KeyValue

GetProtocolPortKeys - Returns the protocol-port keys for this rule

type L7Rule

type L7Rule struct {
	Protocols []string   `json:"protocols"`
	DNS       []string   `json:"dns"`
	HTTP      []HTTPRule `json:"http"`
}

L7Rule - Layer 7 rule

func (*L7Rule) DeepCopy

func (in *L7Rule) DeepCopy() *L7Rule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L7Rule.

func (*L7Rule) DeepCopyInto

func (in *L7Rule) DeepCopyInto(out *L7Rule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (L7Rule) GetDNSKeys

func (rule L7Rule) GetDNSKeys(cookie keyvalue.Cookie, trafficType kernel.TrafficType, action interface{}) ([]*keyvalue.KeyValue, error)

GetDNSKeys - Returns the DNS keys for this rule

func (L7Rule) GetHTTPKeys

func (rule L7Rule) GetHTTPKeys(cookie keyvalue.Cookie, trafficType kernel.TrafficType, action interface{}) []*keyvalue.KeyValue

GetHTTPKeys - Returns the HTTP keys for this rule

func (L7Rule) GetProfileKeyValues

func (rule L7Rule) GetProfileKeyValues(cookie keyvalue.Cookie, trafficType kernel.TrafficType, action interface{}) ([]*keyvalue.KeyValue, error)

GetProfileKeyValues - Returns the profile key-values of the L7Rule

func (L7Rule) GetProtocolKeys

func (rule L7Rule) GetProtocolKeys(cookie keyvalue.Cookie, trafficType kernel.TrafficType, action interface{}) []*keyvalue.KeyValue

GetProtocolKeys - Returns the protocol keys for this rule

type NetworkPolicy

type NetworkPolicy struct {
	Egress  EgressRule  `json:"egress"`
	Ingress IngressRule `json:"ingress"`
}

NetworkPolicy - Network policy structure

func (*NetworkPolicy) DeepCopy

func (in *NetworkPolicy) DeepCopy() *NetworkPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicy.

func (*NetworkPolicy) DeepCopyInto

func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (NetworkPolicy) GetProfileKeyValues

func (np NetworkPolicy) GetProfileKeyValues(cookie keyvalue.Cookie, action interface{}) ([]*keyvalue.KeyValue, error)

GetProfileKeyValues - Returns the profile key-values of the network policy

func (NetworkPolicy) GetProfileMapOfMapsKeyValue

func (np NetworkPolicy) GetProfileMapOfMapsKeyValue(cookie keyvalue.Cookie, action interface{}) ([]*keyvalue.MapOfMapsKeyValue, error)

GetProfileMapOfMapsKeyValue - Returns the profile MapOfMaps key-values of the network policy

type ProcessProfile

type ProcessProfile struct {
	BinaryPath    string        `json:"path"`
	NetworkPolicy NetworkPolicy `json:"network"`
	// contains filtered or unexported fields
}

ProcessProfile - Process profile structure

func (*ProcessProfile) DeepCopy

func (in *ProcessProfile) DeepCopy() *ProcessProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProcessProfile.

func (*ProcessProfile) DeepCopyInto

func (in *ProcessProfile) DeepCopyInto(out *ProcessProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ProcessProfile) GetPathKeyValue

func (pp *ProcessProfile) GetPathKeyValue(cookie keyvalue.Cookie) *keyvalue.KeyValue

GetPathKeyValue - Returns the BinaryPathKey of the process profile

func (*ProcessProfile) String

func (pp *ProcessProfile) String() string

type SecurityProfile

type SecurityProfile struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec SecurityProfileSpec `json:"spec"`
}

SecurityProfile - Security profile k8s resource

func (*SecurityProfile) DeepCopy

func (in *SecurityProfile) DeepCopy() *SecurityProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityProfile.

func (*SecurityProfile) DeepCopyInto

func (in *SecurityProfile) DeepCopyInto(out *SecurityProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SecurityProfile) DeepCopyObject

func (in *SecurityProfile) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*SecurityProfile) GenerateRandomIDs

func (sp *SecurityProfile) GenerateRandomIDs()

GenerateRandomIDs - Generate random IDs for the profile

func (*SecurityProfile) GetSecurityProfileCookie

func (sp *SecurityProfile) GetSecurityProfileCookie() keyvalue.Cookie

GetSecurityProfileCookie - Returns the security profile cookie

type SecurityProfileList

type SecurityProfileList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []SecurityProfile `json:"items"`
}

SecurityProfileList - List of SecurityProfile resources

func (*SecurityProfileList) DeepCopy

func (in *SecurityProfileList) DeepCopy() *SecurityProfileList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityProfileList.

func (*SecurityProfileList) DeepCopyInto

func (in *SecurityProfileList) DeepCopyInto(out *SecurityProfileList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SecurityProfileList) DeepCopyObject

func (in *SecurityProfileList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SecurityProfileSpec

type SecurityProfileSpec struct {
	LabelSelector        *metav1.LabelSelector `json:"labelSelector"`
	Actions              []string              `json:"actions"`
	NetworkAttacks       []string              `json:"attacks"`
	DefaultNetworkPolicy NetworkPolicy         `json:"default"`
	ProcessProfiles      []*ProcessProfile     `json:"processes"`
	// contains filtered or unexported fields
}

SecurityProfileSpec - Specification for the SecurityProfile resource

func (SecurityProfileSpec) BinaryIDFromPath

func (sps SecurityProfileSpec) BinaryIDFromPath(path string) keyvalue.Cookie

BinaryIDFromPath - Returns the binary_id associated to the provided binary path.

func (*SecurityProfileSpec) DeepCopy

func (in *SecurityProfileSpec) DeepCopy() *SecurityProfileSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityProfileSpec.

func (*SecurityProfileSpec) DeepCopyInto

func (in *SecurityProfileSpec) DeepCopyInto(out *SecurityProfileSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (SecurityProfileSpec) GetActionFlag

func (sps SecurityProfileSpec) GetActionFlag() kernel.SecurityProfileAction

GetActionFlag - Computes the action flag of the security profile

func (SecurityProfileSpec) GetActionKeyValue

func (sps SecurityProfileSpec) GetActionKeyValue() *keyvalue.KeyValue

GetActionKeyValue - Computes the action key-value of the security profile

func (SecurityProfileSpec) GetBinaryIDs

func (sps SecurityProfileSpec) GetBinaryIDs() ([]keyvalue.Cookie, error)

GetBinaryIDs - Returns the list of binary IDs of the profile

func (SecurityProfileSpec) GetNetworkAttacksFlag

func (sps SecurityProfileSpec) GetNetworkAttacksFlag() keyvalue.NetworkAttack

GetNetworkAttacksFlag - Computes the network attacks flag of the security profile

func (SecurityProfileSpec) GetNetworkAttacksKeyValue

func (sps SecurityProfileSpec) GetNetworkAttacksKeyValue() *keyvalue.KeyValue

GetNetworkAttacksKeyValue - Computes the network attacks key-value of the security profile

func (SecurityProfileSpec) GetProfileKeyValues

func (sps SecurityProfileSpec) GetProfileKeyValues() ([]*keyvalue.KeyValue, error)

GetProfileKeyValues - Returns the profile key-values of the security profile

func (SecurityProfileSpec) GetProfileMapOfMapsKeyValue

func (sps SecurityProfileSpec) GetProfileMapOfMapsKeyValue() ([]*keyvalue.MapOfMapsKeyValue, error)

GetProfileMapOfMapsKeyValue - Returns the profile MapOfMaps key-values of the security profile

func (SecurityProfileSpec) GetProfileNSKeyValues

func (sps SecurityProfileSpec) GetProfileNSKeyValues(netns uint64, pidns uint64) ([]*keyvalue.KeyValue, error)

GetProfileNSKeyValues - Returns the namespace key-values of the profile

func (SecurityProfileSpec) GetProfilePathsKeyValues

func (sps SecurityProfileSpec) GetProfilePathsKeyValues() ([]*keyvalue.KeyValue, error)

GetProfilePathsKeyValues - Returns the BinaryPathKeys of the profile

func (SecurityProfileSpec) IsBinaryIDInProfile

func (sps SecurityProfileSpec) IsBinaryIDInProfile(cookie keyvalue.Cookie) (bool, string)

IsBinaryIDInProfile - Checks if the profile owns the provided binary ID. If there is a match, the function also returns the binary path to which it maps.

Jump to

Keyboard shortcuts

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