node

package
v0.0.0-...-d58163c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeConfigureRequest

func NodeConfigureRequest(dyn NodeDB, config *osquery_types.ServerConfig) http.Handler

NodeConfigureRequest configures a node. Returns a json body of either a full osquery config, or a node_invalide = True to indicate need for re-enrollment

func NodeEnrollRequest

func NodeEnrollRequest(dyn NodeDB, config *osquery_types.ServerConfig) http.Handler

NodeEnrollRequest enrolls a node given the host identifier

func RandomString

func RandomString(strlen int) string

Types

type EnrollRequestResponse

type EnrollRequestResponse struct {
	NodeKey     string `json:"node_key"`
	NodeInvalid bool   `json:"node_invalid"`
}

type NodeConfigurePost

type NodeConfigurePost struct {
	EnrollSecret   string `json:"enroll_secret"`
	NodeKey        string `json:"node_key"`
	HostIdentifier string `json:"host_identifier"`
}

NodeConfigurePost type for handling post requests made by node

type NodeDB

type NodeDB interface {
	SearchByHostIdentifier(hid string) ([]osquery_types.OsqueryClient, error)
	UpsertClient(oc osquery_types.OsqueryClient) error
	ValidNode(nodeKey string) error
	SearchByNodeKey(nk string) (osquery_types.OsqueryClient, error)
	GetNamedConfig(configName string) (osquery_types.OsqueryNamedConfig, error)
	//BuildOsqueryPackAsJSON(nc osquery_types.OsqueryNamedConfig) (json.RawMessage)
	BuildNamedConfig(configName string) (osquery_types.OsqueryNamedConfig, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL