Package: cone.ldap
Plugin forcone.appproviding LDAP
integration.FeaturesLDAP access vianode.ext.ldapApplication integration intocone.appIntegration intocone.ugmPOSIX supportSamba supportDevelopment SetupPrerequirementslxml,python-ldapandopenldapgets compiled, the required dev
headers must be installed on the system.On debian based systems install:$apt-getinstall-ylibxml2-devlibxslt1-dev$apt-getinstall-ylibsasl2-devlibssl-devlibdb-devInstallationcone.ldapcontains a buildout configuration. Download or checkout package
and run:cone.ldap$./bootstrap.shpython3Start Test LDAP server with appropriate LDIF layer:cone.ldap$./bin/testldapstartgroupOfNames_10_10Start the application:cone.ldap$./bin/pservecfg/gon_10_10/ldap_gon_10_10.iniand browsehttp://localhost:8081/. Defaultadminuser password isadmin.The “roles” behavior in the principal form is only displayed if roles
configuration is sane. The LDIF imported for test layer does not provide the
roles container by default. Browse “Settings -> LDAP Roles” and perform
“create roles container” action if you want to enable roles in the demo.Note: Ifpython_ldapfails, don’t use buildout offline mode!Configuration and CustomizationGeneralFor customizing the plugin, make an integration package and include it in
your setup.Application configurationTo define the LDAP related configuration locations, provide the following
settings in your application ini file.# LDAP UGM backend activationugm.backend=ldap# Basic LDAP server configurationldap.server_config=/path/to/ldap_server.xml# LDAP UGM backend related configurationldap.users_config=/path/to/ldap_users.xmlldap.groups_config=/path/to/ldap_groups.xmlldap.roles_config=/path/to/ldap_roles.xmlExamples of these configuration file can be found atcfgfolder of the
source package.UGM Default values and default value callbacksDepending on the LDAP object classes used for users and groups, more or less
attributes are required for the entries. Maybe not all of these attributes
should be visible to the user. Some might even require to be computed.
Therefor the plugin supports default values and default value callbacks.Default values and callbacks are registered viafactory_defaults.users,factory_defaults.groupsandfactory_defaults.roles.fromcone.ldap.settingsimportfactory_defaultsThe factory defaults can be static values.factory_defaults.user['someField']='12345'Default value callbacks get the principal node and id as attributes.defsome_field_callback(node,id):return'some computed value'factory_defaults.user['someField']=some_field_callbackSamba supportExample configuration to enable samba support.fromcone.ldap.settingsimportfactory_defaultsfromnode.ext.ldap.ugmimportposixfromnode.ext.ldap.ugmimportshadowfromnode.ext.ldap.ugmimportsambasamba.SAMBA_LOCAL_SID='S-1-5-21-1234567890-1234567890-1234567890'samba.SAMBA_DEFAULT_DOMAIN='yourdomain'samba.SAMBA_PRIMARY_GROUP_SID='S-1-5-21-1234567890-1234567890-1234567890-123'user=factory_defaults.useruser['gidNumber']=posix.memberGiduser['loginShell']=posix.loginShelluser['shadowFlag']=shadow.shadowFlaguser['shadowMin']=shadow.shadowMinuser['shadowMax']=shadow.shadowMaxuser['shadowWarning']=shadow.shadowWarninguser['shadowInactive']=shadow.shadowInactiveuser['shadowLastChange']=shadow.shadowLastChangeuser['shadowExpire']=shadow.shadowExpireuser['sambaSID']=samba.sambaUserSIDuser['sambaDomainName']=samba.sambaDomainNameuser['sambaPrimaryGroupSID']=samba.sambaPrimaryGroupSIDuser['sambaAcctFlags']=samba.sambaAcctFlagsuser['sambaPwdLastSet']=samba.sambaPwdLastSetgroup=factory_defaults.groupfactory_defaults.group['memberUid']=posix.memberUidContributorsRobert Niederreiter (Author)Changes0.2 (2022-12-05)Moveusers_expires_attrandusers_expires_unitsettings from cone.ugm,
since they always have been used only for LDAP UGM backend.0.1 (2020-07-09)Initial release.LicenseCopyright (c) 2019-2021, BlueDynamics Alliance, Austria
Copyright (c) 2021-2022, Cone Contributors
All rights reserved.Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.