Metadata-Version: 2.4
Name: redturtle.pasldap
Version: 1.0.0a4
Summary: A new addon for Plone
Home-page: https://github.com/RedTurtle/redturtle.pasldap
Author: RedTurtle
Author-email: mauro.amico@redturtle.it
License: GPL version 2
Project-URL: PyPI, https://pypi.org/project/redturtle.pasldap
Project-URL: Source, https://github.com/RedTurtle/redturtle.pasldap
Project-URL: Tracker, https://github.com/RedTurtle/redturtle.pasldap/issues
Keywords: Python Plone CMS
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: Plone
Classifier: Framework :: Plone :: Addon
Classifier: Framework :: Plone :: 6.0
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.GPL
License-File: LICENSE.md
Requires-Dist: setuptools
Requires-Dist: Products.CMFPlone
Requires-Dist: plone.api
Requires-Dist: collective.regenv
Requires-Dist: pas.plugins.ldap>=1.8.0
Requires-Dist: yafowil.plone>=5.0.0a1
Requires-Dist: yafowil.bootstrap>=2.0.0a1
Provides-Extra: test
Requires-Dist: zest.releaser[recommended]; extra == "test"
Requires-Dist: zestreleaser.towncrier; extra == "test"
Requires-Dist: plone.app.testing; extra == "test"
Requires-Dist: plone.restapi[test]; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-plone>=0.5.0; extra == "test"
Provides-Extra: release
Requires-Dist: zest.releaser[recommended]; extra == "release"
Requires-Dist: zestreleaser.towncrier; extra == "release"
Requires-Dist: zest.pocompile; extra == "release"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary


# redturtle.pasldap

This product is currently in development and highly experimental. 

Its goal is to improve the performance and resilience of pas.plugins.ldap. 

Some implementations may be debatable and have specific prerequisites and conditions. 

We strongly recommend reviewing the code and its implemented functionalities carefully 
before using this product.  — or not using it at all. :)

## Features

* [ ] Check the pas.plugins.ldap configuration for best practices, such as read/connection timeouts, 
memcached usage, handling many users, etc.
* [ ] Log LDAP queries to investigate long processing times and unnecessary operations (ensure 
passwords are not logged for security).
* [ ] Make LDAP operations resilient by persistently caching certain queries (opinionated suggestion).
* [ ] Intercept errors such as "Problems getting group_ids!" caused by misconfigurations.
* [ ] During testing I saw some call to enumerateUsers with `criteria:{'id': 'user@example.com*'} exact_match:False`, ... 
* [ ] ...

We need a profile installation here? (maybe not)

We need restapi here? (maybe not)


## pas.plugins.ldap hidden gems

```
LDAP_ERROR_LOG_TIMEOUT = float(
    os.environ.get("PAS_PLUGINS_LDAP_ERROR_LOG_TIMEOUT", 300.0)
)
LDAP_LONG_RUNNING_LOG_THRESHOLD = float(
    os.environ.get("PAS_PLUGINS_LDAP_LONG_RUNNING_LOG_THRESHOLD", 5.0)
)
```

## Installation

Install redturtle.pasldap with `pip`:

```shell
pip install redturtle.pasldap
```

And to create the Plone site:

```shell
make create_site
```

## Development

Local ldap server:

```
cd tests/docker-test-openldap
docker compose build
docker compose up
```

Verify that ldap is working:

```
LDAPTLS_REQCERT=never ldapsearch -H ldap://localhost:10389 -ZZ -x -b "ou=people,dc=planetexpress,dc=com" -D "cn=admin,dc=planetexpress,dc=com" -w GoodNewsEveryone "(objectClass=inetOrgPerson)"
```

```
make buil-dev

PLONE_REGISTRY_YAML=tests/docker-test-openldap/regenv.yaml LDAPTLS_REQCERT=never make start
```

## Contribute


- [Issue Tracker](https://github.com/RedTurtle/redturtle.pasldap/issues)
- [Source Code](https://github.com/RedTurtle/redturtle.pasldap/)

## License

The project is licensed under GPLv2.

## Credits and Acknowledgements 🙏

Crafted with care by **Generated using [Cookieplone (0.8.2)](https://github.com/plone/cookieplone) and [cookiecutter-plone (d9b5293)](https://github.com/plone/cookiecutter-plone/commit/d9b52933cbc6efd137e93e35a270214e307359f0) on 2025-01-15 23:35:38.896932**. A special thanks to all contributors and supporters!


# Contributors

- RedTurtle [mauro.amico@redturtle.it]


## 1.0.0a4 (2026-08-12)

No significant changes.


## 1.0.0a4 (unreleased)


- Nothing changed yet.


## 1.0.0a3 (2025-10-07)


- add "Anonymous User" to the reserved userids list @mamico
- False positives in local_groups check @mamico


## 1.0.0a2 (2025-01-27)


