summaryrefslogtreecommitdiffstats
path: root/ipapython/ipautil.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipapython/ipautil.py')
-rw-r--r--ipapython/ipautil.py69
1 files changed, 0 insertions, 69 deletions
diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py
index 0e2532dc9..81a079285 100644
--- a/ipapython/ipautil.py
+++ b/ipapython/ipautil.py
@@ -1,5 +1,4 @@
# Authors: Simo Sorce <ssorce@redhat.com>
-# Alexander Bokovoy <abokovoy@redhat.com>
#
# Copyright (C) 2007-2011 Red Hat
# see file 'COPYING' for use and warranty information
@@ -1128,71 +1127,3 @@ def bind_port_responder(port, socket_stream=True, socket_timeout=None, responder
finally:
s.close()
-class AuthConfig:
- """
- AuthConfig class implements system-independent interface to configure
- system authentication resources. In Red Hat systems this is done with
- authconfig(8) utility.
-
- AuthConfig class is nothing more than a tool to gather configuration options
- and execute their processing. These options then converted by an actual implementation
- to series of a system calls to appropriate utilities performing real configuration.
-
- Actual implementation should be done in ipapython/platform/<platform>.py by inheriting from ipautil.AuthConfig
- and redefining __build_args() and execute() methods.
- ....
- class PlatformAuthConfig(ipautil.AuthConfig):
- def __build_args():
- ...
-
- def execute():
- ...
-
- authconfig = PlatformAuthConfig
- ....
-
- See ipapython/platform/redhat.py for a sample implementation that uses authconfig(8) as its backend.
-
- From IPA perspective, the authentication configuration should be done with use of ipapython.services.authconfig:
-
- auth_config = ipapython.services.authconfig()
- auth_config.disable("ldap").\
- disable("krb5").\
- disable("sssd").\
- disable("sssdauth").\
- disable("mkhomedir").\
- add_option("update").\
- enable("nis").\
- add_parameter("nisdomain","foobar")
- auth_config.execute()
- """
-
- def __init__(self):
- self.parameters = {}
-
- def enable(self, option):
- self.parameters[option] = True
- return self
-
- def disable(self, option):
- self.parameters[option] = False
- return self
-
- def add_option(self, option):
- self.parameters[option] = None
- return self
-
- def add_parameter(self, option, value):
- self.parameters[option] = [value]
- return self
-
- def __build_args(self):
- # do nothing
- return None
-
- def execute(self):
- # do nothing
- return None
-
-
-