Esempio n. 1
0
    def __init__(self,
        auth_by_cert=FORBIDDEN,
        portal_enabled=False,
        portal_nets=None,
        strict=False,
        ca='', #certconf
        cert='', #certconf
        crl='', #certconf
        key='', #certconf
        nupki_pki='', #certconf
        nupki_cert='', #certconf
        use_nupki=False, #certconf
        disable_crl=True #certconf
        ):

        if portal_nets is None:
            portal_nets = set()

        AbstractConf.__init__(self)
        CertConf.__init__(
            self,
            ca=ca,
            cert=cert,
            crl=crl,
            key=key,
            nupki_pki=nupki_pki,
            nupki_cert=nupki_cert,
            use_nupki=use_nupki,
            disable_crl=disable_crl
            )

        self.auth_by_cert = auth_by_cert
        self.portal_enabled = portal_enabled
        self.portal_nets = portal_nets
        self.strict = strict
Esempio n. 2
0
 def __init__(
     self, admin_mail='',
     sender_mail='',
     language='en',
     ):
     AbstractConf.__init__(self)
     self._setLocals(locals())
Esempio n. 3
0
 def __init__(self, label="", ldapuri="", bind_dn="", bind_pw="", tls=False,
              checkcert=False, ca_cert="", user_attr_name="",
              user_base_dn="", user_filter="", user_member_attr="",
              group_attr_name="", group_base_dn="", group_enum_filter="",
              group_filter="", group_member_attr=""):
     AbstractConf.__init__(self)
     self.supposed_port = None
     self._setLocals(locals())
Esempio n. 4
0
    def __init__(self, ha_type=None, interface_id=None, interface_name=None, primary_hostname=None):
        AbstractConf.__init__(self)

        self.ha_type = \
        self.interface_id = \
        self.interface_name = \
        self.primary_hostname = None

        self._setLocals(locals())
Esempio n. 5
0
 def __init__(self, auth=None, org=None):
     """
     Default values for auth/org: same empty ldap server for auth and org
     """
     self.__ldap_cert_present = False
     AbstractConf.__init__(self)
     if auth is None:
         auth = NotConfiguredAuth()
     if org is None:
         org = NotConfiguredOrg()
     self._setLocals(locals())
Esempio n. 6
0
    def __init__(self, identifier=None, fingerprint="", peer="", unique_id=None):
        AbstractConf.__init__(self)
        PersistentID.__init__(self, unique_id=unique_id)
        self._fingerprint = None
        if identifier is None:
            identifier = _nextFingerprintIdentifier()

        #don't use self._setLocals(locals()) (or unique_id is set to None)
        self.identifier = identifier
        self.fingerprint = fingerprint
        self.peer = peer
Esempio n. 7
0
 def __init__(self,
              enabled=False,
              super_password="",
              v2c_list=None,
              v3_list=None):
     if v2c_list is None:
         v2c_list = []
     if v3_list is None:
         v3_list = []
     AbstractConf.__init__(self)
     self._setLocals(locals())
Esempio n. 8
0
 def __init__(self, ca="", certificate="", crl="", disable_crl=False,
              enabled=False, components=None, key="", servers=None,
              use_pki=""):
     if servers is None:
         servers = []
     if components is None:
         components = {
             "ulogd": {
                 "enabled": False,
                 "facility": "local4",
                 "level": "info"}}
     AbstractConf.__init__(self)
     self._setLocals(locals())
Esempio n. 9
0
    def __init__(self, client_network='', enabled=False, port='1194', protocol='udp',
            redirect=False, server='', manual_pushed_routes = (), ca='', cert='', crl='',
            key='', nupki_pki='', nupki_cert='', use_nupki=False, disable_crl=False):


        AbstractConf.__init__(self)
        CertConf.__init__(self, ca=ca, cert=cert, crl=crl,
            key=key, nupki_pki=nupki_pki, nupki_cert=nupki_cert, use_nupki=use_nupki, disable_crl=disable_crl)
        self.client_network = client_network
        self.enabled = bool(enabled)
        self.port = port
        self.protocol = protocol
        self.redirect = redirect
        self.server = server
        self.manual_pushed_routes = manual_pushed_routes
Esempio n. 10
0
    def __init__(
        self,
        enabled=False,
        vpns=None,
        fingerprints=None,
        myfingerprint="UNKNOWN_FINGERPRINT"):

        if vpns is None:
            #it's useful to have an _ordered_ list in the interface
            vpns = list()
        if fingerprints is None:
            #it's useful to have an _ordered_ list in the interface
            fingerprints = list()
        AbstractConf.__init__(self)

        #don't use self._setLocals(locals())
        self.myfingerprint = myfingerprint
        self.enabled = enabled
        self.fingerprints = fingerprints
        self.vpns = vpns
Esempio n. 11
0
    def __init__(self,
        enabled=True,
        identifier=None,
        local_network="",
        public_address="",
        gateway="",
        remote_network="",
        pfs=False,
        key_life=3600, #seconds
        ike_lifetime=3600, #seconds
        esp="",
        psk="",
        rsa=0):
        AbstractConf.__init__(self)

        if identifier is None:
            identifier = _nextVPNIdentifier()

        self._setLocals(locals())

        self.status = False
Esempio n. 12
0
 def __init__(self,
              antivirus_enabled=False,
              auth='ip',
              authorized_ips=None,
              blacklist_enabled=False,
              categories_blacklist=None,
              categories_whitelist=None,
              enabled=False,
              parent_enabled=False,
              parent_host='',
              parent_password='',
              parent_port=3128,
              parent_user='',
              transparent=False,
              whitelist_mode=False):
     if authorized_ips is None:
         authorized_ips = []
     if categories_blacklist is None:
         categories_blacklist = []
     if categories_whitelist is None:
         categories_whitelist = []
     AbstractConf.__init__(self)
     self._setLocals(locals())
Esempio n. 13
0
 def __init__(self, auto_check=False, update_mirror='',
              use_custom_mirror=False):
     AbstractConf.__init__(self)
     self._setLocals(locals())
Esempio n. 14
0
 def __init__(self, label="", realm="", type_="LDAP", user_base_dn="",
     user_attr_name="", user_filter="", user_member_attr="",
     group_attr_name="", group_base_dn="", group_enum_filter="",
     group_filter="", group_member_attr="", servers=None):
     self._setLocals(locals())
     AbstractConf.__init__(self)
Esempio n. 15
0
 def __init__(self, use_proxy=False, host='', port=3128, user='',
              password=''):
     AbstractConf.__init__(self)
     self._setLocals(locals())
Esempio n. 16
0
 def __init__(self, permissions={}, custom_networks=tuple()):
     AbstractConf.__init__(self)
     self._setLocals(locals())