Documentation ¶
Index ¶
- Constants
- func ParseFieldFilterList(filters string) ([]*tetragon.FieldFilter, error)
- type FieldFilter
- func FieldFilterFromProto(filter *tetragon.FieldFilter) (*FieldFilter, error)
- func FieldFiltersFromGetEventsRequest(request *tetragon.GetEventsRequest) ([]*FieldFilter, error)
- func NewExcludeFieldFilter(eventSet []tetragon.EventType, fields []string, invertEventSet bool) (*FieldFilter, error)
- func NewFieldFilter(eventSet []tetragon.EventType, fields []string, ...) (*FieldFilter, error)
- func NewIncludeFieldFilter(eventSet []tetragon.EventType, fields []string, invertEventSet bool) (*FieldFilter, error)
- type RedactionFilter
- type RedactionFilterList
Constants ¶
const REDACTION_STR = "*****"
Variables ¶
This section is empty.
Functions ¶
func ParseFieldFilterList ¶
func ParseFieldFilterList(filters string) ([]*tetragon.FieldFilter, error)
Types ¶
type FieldFilter ¶
type FieldFilter struct {
// contains filtered or unexported fields
}
FieldFilter is a helper for filtering fields in events
func FieldFilterFromProto ¶
func FieldFilterFromProto(filter *tetragon.FieldFilter) (*FieldFilter, error)
FieldFilterFromProto constructs a new FieldFilter from a Tetragon API field filter.
func FieldFiltersFromGetEventsRequest ¶
func FieldFiltersFromGetEventsRequest(request *tetragon.GetEventsRequest) ([]*FieldFilter, error)
FieldFiltersFromGetEventsRequest returns a list of EventFieldFilter for a GetEventsRequest.
nolint:revive // revive complains about stutter
func NewExcludeFieldFilter ¶
func NewExcludeFieldFilter(eventSet []tetragon.EventType, fields []string, invertEventSet bool) (*FieldFilter, error)
NewExcludeFieldFilter constructs a new exclusion FieldFilter from a set of fields.
func NewFieldFilter ¶
func NewFieldFilter(eventSet []tetragon.EventType, fields []string, action tetragon.FieldFilterAction, invertEventSet bool) (*FieldFilter, error)
NewFieldFilter constructs a new FieldFilter from a set of fields.
func NewIncludeFieldFilter ¶
func NewIncludeFieldFilter(eventSet []tetragon.EventType, fields []string, invertEventSet bool) (*FieldFilter, error)
NewIncludeFieldFilter constructs a new inclusion FieldFilter from a set of fields.
func (*FieldFilter) Filter ¶
func (f *FieldFilter) Filter(event *tetragon.GetEventsResponse) (*tetragon.GetEventsResponse, error)
Filter filters the fields in the GetEventsResponse, keeping fields specified in the inclusion filter and discarding fields specified in the exclusion filter. Exclusion takes precedence over inclusion and an empty filter set will keep all remaining fields.
type RedactionFilter ¶
type RedactionFilter struct {
// contains filtered or unexported fields
}
func RedactionFilterListFromProto ¶
func RedactionFilterListFromProto(protoFilters []*tetragon.RedactionFilter) ([]*RedactionFilter, error)
func (RedactionFilter) Redact ¶
func (f RedactionFilter) Redact(binary, args string) string
Redact resursively checks any string fields in the event for matches to redaction regexes and replaces any capture groups with `*****`.
NOTE: If you're using multiple redaction filters, reach for RedactionFilterList.Redact() instead.
type RedactionFilterList ¶
type RedactionFilterList struct {
// contains filtered or unexported fields
}
var RedactionFilters *RedactionFilterList
func ParseRedactionFilterList ¶
func ParseRedactionFilterList(filters string) (*RedactionFilterList, error)
func (RedactionFilterList) Redact ¶
func (f RedactionFilterList) Redact(binary, args string) string
Redact redacts a string based on redaction filters.