Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Untrusted means we should ignore the fact, as if we never received it Untrusted = iota // Endpoint means we should trust it enough to try endpoints we may have received Endpoint // AllowedIPs means we should trust it enough to add AllowedIPs to our local // configuration for the peer, if we can make a direct connection to it AllowedIPs // AddPeer means we should trust it enough to add it as a new peer in the // local configuration if we don't have it AddPeer )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Evaluator ¶
type Evaluator interface {
// TrustLevel evaluates the trust level that should be applied to a fact given its source
TrustLevel(fact *fact.Fact, source net.IP) Level
// IsKnown checks whether the subject of a fact is already known to us
IsKnown(subject fact.Subject) bool
}
Evaluator is an interface for implementations that can answer whether a fact received from a remote source should be trusted and accepted into the set of locally known facts
func CreateRouteBasedTrust ¶
CreateRouteBasedTrust factories a TrustEvaluator for the given set of peers, using the "routers are trusted" model, wherein peers are allowed to provide endpoint information, "routers" (peers with an AllowedIP whose CIDR mask is shorter than the IP length) are allowed to provide AllowedIPs for other peers, and nobody is allowed to provide new peers (peer public keys must be added by the administrator)
Click to show internal directories.
Click to hide internal directories.