agents

package
v0.9.1-beta Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: GPL-3.0 Imports: 24 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Agents = make(map[uuid.UUID]*agent)

Agents contains all of the instantiated agent object that are accessed by other modules

Functions

func AddJob added in v0.6.0

func AddJob(agentID uuid.UUID, jobType string, jobArgs []string) (string, error)

AddJob creates a job and adds it to the specified agent's channel and returns the Job ID or an error

func FileTransfer added in v0.8.0

func FileTransfer(m messages.Base) error

FileTransfer handles file upload/download operations

func GetAgentFieldValue added in v0.7.0

func GetAgentFieldValue(agentID uuid.UUID, field string) (string, error)

GetAgentFieldValue returns a string value for the field value belonging to the specified Agent

func GetAgentList

func GetAgentList() func(string) []string

GetAgentList returns a list of agents that exist and is used for command line tab completion

func GetAgentStatus added in v0.6.0

func GetAgentStatus(agentID uuid.UUID) string

GetAgentStatus evaluates the agent's last check in time and max wait time to determine if it is active, delayed, or dead

func GetEncryptionKey added in v0.8.0

func GetEncryptionKey(agentID uuid.UUID) []byte

GetEncryptionKey retrieves the per-agent payload encryption key used to decrypt messages for any protocol

func GetLifetime added in v0.8.0

func GetLifetime(agentID uuid.UUID) (time.Duration, error)

GetLifetime returns the amount an agent could live without successfully communicating with the server

func GetMessageForJob added in v0.6.0

func GetMessageForJob(agentID uuid.UUID, job Job) (messages.Base, error)

GetMessageForJob returns a Message Base structure for the provided job type

func JobResults added in v0.8.0

func JobResults(m messages.Base) error

JobResults handles the response message sent by the agent

func KeyExchange added in v0.8.0

func KeyExchange(m messages.Base) (messages.Base, error)

KeyExchange is used to exchange public keys between the server and agent

func Log

func Log(agentID uuid.UUID, logMessage string)

Log is used to write log messages to the agent's log file

func OPAQUEAuthenticateComplete added in v0.8.0

func OPAQUEAuthenticateComplete(m messages.Base) (messages.Base, error)

OPAQUEAuthenticateComplete is used to receive the OPAQUE UserAuthComplete

func OPAQUEAuthenticateInit added in v0.8.0

func OPAQUEAuthenticateInit(m messages.Base) (messages.Base, error)

OPAQUEAuthenticateInit is used to authenticate an agent leveraging the OPAQUE Password Authenticated Key Exchange (PAKE) protocol and pre-shared key

func OPAQUEReAuthenticate added in v0.8.0

func OPAQUEReAuthenticate(agentID uuid.UUID) (messages.Base, error)

OPAQUEReAuthenticate is used when an agent has previously completed OPAQUE registration but needs to re-authenticate

func OPAQUERegistrationComplete added in v0.8.0

func OPAQUERegistrationComplete(m messages.Base) (messages.Base, error)

OPAQUERegistrationComplete is used to complete OPAQUE user registration and store the encrypted envelope EnvU

func OPAQUERegistrationInit added in v0.8.0

func OPAQUERegistrationInit(m messages.Base, opaqueServerKey kyber.Scalar) (messages.Base, error)

OPAQUERegistrationInit is used to register an agent leveraging the OPAQUE Password Authenticated Key Exchange (PAKE) protocol

func RemoveAgent added in v0.6.0

func RemoveAgent(agentID uuid.UUID) error

RemoveAgent deletes the agent object from Agents map by its ID

func ShowInfo

func ShowInfo(agentID uuid.UUID)

ShowInfo lists all of the agent's structure value in a table

func StatusCheckIn

func StatusCheckIn(m messages.Base) (messages.Base, error)

StatusCheckIn is the function that is run when an agent sends a message back to server, checking in for additional instructions

func UpdateInfo added in v0.6.0

func UpdateInfo(m messages.Base) error

UpdateInfo is used to update an agent's information with the passed in message data

Types

type Job added in v0.6.0

type Job struct {
	ID      string
	Type    string
	Status  string // Valid Statuses are created, sent, returned //TODO this might not be needed
	Args    []string
	Created time.Time
}

Job is a structure for holding data for single task assigned to a single agent

Jump to

Keyboard shortcuts

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