Documentation
¶
Overview ¶
Package policycontrol manages one in-process policy attachment. The caller must give it exclusive ownership of Target.SetPolicy for the service lifetime.
Index ¶
Constants ¶
const ( MaxInputBytes = 256 << 10 MaxRevisions = 64 MaxAudit = 2048 MaxReceipts = 1024 MaxEvents = 1000 )
Variables ¶
This section is empty.
Functions ¶
func ApprovalDigest ¶
Types ¶
type Config ¶
type Config struct {
Approvals *firewallauth.Approvals
Auth *firewallauth.Authority
Scope firewallauth.Scope
Origin string
StdioPrincipal *firewallauth.Principal
Token string
ReadOnly bool
StateDir string
Managed bool
// AllowEffects is immutable host admission, including replay and recovery.
AllowEffects bool
}
Managed must be explicitly true to enable writes and restart recovery. ReadOnly overrides Managed. StateDir is required only in managed mode.
type Deployment ¶
type Request ¶
type Request struct {
Approval *firewallauth.ApprovalRequest `json:"approval,omitempty"`
Receipt string `json:"receipt,omitempty"`
Bundle string `json:"bundle,omitempty"`
Revision string `json:"revision,omitempty"`
OtherRevision string `json:"other_revision,omitempty"`
ExpectedRevision string `json:"expected_revision,omitempty"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
Event policy.Event `json:"event,omitempty"`
Events []policy.Event `json:"events,omitempty"`
Limit int `json:"limit,omitempty"`
}
type Revision ¶
type Revision struct {
Revision string `json:"revision"`
Bundle json.RawMessage `json:"bundle"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Close ¶
Close releases the managed-state singleton lock. Stop transports before Close.
func (*Service) Execute ¶
Execute is the common REST/MCP operation boundary. Evaluate only uses synthetic caller-supplied events and never invokes Target.SetPolicy or an upstream.