web2ldap - hosts.pyThe configuration module directory web2ldapcnf/ |
|
This section describes the parameters related to specific LDAP hosts/backends.
[addform_entry_templates] [binddnsearch] [description] [groupadm_defs] [input_template] [link_css] [login_default_mech] [login_template] [modify_constant_attrs] [passwd_hashtypes] [print_cols] [print_template] [read_operationalattrstemplate] [read_template] [rename_supsearchurl] [requested_attrs] [schema_uri] [search_attrs] [searchform_basesearchurl] [search_resultsperpage] [search_tablistattrs] [search_tdtemplate] [searchform_template] [ssl_minlevel] [ssl_valid_dn] [ssl_valid_idn] [starttls] [timeout] [tls_cacertdir] [tls_cacertfile] [tls_certfile] [tls_keyfile] [vcard_template]
List of LDAP URLs which will appear in the default select list of the login form. It may contain either strings (only a LDAP URL) or 2-tuples of strings containing LDAP URL and description.
Example:
ldap_uri_list = [
'ldap://localhost',
('ldap://ldap.openldap.org',u"OpenLDAP's demo server"),
]
If non-zero (or True) gateway access is restricted to the
LDAP servers specified in ldap_uri_list.
Note that the check is case sensitive (because of possibly case-sensitive
path names of Unix domain sockets for LDAPI)!
Default in source distribution: 1 (restriction enabled)
This is a string-keyed dictionary (Python data structure) which holds all options specific for certain LDAP hosts or backends( naming contexts). The values of the dictionary ldap_def are of the simple class Web2LDAPConfig which is instantiated via key word arguments
Any configuration parameter in the dictionary web2ldapcnf.hosts.ldap_def is retrieved by looking at all dictionary items with string-keys
'ldap://ldap_host/ldap_basedn','ldap:///ldap_basedn','ldap://ldap_host' and'_'
in this particular order. All those string-key MUST
be valid LDAP URLs except for the default section which is
marked by a single underscore.
This allows to hold several database backends on the same host with
the same DNS name. It also shortens the ldap_def dictionary by
avoiding having to repeat same options for every server and
makes browsing of completely unconfigured hosts easy.
ldap_def = {
'_': {
# Default fall-back options
},
'ldap://nldap.com': {
# Per-host options for host nldap.com
},
'ldap:///dc=openldap,dc=org': {
# Options for naming context dc=openldap,dc=org
# regardless on which server
},
'ldap://localhost/dc=stroeder,dc=com': {
# Options dictionary entries for backend
# on host localhost with naming context dc=stroeder,dc=com
}
}
Now each parameter is described. A system default value is assumed
if the parameter was not defined at all (no dictionary key
parameter). Most times this default value simply switches
off a certain behaviour.

{}os.path.join(web2ldapcnf.templates_dir,..) automatically
determines the standard template directory):
addform_entry_templates={
'Person':os.path.join(web2ldapcnf.templates_dir,'add_person.ldif'),
'My User Account':'/home/web2ldap/lib/add_myuser.ldif'),
},
'(uid=%s)'
'''My nifty LDAP server for user accounts'
''
"""
<link rel="stylesheet" media="screen" href="/css/web2ldap/fixed.css">
<link rel="stylesheet" media="print, embossed" href="/css/web2ldap/print.css">
""",
'' (simple bind)login_default_mech='DIGEST-MD5')
''login_template=os.path.join(web2ldapcnf.templates_dir,'login.html')
['createTimestamp','modifyTimestamp','creatorsName','modifiersName']modify_constant_attrs=['entryCSN','entryDN','entryUUID','createTimestamp','modifyTimestamp','creatorsName','modifiersName','uSNChanged','uSNCreated','whenChanged','whenCreated']
{}
groupadm_defs={
'groupOfNames': ('member',None),
'groupOfUniqueNames': ('uniqueMember',None),
'rfc822MailGroup': ('mail','mail'),
'mailGroup': ('mgrprfc822mailmember','mail'),
'accessGroup': ('member',None),
'posixGroup': ('memberUid','uid'),
},
[]'passwd_hashtypes':['smd5','ssha']'4'None
print_template={
# 'object class':'pathname of printable HTML template file'
'person':os.path.join(web2ldapcnf.templates_dir,'print_person.html'),
'organization':os.path.join(web2ldapcnf.templates_dir,'print_organization.html'),
'organizationalUnit':os.path.join(web2ldapcnf.templates_dir,'print_organizationalUnit.html'),
},
''{}
read_template={
# 'object class':'pathname of HTML template file'
'inetOrgPerson':os.path.join(web2ldapcnf.templates_dir,'read_inetOrgPerson.html'),
'organizationalPerson':os.path.join(web2ldapcnf.templates_dir,'read_inetOrgPerson.html'),
'organization':os.path.join(web2ldapcnf.templates_dir,'read_organization.html'),
'posixAccount':os.path.join(web2ldapcnf.templates_dir,'read_posixAccount.html'),
},
{}
input_template={
'inetOrgPerson':os.path.join(web2ldapcnf.templates_dir,'inputform_inetOrgPerson.html'),
'posixAccount':os.path.join(web2ldapcnf.templates_dir,'inputform_posixAccount.html'),
'msPerson':os.path.join(web2ldapcnf.templates_dir,'inputform_msPerson.html'),
},
[]''
rename_supsearchurl={
u'Search for organizational units':'ldap:///dc=stroeder,dc=de??sub?(objectClass=organizationalUnit)',
u'Search for organizations':'ldap:///dc=stroeder,dc=de??sub?(objectClass=organization)',
},
['cn','mail']()
searchform_bases=(
'..',
'ou=Bizness,dc=example,dc=com',
'ou=Friends,dc=example,dc=com'
)
''
searchform_basesearchurl='ldap:///dc=example,dc=com??sub?(|(objectClass=organization)(objectClass=organizationalUnit))'
10[]{}''
searchform_template= {
u'_':os.path.join(web2ldapcnf.templates_dir,'searchform_Base.html'),
u'Users':os.path.join(web2ldapcnf.templates_dir,'searchform_users.html'),
u'Orga':os.path.join(web2ldapcnf.templates_dir,'searchform_orga.html'),
u'Persons':os.path.join(web2ldapcnf.templates_dir,'searchform_persons.html'),
},
0''''0''''''''-1{}