Documentation
¶
Index ¶
- Constants
- type GuardAttachment
- type GuardAttributes
- type GuardFinding
- type GuardFindingOutcome
- type GuardFindingSignal
- type GuardFindingSource
- type GuardModel
- type GuardPayload
- type GuardRequest
- type GuardResponse
- type Plugin
- func (p *Plugin) Execute(ctx context.Context, in appplugins.ExecInput) (*appplugins.Result, error)
- func (p *Plugin) MandatoryStages() []policy.Stage
- func (p *Plugin) MutatesMetadata() bool
- func (p *Plugin) MutatesRequestBody() bool
- func (p *Plugin) MutatesResponseBody() bool
- func (p *Plugin) Name() string
- func (p *Plugin) SupportedModes() []policy.Mode
- func (p *Plugin) SupportedStages() []policy.Stage
- func (p *Plugin) ValidateConfig(settings map[string]any) error
- type Settings
Constants ¶
View Source
const PluginName = "trustguard"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GuardAttachment ¶
type GuardAttributes ¶
type GuardAttributes struct {
ContentType string `json:"content_type"`
Model GuardModel `json:"model"`
}
type GuardFinding ¶
type GuardFinding struct {
Source *GuardFindingSource `json:"source,omitempty"`
Signal *GuardFindingSignal `json:"signal,omitempty"`
Outcome *GuardFindingOutcome `json:"outcome,omitempty"`
Evidence map[string]any `json:"evidence,omitempty"`
}
GuardFinding is one TrustGuard finding in the guard wire contract.
type GuardFindingOutcome ¶ added in v0.3.0
type GuardFindingOutcome struct {
Action string `json:"action,omitempty"`
}
GuardFindingOutcome is the enforcement action applied to a real detection.
type GuardFindingSignal ¶ added in v0.3.0
type GuardFindingSignal struct {
Type string `json:"type,omitempty"`
Confidence float64 `json:"confidence,omitempty"`
}
GuardFindingSignal is the detection signal when a plugin or gate matched.
type GuardFindingSource ¶ added in v0.3.0
type GuardFindingSource struct {
Kind string `json:"kind,omitempty"`
Plugin string `json:"plugin,omitempty"`
DetectorID string `json:"detector_id,omitempty"`
DetectorName string `json:"detector_name,omitempty"`
PolicyID string `json:"policy_id,omitempty"`
GateName string `json:"gate_name,omitempty"`
}
GuardFindingSource identifies who produced a guard finding.
type GuardModel ¶
type GuardPayload ¶ added in v0.2.6
type GuardPayload struct {
Input string `json:"input"`
Attachments []GuardAttachment `json:"attachments,omitempty"`
}
type GuardRequest ¶
type GuardRequest struct {
Payload GuardPayload `json:"payload"`
Direction string `json:"direction"`
Protocol string `json:"protocol"`
GatewayID string `json:"gateway_id"`
SessionID string `json:"session_id"`
ConsumerID string `json:"consumer_id"`
Attributes GuardAttributes `json:"attributes"`
}
type GuardResponse ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Execute ¶
func (p *Plugin) Execute(ctx context.Context, in appplugins.ExecInput) (*appplugins.Result, error)
func (*Plugin) MandatoryStages ¶
func (*Plugin) MutatesMetadata ¶
func (*Plugin) MutatesRequestBody ¶
func (*Plugin) MutatesResponseBody ¶
func (*Plugin) SupportedModes ¶
func (*Plugin) SupportedStages ¶
Click to show internal directories.
Click to hide internal directories.