orchestrator

package
v0.28.15-fix-metric-label Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: AGPL-3.0 Imports: 19 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CorruptedConnector

type CorruptedConnector struct {
	// contains filtered or unexported fields
}

func NewCorruptedConnector

func NewCorruptedConnector(
	logger zerolog.Logger,
	corruptedNodeIds flow.IdentityList,
	corruptedPortMapping map[flow.Identifier]string) *CorruptedConnector

func (*CorruptedConnector) Connect

Connect creates a connection the corruptible conduit factory of the given corrupted identity.

func (*CorruptedConnector) WithIncomingMessageHandler

func (c *CorruptedConnector) WithIncomingMessageHandler(handler func(*insecure.Message))

WithIncomingMessageHandler sets the handler for the incoming messages from remote corrupted nodes.

type CorruptedNodeConnection

type CorruptedNodeConnection struct {
	component.Component
	// contains filtered or unexported fields
}

CorruptedNodeConnection abstracts connection between an attack orchestrator to a corruptible conduit factory (ccf) through the orchestrator network.

func (*CorruptedNodeConnection) CloseConnection

func (c *CorruptedNodeConnection) CloseConnection() error

CloseConnection closes the connection to the corrupted conduit factory.

func (*CorruptedNodeConnection) SendMessage

func (c *CorruptedNodeConnection) SendMessage(message *insecure.Message) error

SendMessage sends the message from orchestrator to the corrupted conduit factory.

type Network

type Network struct {
	component.Component
	// contains filtered or unexported fields
}

Network implements a middleware for mounting an attack orchestrator and empowering it to communicate with the corrupt nodes.

func NewOrchestratorNetwork

func NewOrchestratorNetwork(
	logger zerolog.Logger,
	codec network.Codec,
	orchestrator insecure.AttackOrchestrator,
	connector insecure.CorruptedNodeConnector,
	corruptNodeIds flow.IdentityList) (*Network, error)

func (*Network) Observe

func (on *Network) Observe(message *insecure.Message)

Observe is the inbound message handler of the orchestrator network. Instead of dispatching their messages to the networking layer of Flow, the corrupt nodes dispatch both the incoming (i.e., ingress) as well as the outgoing (i.e., egress) messages to the orchestrator network by calling the InboundHandler method of it remotely.

func (*Network) SendEgress

func (on *Network) SendEgress(event *insecure.EgressEvent) error

SendEgress enforces dissemination of given event via its encapsulated corrupt node networking layer through the Flow network. An orchestrator decides when to send an egress message on behalf of a corrupt node.

func (*Network) SendIngress

func (on *Network) SendIngress(event *insecure.IngressEvent) error

SendIngress sends an incoming message from the flow network (from another node that could be or honest or corrupt) to the corrupt node. This message was intercepted by the orchestrator network and relayed to the orchestrator before being sent to the corrupt node.

Jump to

Keyboard shortcuts

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