Install software dependencies
apt install python3-dev libldap2-dev libsasl2-dev libssl-dev
Activate the Peering Manager venv
cd /opt/peering-manager/
source venv/bin/activate
Append the Django LDAP package to the app's requirements file
echo 'django-auth-ldap' >> local_requirements.txt
Run the requirements installation
pip3 install -r local_requirements.txt
Create a new LDAP config file
vim /opt/peering-manager/peering_manager/ladp_config.py
Use the following base config. Modify to match your environment
import ldap
# Server URI
AUTH_LDAP_SERVER_URI = "ldaps://ad.example.com"
# May be needed if you are binding to Active Directory
AUTH_LDAP_CONNECTION_OPTIONS = {
ldap.OPT_REFERRALS: 0
}
# Set the DN and password for the Peering service account
AUTH_LDAP_BIND_DN = "CN=Peering,OU=Service Accounts,DC=example,DC=com"
AUTH_LDAP_BIND_PASSWORD = "thisisnotasecurepassword"