Table of contents Index
class MasterSession
Declared in module Session
Inheritance hierarchy:
Session.MasterSession
Session.AbstractSession
Synopsis
class MasterSession(AbstractSession):
def Session.MasterSession.__init__(self) # Initializes a MasterSession instance.
def Session.MasterSession.setClient(self, fd, addr) # Set client address and perform access control.
def Session.MasterSession.setServer(self, addr) # Set the server address and perform access control checks.
def Session.MasterSession.setService(self, service) # Sets the service belonging to this session.
def Session.MasterSession.setServiceInstance(self, instance_id) # Set service instance number and recalculate session id.
# Inherited from Session.AbstractSession
def Session.AbstractSession.destroy(self) # Destroys the session.
Description
Master session class.
Attributes:
-
client_fd
- client fd
-
client_stream
- client stream
-
client_address
- SockAddr instance containing client address
-
client_local
- local address (on the firewall)
-
client_zone
- zone of the client
-
server_fd
- server fd
-
server_stream
- server stream
-
server_address
- SockAddr instance containing server address
-
server_local
- local address (on the firewall)
-
server_zone
- zone of the server
-
service
- service instance this session runs
-
session_id
- unique identifier for this session in the
format: "(firewall/service:instance id/proxy)"
-
instance_id
- the instance identifier of the service
(sequence number)
-
auth
- authentication method
Session.MasterSession.__init__(self)
Initializes a MasterSession instance.
- self
- this instance
Session.MasterSession.setClient(self, fd, addr)
Set client address and perform access control.
- self
- this instance
- fd
- fd of the client
- addr
- sockaddr of the client
Sets the client address of the given session, and performs
access control checks.
Notes:
Stores the client fd and address, looks up the
client zone, and performs both DAC and MAC
access control. Raises an exception on failure.
Session.MasterSession.setServer(self, addr)
Set the server address and perform access control checks.
- self
- this instance
- addr
- Server address
Stores the server address of the given connection, looks
up server zone and performs access control and raises an
exception upon failure.
Session.MasterSession.setService(self, service)
Sets the service belonging to this session.
- self
- this instance
- service
- Service instance
Stores the service reference, and recalculates the session_id
Session.MasterSession.setServiceInstance(self, instance_id)
Set service instance number and recalculate session id.
Sets service instance number, and makes up a unique
identifier for this session.
Parameters:
-
self
- this instance
-
instance_id
- unique identifier of the service instance
Copyright © 2000 BalaBit IT Ltd.
Written by: Balázs Scheidler