Documentation
¶
Overview ¶
Package policy defines the agent's named permission tiers.
The tier is fixed by the operator at startup via DEVMON_POLICY_MODE and is immutable for the life of the process. A client can never widen what the operator granted — that is the agent's core security property.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mode ¶
type Mode int
Mode is a permission tier. Tiers are strict supersets of one another, which is what lets Allows be a single comparison rather than a set membership test.
const ( // ModeReadOnly permits inspection only: list, inspect, logs. ModeReadOnly Mode = iota // ModeDefault adds non-destructive lifecycle control: start, restart, stop. // This is the tier chosen when DEVMON_POLICY_MODE is unset — useful out of // the box, but incapable of destroying anything. ModeDefault // ModeFull adds destructive operations: kill, delete. ModeFull )
func ParseMode ¶
ParseMode converts a DEVMON_POLICY_MODE value into a Mode.
The empty string yields ModeDefault, not ModeReadOnly: an unconfigured agent should be useful without being able to destroy anything. Parsing is exact — no case folding — so a typo surfaces as a startup error rather than as a silently different permission tier.