Skip to main content

pretix LDAP

LDAP authentication plugin for pretix.

Installation

You can install the plugin using

$ pip install pretix-ldap

You need to enable the plugin by including pretix_ldap.LDAPAuthBackend in the auth_backends option in your pretix.cfg (see https://docs.pretix.eu/en/latest/admin/config.html).

You also need to add a [ldap] section in your pretix.cfg to configure the connection to the ldap server.

Options are:

bind_url

The url of the ldap server (required) Example: ldap://ldap.example.com

bind_dn

The dn of the account to use to query the ldap server (required) Example: cn=readonly,dc=example,dc=com

bind_password

The password of the account to use to query the ldap server (required) Example: changeme

search_base

The search base (required) Example: ou=people,dc=example,dc=com

search_filter

Filter to search for users. You can use placeholders in curly braces, which will get populated from form fields of the same name. Default: (&(objectClass=inetOrgPerson)(mail={email})) Example: (&(objectClass=inetOrgPerson)(memberOf=cn=pretix,ou=groups,dc=example,dc=com)(mail={email}))

email_attr

The name of an attribute that can be used to retrieve the user’s email address Default: mail

unique_attr

The name of a stable attribute that can be used to uniquely identify a user Default: dn Example: entryUUID

Example Deployment

An example deployment using docker-compose can be found in the example folder.

After running docker-compose up you should be able to log in at http://localhost:80/control using the email “admin@example.com” and password “password”.

Development setup

  1. Make sure that you have a working pretix development setup.

  2. Clone this repository, eg to local/pretix-ldap.

  3. Activate the virtual environment you use for pretix development.

  4. Execute python setup.py develop within this directory to register this application with pretix’s plugin registry.

  5. Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in the ‘plugins’ tab in the settings.

Running CI linter and tests locally

  1. Install nix

  2. Enter devshell: nix develop

  3. Build package:

    python -m build
  4. Run linter:

    flake8
  5. Run tests:

    cp -r dist tests
    
    cd tests
    
    pytest

License

Copyright 2019 sohalt

Released under the terms of the Apache License 2.0

Metadata

Release files for pretix-ldap 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pretix-ldap 0.2.5
File Size Uploaded Provenance
pretix_ldap-0.2.5.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pretix-ldap 0.2.5
File Interpreter ABI Platform
pretix_ldap-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / pretix_ldap-0.2.5.tar.gz

Download URL pretix_ldap-0.2.5.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c3cf9dc8ff733e0f8070376a8756179fd3e3c32f5319076679824271169a6d18
BLAKE2b-256 checksum
How to use checksums
74ae3ea8fdca205eb01279dabd73071a91ea698b24564a0862c5999ae5ccd0f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / pretix_ldap-0.2.5-py3-none-any.whl

Download URL pretix_ldap-0.2.5-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7afa2cc61d73de00c9191a6a43a9431049e27e6d2f7c290dccfef2d59b98d43e
BLAKE2b-256 checksum
How to use checksums
ec225a502cf3373115939d0d265992f7f0da1665bd246ab01de6fd833a4f6391
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Security for pretix-ldap 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page