trireme-lib: go.aporeto.io/trireme-lib/controller/internal/enforcer/proxy Index | Files

package enforcerproxy

import "go.aporeto.io/trireme-lib/controller/internal/enforcer/proxy"

Package enforcerproxy :: This is the implementation of the RPC client It implements the interface of Trireme Enforcer and forwards these requests to the actual remote enforcer instead of implementing locally

Index

Package Files

enforcerproxy.go

func NewDefaultProxyEnforcer Uses

func NewDefaultProxyEnforcer(serverID string,
    collector collector.EventCollector,
    secrets secrets.Secrets,
    rpchdl rpcwrapper.RPCClient,
    procMountPoint string,
    targetNetworks []string,
    runtimeError chan *policy.RuntimeError,
) enforcer.Enforcer

NewDefaultProxyEnforcer This is the default datapth method. THis is implemented to keep the interface consistent whether we are local or remote enforcer.

func NewProxyEnforcer Uses

func NewProxyEnforcer(mutualAuth bool,
    filterQueue *fqconfig.FilterQueue,
    collector collector.EventCollector,
    secrets secrets.Secrets,
    serverID string,
    validity time.Duration,
    rpchdl rpcwrapper.RPCClient,
    cmdArg string,
    procMountPoint string,
    ExternalIPCacheTimeout time.Duration,
    packetLogs bool,
    targetNetworks []string,
    runtimeError chan *policy.RuntimeError,
) enforcer.Enforcer

NewProxyEnforcer creates a new proxy to remote enforcers.

type ProxyInfo Uses

type ProxyInfo struct {
    MutualAuth bool
    PacketLogs bool
    Secrets    secrets.Secrets

    ExternalIPCacheTimeout time.Duration

    sync.RWMutex
    // contains filtered or unexported fields
}

ProxyInfo is the struct used to hold state about active enforcers in the system

func (*ProxyInfo) Enforce Uses

func (s *ProxyInfo) Enforce(contextID string, puInfo *policy.PUInfo) error

Enforce method makes a RPC call for the remote enforcer enforce method

func (*ProxyInfo) GetFilterQueue Uses

func (s *ProxyInfo) GetFilterQueue() *fqconfig.FilterQueue

GetFilterQueue returns the current FilterQueueConfig.

func (*ProxyInfo) InitRemoteEnforcer Uses

func (s *ProxyInfo) InitRemoteEnforcer(contextID string) error

InitRemoteEnforcer method makes a RPC call to the remote enforcer

func (*ProxyInfo) Run Uses

func (s *ProxyInfo) Run(ctx context.Context) error

Run starts the the remote enforcer proxy.

func (*ProxyInfo) SetTargetNetworks Uses

func (s *ProxyInfo) SetTargetNetworks(networks []string) error

SetTargetNetworks does the RPC call for SetTargetNetworks to the corresponding remote enforcers

func (*ProxyInfo) Unenforce Uses

func (s *ProxyInfo) Unenforce(contextID string) error

Unenforce stops enforcing policy for the given contextID.

func (*ProxyInfo) UpdateSecrets Uses

func (s *ProxyInfo) UpdateSecrets(token secrets.Secrets) error

UpdateSecrets updates the secrets used for signing communication between trireme instances

type StatsServer Uses

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

StatsServer This struct is a receiver for Statsserver and maintains a handle to the RPC StatsServer.

func (*StatsServer) GetStats Uses

func (r *StatsServer) GetStats(req rpcwrapper.Request, resp *rpcwrapper.Response) error

GetStats is the function called from the remoteenforcer when it has new flow events to publish.

Package enforcerproxy imports 17 packages (graph) and is imported by 2 packages. Updated 2018-11-15. Refresh now. Tools for package owners.