diff --git a/docs/backend_api.rst b/docs/backend_api.rst new file mode 100644 index 0000000..c485f89 --- /dev/null +++ b/docs/backend_api.rst @@ -0,0 +1,8 @@ +Package ldapcherry.backend +========================== + +.. automodule:: ldapcherry.backend + :members: + :undoc-members: + :show-inheritance: + diff --git a/docs/conf.py b/docs/conf.py index 1062054..2531003 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ sys.path.insert(0, os.path.abspath('..')) # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.viewcode'] +extensions = ['sphinx.ext.viewcode', 'sphinx.ext.todo', 'sphinx.ext.autodoc'] # Add any paths that contain templates here, relative to this directory. #templates_path = ['_templates'] diff --git a/docs/deploy.rst b/docs/deploy.rst index d235447..c0e8218 100644 --- a/docs/deploy.rst +++ b/docs/deploy.rst @@ -1,6 +1,13 @@ Deploy ====== +LdapCherry aims at being as simple as possible to deploy. +The Application is constituted of: + +* ldapcherryd: the daemon to lauch LdapCherry +* one ini file (ldapcherry.ini by default): the entry point for the configuration, containing all the "technical" attributes +* two yaml files (roles.yml and attributes by default): the files containing the roles and attributes definition + Launch ------ @@ -21,8 +28,27 @@ LdapCherry is launched using the internal cherrypy server: Roles and Attributes Configuration ---------------------------------- -General Configuration ---------------------- +Entry point in main configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The main configuration file (ldapcherry.ini by default) contains two parameters locating the roles and attributes configuration files: + ++-----------------+------------+-------------------------------+-------------------+---------+ +| Parameter | Section | Description | Values | Comment | ++=================+============+===============================+===================+=========+ +| attributes.file | attributes | Attributes configuration file | Path to conf file | | ++-----------------+------------+-------------------------------+-------------------+---------+ +| roles.file | roles | Roles configuration file | Path to conf file | | ++-----------------+------------+-------------------------------+-------------------+---------+ + +Attributes Configuration +~~~~~~~~~~~~~~~~~~~~~~~~ + +Roles Configuration +~~~~~~~~~~~~~~~~~~~ + +Main Configuration +------------------ Webserver ~~~~~~~~~ @@ -72,6 +98,9 @@ example: tools.staticdir.on = True tools.staticdir.dir = '/usr/share/ldapcherry/static/' +Backends +~~~~~~~~ + Authentication and sessions ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -182,5 +211,3 @@ Sample init script for Debian: :language: bash This init script is available in **goodies/init-debian**. - - diff --git a/docs/index.rst b/docs/index.rst index 01ef314..437deef 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,7 +7,8 @@ install deploy + backend_api + ppolicy_api changelog - .. include:: ../README.rst diff --git a/docs/ppolicy_api.rst b/docs/ppolicy_api.rst new file mode 100644 index 0000000..a6d2364 --- /dev/null +++ b/docs/ppolicy_api.rst @@ -0,0 +1,7 @@ +Package ldapcherry.ppolicy +========================== + +.. automodule:: ldapcherry.ppolicy + :members: + :undoc-members: + :show-inheritance: diff --git a/ldapcherry/ppolicy/__init__.py b/ldapcherry/ppolicy/__init__.py index 4332615..5b4f066 100644 --- a/ldapcherry/ppolicy/__init__.py +++ b/ldapcherry/ppolicy/__init__.py @@ -11,16 +11,18 @@ from ldapcherry.exceptions import MissingParameter class PPolicy: def __init__(self, config, logger): - """ password policy constructor - @dict config: the configuration of the ppolicy - @logger logger: a python logger + """ Password policy constructor + + :dict config: the configuration of the ppolicy + :logger logger: a python logger """ pass def check(self, password): - """ check that a password match the ppolicy - @str password: the password to check - @rtype: dict with keys 'match' a boolean + """ Check if a password match the ppolicy + + :str password: the password to check + :rtype: dict with keys 'match' a boolean (True if ppolicy matches, False otherwise) and 'reason', an explaination string """ @@ -28,15 +30,17 @@ class PPolicy: return ret def info(self): - """ gives information about the ppolicy - @rtype: a string describing the ppolicy + """ Gives information about the ppolicy + + :rtype: a string describing the ppolicy """ ret = "There is no password policy configured" def get_param(self, param, default=None): - """ - @str param: name of the paramter to recover - default: the default value, raises an exception + """ Get a parameter in config (handle default value) + + :str param: name of the paramter to recover + :str default: the default value, raises an exception if param is not in configuration and default is None (which is the default value). """