Alirpunkto (Access Point in Esperanto) is a web application for centralizing authentication and account creation with moderation. It is written in Python3, Pyramid, Chameleon, LDAP, Tal/Metal, and Bootstrap 5.
All the documentation is in the docs folder.
We use Obsidian notes, so if you see [[A Name]] in our notes, it's a link to the markdown file named "A Name.md".
For an enhanced experience, you can use Obsidian or Markdown Memo in Visual Studio Code.
docs/fr contains the French documentation
docs/en contains the English documentation
Clone this repository
cd YourWorkingFolder
git clone git@github.com:michaellaunay/alirpunkto.git
python3 -m venv alirpunkto
cd alirpunktoActivate this virtual environment
source bin/activateUpdate
bin/pip install --upgrade pip setuptools
pip list --outdated --format=columns | tail -n +3 | awk '{print $1}' | xargs -n1 pip install -UInstall pyramid
pip install pyramid pyramid_chameleon python-dotenv ldap3 pyramid_beaker pyramid_mailer py3dns validate_email cryptography bcrypt python-keycloak pyjwtWe need ZODB to store vote and session informations.
- Change directory into your newly created project if not already there. Your current directory should be the same as this README.txt file and setup.py.
cd alirpunkto- Install the project in editable mode with its testing requirements.
bin/pip install -e ".[testing]"- Create de var folder
mkdir -p var/log var/datas var/filestorage var/sessions- Create the secret file containing your keys
cp .env.example .envGenerate a secret whith
python3 alirpunkto/generate_secret.pyAnd change the SECRET_KEY inside the .env file.
Here's the translated documentation in English for including in the README.md file of your AlirPunkto project, explaining how to add the alirpunkto/alirpunkto_schema.ldif schema to OpenLDAP on Ubuntu 22.04:
Add alirpkunto_schema.ldif as describe bellow
- Run your project's tests.
bin/pytestYou should have no error !
- Run your project.
bin/pserve development.iniThis section guides you through the steps to integrate the custom alirpunkto_schema.ldif schema into an OpenLDAP server on Ubuntu 22.04.
- An OpenLDAP server installed on Ubuntu 22.04.
- Administrative rights on the LDAP server.
- The
alirpunkto_schema.ldiffile available in thealirpunktodirectory of this project. - You can replace the PEN number with your own before proceeding with the installation.
-
Server Connection
Log into your Ubuntu server where OpenLDAP is installed. -
Stopping LDAP Service
Before making any configuration changes, stop the LDAP service to prevent data corruption.sudo systemctl stop slapd
-
Locating the Schema File
Ensure that thealirpunkto_schema.ldiffile is present on the server. If not, transfer it to an appropriate directory (e.g.,/tmp). -
Adding the Schema to LDAP Server
Run the following command to add the schema to your LDAP directory:sudo apt install schema2ldif ldap-schema-manager -i /path/to/alirpunkto_schema.ldif ldap-schema-manager -m /path/to/alirpunkto_schema.ldif -n
Replace
/path/to/alirpunkto_schema.ldifwith the actual path of thealirpunkto_schema.ldiffile on your server. -
Restarting LDAP Service
After successfully adding the schema, restart the LDAP service:sudo systemctl start slapd
-
Verification
Verify that the schema has been added correctly. You can do this by checking the OpenLDAP logs or using an LDAP tool to explore the schema configuration.
If you encounter any issues while adding the schema, check the OpenLDAP logs for detailed error information. The logs can often provide useful clues about what might have gone wrong.
- Ensure you have a backup of the existing LDAP configuration before making changes.
- Any modifications to the LDAP configuration should be carried out with caution, as errors can affect the stability and security of the service.
- Test changes in a development environment before applying them on a production server.