_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c6900
// EncodedActionString is used to encode observed action as well as action
c6901
// EncodedStringToAction returns action and observed action from encoded string.
c6902
// Copy creates a clone of DNS rule list
c6903
// Copy creates a clone of the IP rule list
c6904
// Copy returns a copy of the TagSelectorList
c6905
// Copy copies an ExtendedMap
c6906
// Get does a lookup in the map
c6907
// newServer is a fake implementation for building on darwin.
c6908
// NewSecretsProxy creates a new secrets proxy.
c6909
// Run implements the run method of the CtrlInterface. It starts the proxy // server and initializes the data structures.
c6910
// Enforce implements the corresponding interface of enforcers.
c6911
// apiProcessor is called for every request. It processes the request // and forwards to the originator of the secrets service after // authenticating that the client can access the service.
c6912
// ValidateOriginProcess implements a strict validation of the origin process. We might add later.
c6913
// findParentCgroup returns the parent cgroup of the process caller
c6914
// NewSupervisor will create a new connection supervisor that uses IPTables // to redirect specific packets to userspace. It instantiates multiple data stores // to maintain efficient mappings between contextID, policy and IP addresses. This // simplifies the lookup operations at the expense of memory.
c6915
// Run starts the supervisor
c6916
// Supervise creates a mapping between an IP address and the corresponding labels. // it invokes the various handlers that process the parameter policy.
c6917
// Unsupervise removes the mapping from cache and cleans up the iptable rules. ALL // remove operations will print errors by they don't return error. We want to force // as much cleanup as possible to avoid stale state
c6918
// CleanUp implements the cleanup interface
c6919
// SetTargetNetworks sets the target networks of the supervisor
c6920
// UpdatePU creates a mapping between an IP address and the corresponding labels //and the invokes the various handlers that process all policies.
c6921
// EnableIPTablesPacketTracing enables ip tables packet tracing
c6922
// New creates a new instance of TokenAccessor interface
c6923
// SetToken updates sthe stored token in the struct
c6924
// CreateAckPacketToken creates the authentication token
c6925
// createSynPacketToken creates the authentication token
c6926
// createSynAckPacketToken creates the authentication token for SynAck packets // We need to sign the received token. No caching possible here
c6927
// parsePacketToken parses the packet token and populates the right state. // Returns an error if the token cannot be parsed or the signature fails
c6928
// parseAckToken parses the tokens in Ack packets. They don't carry all the state context // and it needs to be recovered
c6929
// NewMockEventCollector creates a new mock instance // nolint
c6930
// CollectFlowEvent indicates an expected call of CollectFlowEvent // nolint
c6931
// NewClient creates a new validator client
c6932
// Callback is the function that is called back by the IDP to catch the token // and perform all other validations. It will return the resulting token, // the original URL that was called to initiate the protocol, and the // http status response.
c6933
// AddRule adds a single rule to the ACL Cache
c6934
// AddRuleList adds a list of rules to the cache
c6935
// GetMatchingAction gets the matching action
c6936
// Enforce method makes a RPC call for the remote enforcer enforce method
c6937
// Unenforce stops enforcing policy for the given contextID.
c6938
// CleanUp sends a cleanup command to all the remotes forcing them to exit and clean their state.
c6939
// EnableDatapathPacketTracing enable nfq packet tracing in remote container
c6940
// SetTargetNetworks does the RPC call for SetTargetNetworks to the corresponding // remote enforcers
c6941
// Run starts the the remote enforcer proxy.
c6942
// initRemoteEnforcer method makes a RPC call to the remote enforcer
c6943
// NewProxyEnforcer creates a new proxy to remote enforcers.
c6944
// GetStats is the function called from the remoteenforcer when it has new flow events to publish.
c6945
// PostPacketEvent is called from the remote to post multiple records from the remoteenforcer
c6946
// NewHTTPProxy creates a new instance of proxy reate a new instance of Proxy
c6947
// clientTLSConfiguration calculates the right certificates and requests to the clients.
c6948
// newBaseTLSConfig creates the new basic TLS configuration for the server.
c6949
// UpdateSecrets updates the secrets
c6950
// GetCertificateFunc implements the TLS interface for getting the certificate. This // allows us to update the certificates of the connection on the fly.
c6951
// NewGoIPTablesProvider returns an IptablesProvider interface based on the go-iptables // external package.
c6952
// NewCustomBatchProvider is a custom batch provider wher the downstream // iptables utility is provided by the caller. Very useful for testing // the ACL functions with a mock.
c6953
// Append will append the provided rule to the local cache or call // directly the iptables command depending on the table.
c6954
// Insert will insert the rule in the corresponding position in the local // cache or call the corresponding iptables command, depending on the table.
c6955
// Delete will delete the rule from the local cache or the system.
c6956
// ListChains will provide a list of the current chains.
c6957
// NewChain creates a new chain.
c6958
// Commit commits the rules to the system
c6959
// RetrieveTable allows a caller to retrieve the final table. Mostly // needed for debuging and unit tests.
c6960
// restore will save the current DB to iptables.
c6961
// MockNewRPCClient mocks the NewRPCClient function
c6962
// MockGetRPCClient mocks the GetRPCClient function
c6963
// MockRemoteCall mocks the RemoteCall function
c6964
// MockDestroyRPCClient mocks the DestroyRPCClient function
c6965
// MockStartServer mocks the StartServer function
c6966
// MockProcessMessage mocks the ProcessMessage function
c6967
// MockContextList mocks the ContextList function
c6968
// MockCheckValidity mocks the CheckValidity function
c6969
// NewRPCClient implements the new interface
c6970
// GetRPCClient implements the interface with a mock
c6971
// RemoteCall implements the interface with a mock
c6972
// DestroyRPCClient implements the interface with a Mock
c6973
// CheckValidity implements the interface with a mock
c6974
// StartServer implements the interface with a mock
c6975
// ProcessMessage implements the interface with a mock
c6976
// ContextList implements the interface with a mock
c6977
// currentMocks returns the list of current mocks
c6978
// NewPU creates a new PU context
c6979
// RetrieveCachedExternalFlowPolicy returns the policy for an external IP
c6980
// NetworkACLPolicy retrieves the policy based on ACLs
c6981
// NetworkACLPolicyFromAddr retrieve the policy given an address and port.
c6982
// UpdateApplicationACLs updates the application ACL policy
c6983
// UpdateNetworkACLs updates the network ACL policy
c6984
// CacheExternalFlowPolicy will cache an external flow
c6985
// GetProcessKeys returns the cache keys for a process
c6986
// SynServiceContext returns synServiceContext
c6987
// UpdateSynServiceContext updates the synServiceContext
c6988
// GetCachedTokenAndServiceContext returns the cached syn packet token
c6989
// UpdateCachedTokenAndServiceContext updates the local cached token
c6990
// Scopes returns the scopes.
c6991
// GetJWT retrieves the JWT if it exists in the cache. Returns error otherwise.
c6992
// UpdateJWT updates the JWT and provides a new expiration date.
c6993
// createRuleDBs creates the database of rules from the policy
c6994
// CreateRcvRules create receive rules for this PU based on the update of the policy.
c6995
// CreateTxtRules create receive rules for this PU based on the update of the policy.
c6996
// searchRules searches all reject, accpet and observed rules and returns reporting and packet forwarding action
c6997
// SearchTxtRules searches both receive and observed transmit rules and returns the index and action
c6998
// SearchRcvRules searches both receive and observed receive rules and returns the index and action
c6999
// Register registers a new service with the registry. If the service // already exists it updates the service with the new information, otherwise // it creates a new service.