Documentation
¶
Index ¶
- Constants
- Variables
- func ValidateSnapshot(snapshot Snapshot, limits Limits) error
- func WarningAcknowledgementKey(issue Issue) string
- type AgentProfile
- type ConfigSnapshot
- type FirewallPolicy
- type FirewallRule
- type HostProposal
- type Issue
- type Limits
- type PreviewInput
- type Proposal
- type ReconcileInput
- type Report
- type Snapshot
- type UnsafeRoute
Constants ¶
View Source
const ( IssueInvalidSnapshot = "invalid_snapshot" IssueInvalidCA = "invalid_ca" IssueCAFingerprintMismatch = "ca_fingerprint_mismatch" IssueCACertificateExpired = "ca_certificate_expired" IssueCACertificateNearExpiry = "ca_certificate_near_expiry" IssueInvalidHostCertificate = "invalid_host_certificate" IssueInvalidHostAddresses = "invalid_host_addresses" IssueInvalidUnsafeNetworks = "invalid_unsafe_networks" IssueHostCertificateExpired = "host_certificate_expired" IssueHostCertificateNotYetValid = "host_certificate_not_yet_valid" IssueHostCertificateNearExpiry = "host_certificate_near_expiry" IssueConfigNameMismatch = "config_name_mismatch" IssueAddressOutsideNetwork = "address_outside_network" IssueDuplicateOverlayAddress = "duplicate_overlay_address" IssueEndpointConflict = "endpoint_conflict" IssueInvalidEndpoint = "invalid_endpoint" IssueUnknownStaticHost = "unknown_static_host" IssueUnresolvedLighthouse = "unresolved_lighthouse" IssueUnresolvedRelay = "unresolved_relay" IssueMissingRoleEndpoint = "missing_role_endpoint" IssueDivergentFirewall = "divergent_firewall" IssueInvalidFirewall = "invalid_firewall" IssueInvalidAdvanced = "invalid_advanced" IssueDivergentBlocklist = "divergent_blocklist" IssueInvalidBlocklist = "invalid_blocklist" IssueExtraCARoot = "extra_ca_root" IssueUnsupportedConfigKey = "unsupported_config_key" IssueInvalidNetworkCIDR = "invalid_network_cidr" )
Variables ¶
View Source
var ( ErrSnapshotTooLarge = errors.New("mesh import snapshot is too large") ErrInvalidAgentPath = errors.New("invalid Nebula agent path") )
Functions ¶
func ValidateSnapshot ¶
func WarningAcknowledgementKey ¶
WarningAcknowledgementKey is a stable opaque identifier for one exact warning. A changed preview therefore invalidates acknowledgements naturally.
Types ¶
type AgentProfile ¶
type AgentProfile = models.AgentProfile
type ConfigSnapshot ¶
type ConfigSnapshot struct {
ReportedName string `json:"reported_name,omitempty"`
CARootFingerprints []string `json:"ca_root_fingerprints,omitempty"`
Blocklist []string `json:"blocklist,omitempty"`
StaticHostMap map[string][]string `json:"static_host_map,omitempty"`
LighthouseHosts []string `json:"lighthouse_hosts,omitempty"`
Relays []string `json:"relays,omitempty"`
AmLighthouse bool `json:"am_lighthouse,omitempty"`
AmRelay bool `json:"am_relay,omitempty"`
ListenHost string `json:"listen_host,omitempty"`
ListenPort int `json:"listen_port,omitempty"`
Punchy *bool `json:"punchy,omitempty"`
PunchyRespond *bool `json:"punchy_respond,omitempty"`
MTU int `json:"mtu,omitempty"`
TunDevice string `json:"tun_device,omitempty"`
UnsafeRoutes []UnsafeRoute `json:"unsafe_routes,omitempty"`
Firewall FirewallPolicy `json:"firewall"`
UnsupportedKeys []string `json:"unsupported_keys,omitempty"`
}
type FirewallPolicy ¶
type FirewallPolicy struct {
Inbound []FirewallRule `json:"inbound"`
Outbound []FirewallRule `json:"outbound"`
}
type FirewallRule ¶
type HostProposal ¶
type HostProposal struct {
SnapshotID string `json:"snapshot_id"`
Profile AgentProfile `json:"profile"`
Host models.Host `json:"host"`
}
type PreviewInput ¶
type PreviewInput struct {
Session *models.MeshImport
Network *models.Network
CA *models.CA
Snapshots []*models.MeshImportSnapshot
Now time.Time
}
type Proposal ¶
type Proposal struct {
Hosts []HostProposal `json:"hosts"`
Firewall FirewallPolicy `json:"firewall"`
Blocklist []string `json:"blocklist"`
}
type ReconcileInput ¶
type Report ¶
type Report struct {
Blockers []Issue `json:"blockers"`
Warnings []Issue `json:"warnings"`
Proposal Proposal `json:"proposal"`
}
func BuildPreview ¶
func BuildPreview(input PreviewInput) Report
BuildPreview decodes stored discovery payloads and reconciles them against the normalized session scope. Database columns remain authoritative for all identity fields; an agent-supplied JSON payload cannot choose its row ids.
func Reconcile ¶
func Reconcile(input ReconcileInput) Report
type Snapshot ¶
type Snapshot struct {
ID string `json:"id"`
HostID string `json:"host_id"`
CertificatePEM string `json:"certificate_pem"`
Profile AgentProfile `json:"profile"`
Config ConfigSnapshot `json:"config"`
}
type UnsafeRoute ¶
Click to show internal directories.
Click to hide internal directories.