5.11.4.2. Proxy methods

MethodDescription
closedByAbort(self) Function called by the proxy core when an abort has been occured.
config(self) Function called by the proxy core to initialize the proxy instance.
connectServer(self) Function called by the proxy instance to establish the server-side connection.
getCredentials(self, method, username, domain, target, port) Function called when proxy requires credentials for server side authentication.
invalidPolicyCall(self) Invalid policy function called.
setServerAddress(self, host, port) Function called by the proxy instance to set the address of the destination server.
setServerSideEncryption(self) Function called by the proxy instance to set up the server side encryption parameters dynamically.
userAuthenticated(self, entity, groups, auth_info) Function called when inband authentication is successful.

Table 5.86. Method summary

Method closedByAbort(self)

This function is called when a callback gives abort or no result. It simply sets a flag that will be used for logging the reason of the proxy's ending.

Method config(self)

This function is called during proxy startup. It sets the attributes of the proxy instance according to the configuration of the proxy.

Method connectServer(self)

This function is called to establish the server-side connection. The function either connects a proxy to the destination server, or an embedded proxy to its parent proxy. The proxy may set the address of the destination server using the setServerAddress function.

The connectServer function calls the chainer specified in the service definition to connect to the remote server using the host name and port parameters.

The connectServer function returns the descriptor of the server-side data stream.

Method getCredentials(self, method, username, domain, target, port)

The proxy instance calls this function to retrieve authentication credentials for authentication method method and the target user username.

Arguments of getCredentials
domain (string)
Default: n/a
Domain the user name belongs to.

method (string)
Default: n/a
Method that will be used for authentication on target server.

port (integer)
Default: n/a
Target server port.

target (string)
Default: n/a
Target server hostname.

username (string)
Default: n/a
Username that will be used for authentication on target server.

Method invalidPolicyCall(self)

This function is called when invalid policy function has been called.

Method setServerAddress(self, host, port)

The proxy instance calls this function to set the address of the destination server. This function attempts to resolve the hostname of the server using the DNS; the result is stored in the session.server_address parameter. The address of the server may be modified later by the router of the service. See Section 5.13, Module Router for details.

Note

The setServerAddress function has effect only when InbandRouter is used.

Arguments of setServerAddress
host (string)
Default: n/a
The host name of the server.

port (integer)
Default: n/a
The Port number of the server.

Method setServerSideEncryption(self)

Function called by the proxy instance when the encryption scenario is dynamic (eg.: DynamicServerEncryption) to set up the server side encryption parameters. It should return with a DynamicServerEncryptionServerParams if DynamicServerEncryption scenario used otherwise with None.

This method unconditionally raises a NotImplementedError exception to indicate that it must be overridden by descendant classes like 'Proxy'.

Method userAuthenticated(self, entity, groups, auth_info)

The proxy instance calls this function to indicate that the inband authentication was successfully performed. The name of the client is stored in the entity parameter.

Arguments of userAuthenticated
entity (unknown)
Default: n/a
Username of the authenticated client.