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 ¶
func (c *CorruptedConnector) Connect(ctx irrecoverable.SignalerContext, targetId flow.Identifier) (insecure.CorruptedNodeConnection, error)
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 NewCorruptedNodeConnection ¶
func NewCorruptedNodeConnection( logger zerolog.Logger, inboundHandler func(message *insecure.Message), outbound insecure.CorruptNetwork_ProcessAttackerMessageClient, inbound insecure.CorruptNetwork_ConnectAttackerClient) *CorruptedNodeConnection
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 ¶
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 ¶
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.