Documentation
¶
Index ¶
- type CombinedConfig
- type Config
- type DNS
- type DNSResponse
- type GeoLocation
- type GeoLocationCheckObj
- type Group
- type MinKernelVersionDescriptor
- type MinVersionDescriptor
- type Nameserver
- type NameserverServer
- type NetworkRoute
- type OSProcess
- type OSVersionCheckObj
- type Peer
- type PeerNetworkRangeCheckObj
- type Policy
- type PolicyRule
- type PostureCheck
- type PostureCheckDetails
- type ProcessCheckObj
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CombinedConfig ¶
type CombinedConfig struct {
Config Config `yaml:"config"`
Nameservers []Nameserver `yaml:"nameservers"`
DNS DNS `yaml:"dns"`
Peers []Peer `yaml:"peers"`
Policies []Policy `yaml:"policies"`
PostureChecks []PostureCheck `yaml:"posture_checks"`
NetworkRoutes []NetworkRoute `yaml:"network_routes"`
Users []User `yaml:"users"`
}
CombinedConfig combined config of all files
type Config ¶
type Config struct {
AutoSync string `yaml:"autoSync"`
IndividualPeerGroups bool `yaml:"individualPeerGroups"`
}
Config holds program configuration
type DNS ¶
type DNS struct {
DisableFor []string `yaml:"disableFor" json:"disabled_management_groups"`
}
DNS holds NetBird DNS Management settings
type DNSResponse ¶
type DNSResponse struct {
Items struct {
DisableFor []string `json:"disabled_management_groups"`
} `json:"items"`
}
DNSResponse holds NetBird DNS Management Settings Response
type GeoLocation ¶
type GeoLocation struct {
CountryCode string `yaml:"country_code" json:"country_code"`
CityName string `yaml:"city_name" json:"city_name"`
}
GeoLocation descriptor for a geolocation
type GeoLocationCheckObj ¶
type GeoLocationCheckObj struct {
Locations []GeoLocation `yaml:"locations" json:"locations"`
}
GeoLocationCheckObj posture check geo location check
type Group ¶
type Group struct {
Name string `json:"name"`
ID string `json:"id"`
Peers []string `json:"-"`
PeerData []Peer `json:"peers"`
}
Group mapping of group ID and name
type MinKernelVersionDescriptor ¶
type MinKernelVersionDescriptor struct {
MinKernelVersion string `yaml:"min_kernel_version" json:"min_kernel_version"`
}
MinKernelVersionDescriptor descriptor for kernel min version
type MinVersionDescriptor ¶
type MinVersionDescriptor struct {
MinVersion string `yaml:"min_version" json:"min_version"`
}
MinVersionDescriptor descriptor for generic min version
type Nameserver ¶
type Nameserver struct {
ID string `json:"id"`
Name string `yaml:"name" json:"name"`
Description string `yaml:"description" json:"description"`
Nameservers []NameserverServer `yaml:"nameservers" json:"nameservers"`
Enabled bool `yaml:"enabled" json:"enabled"`
Groups []string `yaml:"groups" json:"groups"`
Primary bool `yaml:"primary" json:"primary"`
Domains []string `yaml:"domains" json:"domains"`
SearchDomainsEnabled bool `yaml:"search_domains_enabled" json:"search_domains_enabled"`
}
Nameserver holds one nameserver group settings
type NameserverServer ¶
type NameserverServer struct {
IP string `yaml:"ip"`
NSType string `yaml:"ns_type"`
Port uint `yaml:"port"`
}
NameserverServer holds prot://ip:port
type NetworkRoute ¶
type NetworkRoute struct {
ID string `json:"id"`
NetworkType string `yaml:"network_type" json:"network_type"`
Description string `yaml:"description" json:"description"`
NetworkID string `yaml:"network_id" json:"network_id"`
Enabled bool `yaml:"enabled" json:"enabled"`
Peer string `yaml:"peer" json:"peer"`
PeerGroups []string `yaml:"peer_groups" json:"peer_groups"`
Network string `yaml:"network" json:"network"`
Domains []string `yaml:"domains" json:"domains"`
Metric int `yaml:"metric" json:"metric"`
Masquerade bool `yaml:"masquerade" json:"masquerade"`
Groups []string `yaml:"groups" json:"groups"`
KeepRoute bool `yaml:"keep_route" json:"keep_route"`
}
NetworkRoute NetBird network route object
func (NetworkRoute) Equals ¶
func (n NetworkRoute) Equals(o NetworkRoute) bool
Equals returns if network routes are equal
type OSProcess ¶
type OSProcess struct {
LinuxPath string `yaml:"linux_path" json:"linux_path"`
MacPath string `yaml:"mac_path" json:"mac_path"`
WindowsPath string `yaml:"windows_path" json:"windows_path"`
}
OSProcess posture check for different paths for OS
type OSVersionCheckObj ¶
type OSVersionCheckObj struct {
Android MinVersionDescriptor `yaml:"android" json:"android"`
IOS MinVersionDescriptor `yaml:"ios" json:"ios"`
Darwin MinVersionDescriptor `yaml:"darwin" json:"darwin"`
Linux MinKernelVersionDescriptor `yaml:"linux" json:"linux"`
Windows MinKernelVersionDescriptor `yaml:"windows" json:"windows"`
}
OSVersionCheckObj Different OS types version checks
type Peer ¶
type Peer struct {
ID string `yaml:"id" json:"id"`
Name string `yaml:"name" json:"name"`
Groups []Group `yaml:"-" json:"groups"`
GroupNames []string `yaml:"groups"`
SSHEnabled bool `yaml:"ssh_enabled" json:"ssh_enabled"`
ExpirationDisabled bool `yaml:"expiration_disabled"`
LoginExpirationEnabled bool `json:"login_expiration_enabled"`
UserID string `json:"user_id"`
}
Peer associates a peer with 0+ groups
type PeerNetworkRangeCheckObj ¶
type PeerNetworkRangeCheckObj struct {
Ranges []string `yaml:"ranges" json:"ranges"`
}
PeerNetworkRangeCheckObj posture check network range check
type Policy ¶
type Policy struct {
ID string `json:"id"`
Name string `yaml:"name" json:"name"`
Enabled bool `yaml:"enabled" json:"enabled"`
Description string `yaml:"description" json:"description"`
SourcePostureChecks []string `yaml:"source_posture_checks"`
Action string `yaml:"action"`
Bidirectional bool `yaml:"bidirectional"`
Protocol string `yaml:"protocol"`
Sources []string `yaml:"sources"`
Destinations []string `yaml:"destinations"`
Rules []PolicyRule `json:"rules"`
Ports []string `yaml:"ports"`
}
Policy holds NetBird ACL Policy object
type PolicyRule ¶
type PolicyRule struct {
SourceGroups []Group `json:"sources"`
DestinationGroups []Group `json:"destinations"`
Description string `json:"description"`
Action string `json:"action"`
Bidirectional bool `json:"bidirectional"`
Protocol string `json:"protocol"`
Ports []string `json:"ports"`
}
PolicyRule Policy.Rules section
type PostureCheck ¶
type PostureCheck struct {
ID string `json:"id"`
Name string `yaml:"name" json:"name"`
Description string `yaml:"description" json:"description"`
Checks PostureCheckDetails `yaml:"checks" json:"checks"`
}
PostureCheck holds NetBird PostureCheck object
type PostureCheckDetails ¶
type PostureCheckDetails struct {
NBVersionCheck MinVersionDescriptor `yaml:"nb_version_check" json:"nb_version_check"`
OSVersionCheck OSVersionCheckObj `yaml:"os_version_check" json:"os_version_check"`
GeoLocationCheck GeoLocationCheckObj `yaml:"geo_location_check" json:"geo_location_check"`
PeerNetworkRangeCheck PeerNetworkRangeCheckObj `yaml:"peer_network_range_check" json:"peer_network_range_check"`
ProcessCheck ProcessCheckObj `yaml:"process_check" json:"process_check"`
}
PostureCheckDetails different checks in posture check
type ProcessCheckObj ¶
type ProcessCheckObj struct {
Processes []OSProcess `yaml:"processes" json:"processes"`
}
ProcessCheckObj posture check process checklist