Documentation ¶
Overview ¶
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 ¶
- func NewDefaultProxyEnforcer(serverID string, collector collector.EventCollector, secrets secrets.Secrets, ...) enforcer.Enforcer
- func NewProxyEnforcer(mutualAuth bool, filterQueue *fqconfig.FilterQueue, ...) enforcer.Enforcer
- type ProxyInfo
- func (s *ProxyInfo) EnableDatapathPacketTracing(contextID string, direction packettracing.TracingDirection, ...) error
- func (s *ProxyInfo) Enforce(contextID string, puInfo *policy.PUInfo) error
- func (s *ProxyInfo) GetFilterQueue() *fqconfig.FilterQueue
- func (s *ProxyInfo) InitRemoteEnforcer(contextID string) error
- func (s *ProxyInfo) Run(ctx context.Context) error
- func (s *ProxyInfo) SetTargetNetworks(networks []string) error
- func (s *ProxyInfo) Unenforce(contextID string) error
- func (s *ProxyInfo) UpdateSecrets(token secrets.Secrets) error
- type StatsServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultProxyEnforcer ¶
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 ¶
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.
Types ¶
type ProxyInfo ¶
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) EnableDatapathPacketTracing ¶
func (s *ProxyInfo) EnableDatapathPacketTracing(contextID string, direction packettracing.TracingDirection, interval time.Duration) error
EnableDatapathPacketTracing enable nfq packet tracing in remote container
func (*ProxyInfo) GetFilterQueue ¶
func (s *ProxyInfo) GetFilterQueue() *fqconfig.FilterQueue
GetFilterQueue returns the current FilterQueueConfig.
func (*ProxyInfo) InitRemoteEnforcer ¶
InitRemoteEnforcer method makes a RPC call to the remote enforcer
func (*ProxyInfo) SetTargetNetworks ¶
SetTargetNetworks does the RPC call for SetTargetNetworks to the corresponding remote enforcers
type StatsServer ¶
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 ¶
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.
func (*StatsServer) PostPacketEvent ¶
func (r *StatsServer) PostPacketEvent(req rpcwrapper.Request, resp *rpcwrapper.Response) error
PostPacketEvent is called from the remote to post multiple records from the remoteenforcer