freeiam 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ # CHANGELOG
2
+
3
+ <!-- version list -->
4
+
5
+ ## v0.1.0 (2025-08-03)
6
+
7
+ ### Documentation
8
+
9
+ - **ldap**: Add API docs and usage examples
10
+ ([`dfbcbe4`](https://github.com/Free-IAM/freeiam/commit/dfbcbe40fb8ba95828e9dd095e8b88c3dff4a82c))
11
+
12
+ ### Features
13
+
14
+ - **ldap**: Implement LDAP library
15
+ ([`9413a8b`](https://github.com/Free-IAM/freeiam/commit/9413a8b8b8c339d220449aa5a7a557a0f7060a02))
@@ -0,0 +1,133 @@
1
+ # Contributing
2
+
3
+ Thank you for your interest in contributing to FreeIAM!
4
+
5
+ We welcome contributions of all kinds — bug reports, feature ideas, code, documentation, and tests.
6
+
7
+ ---
8
+
9
+ ## Prerequisites
10
+
11
+ Before contributing, please make sure you have the following installed:
12
+
13
+ - Python ≥ 3.10
14
+ - [`uv`](https://github.com/astral-sh/uv) for environment management
15
+ - [`pre-commit`](https://pre-commit.com/)
16
+ - Git configured to use [Conventional Commits](https://www.conventionalcommits.org/)
17
+ - [`tox`](https://tox.readthedocs.io/)
18
+ - [`reuse`](https://reuse.software/)
19
+
20
+ ---
21
+
22
+ ## Setup
23
+
24
+ ```bash
25
+ # Clone the repository
26
+ git clone https://github.com/Free-IAM/freeiam.git
27
+ cd freeiam
28
+
29
+ # Set up the environment
30
+ uv venv
31
+ source .venv/bin/activate
32
+
33
+ # Install development dependencies
34
+ uv pip install -r requirements-dev.txt
35
+
36
+ # Set up pre-commit hooks
37
+ pre-commit install
38
+ pre-commit run --all-files
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Commit conventions
44
+
45
+ We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification:
46
+
47
+ ```
48
+ <type>(<scope>): <description>
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Pull Requests
54
+
55
+ - Apply principles of Clean Code.
56
+ - Include a clear description of _what_ you changed and _why_.
57
+ - Link any related issues.
58
+ - All pre-commit checks and tox test environments should pass.
59
+
60
+ ---
61
+
62
+ ## Style & Linting
63
+
64
+ We use [`ruff`](https://docs.astral.sh/ruff/) for linting and formatting.
65
+
66
+ It is automatically run via `pre-commit`. You can also run it manually:
67
+
68
+ ```bash
69
+ ruff check .
70
+ ruff format .
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Testing
76
+
77
+ We use `pytest`, managed via `tox`.
78
+
79
+ Run all tests:
80
+
81
+ ```bash
82
+ tox
83
+ ```
84
+
85
+ Run a specific environment (e.g. Python 3.11):
86
+
87
+ ```bash
88
+ tox -e py311
89
+ ```
90
+
91
+ Check coverage:
92
+
93
+ ```bash
94
+ pytest --cov
95
+ ```
96
+
97
+ ---
98
+
99
+ ## Documentation
100
+
101
+ Documentation is written in reStructuredText using Sphinx and hosted on Read the Docs.
102
+
103
+ To build the docs locally:
104
+
105
+ ```bash
106
+ tox -e docs
107
+ ```
108
+
109
+ The output will be available under `docs/_build/html/index.html`.
110
+
111
+ ---
112
+
113
+ ## Licensing
114
+
115
+ We use the [REUSE specification](https://reuse.software/) for license compliance.
116
+
117
+ To check compliance:
118
+
119
+ ```bash
120
+ reuse lint
121
+ ```
122
+
123
+ To add copyright/license:
124
+
125
+ ```bash
126
+ reuse annotate <filename>
127
+ ```
128
+
129
+ Make sure all contributions are REUSE-compliant before submission.
130
+
131
+ By submitting a pull request, you agree to license your contributions under the project's license.
132
+
133
+ ---
@@ -0,0 +1,73 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright [yyyy] [name of copyright owner]
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
@@ -0,0 +1,121 @@
1
+ Creative Commons Legal Code
2
+
3
+ CC0 1.0 Universal
4
+
5
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
+ HEREUNDER.
13
+
14
+ Statement of Purpose
15
+
16
+ The laws of most jurisdictions throughout the world automatically confer
17
+ exclusive Copyright and Related Rights (defined below) upon the creator
18
+ and subsequent owner(s) (each and all, an "owner") of an original work of
19
+ authorship and/or a database (each, a "Work").
20
+
21
+ Certain owners wish to permanently relinquish those rights to a Work for
22
+ the purpose of contributing to a commons of creative, cultural and
23
+ scientific works ("Commons") that the public can reliably and without fear
24
+ of later claims of infringement build upon, modify, incorporate in other
25
+ works, reuse and redistribute as freely as possible in any form whatsoever
26
+ and for any purposes, including without limitation commercial purposes.
27
+ These owners may contribute to the Commons to promote the ideal of a free
28
+ culture and the further production of creative, cultural and scientific
29
+ works, or to gain reputation or greater distribution for their Work in
30
+ part through the use and efforts of others.
31
+
32
+ For these and/or other purposes and motivations, and without any
33
+ expectation of additional consideration or compensation, the person
34
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
+ is an owner of Copyright and Related Rights in the Work, voluntarily
36
+ elects to apply CC0 to the Work and publicly distribute the Work under its
37
+ terms, with knowledge of his or her Copyright and Related Rights in the
38
+ Work and the meaning and intended legal effect of CC0 on those rights.
39
+
40
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
41
+ protected by copyright and related or neighboring rights ("Copyright and
42
+ Related Rights"). Copyright and Related Rights include, but are not
43
+ limited to, the following:
44
+
45
+ i. the right to reproduce, adapt, distribute, perform, display,
46
+ communicate, and translate a Work;
47
+ ii. moral rights retained by the original author(s) and/or performer(s);
48
+ iii. publicity and privacy rights pertaining to a person's image or
49
+ likeness depicted in a Work;
50
+ iv. rights protecting against unfair competition in regards to a Work,
51
+ subject to the limitations in paragraph 4(a), below;
52
+ v. rights protecting the extraction, dissemination, use and reuse of data
53
+ in a Work;
54
+ vi. database rights (such as those arising under Directive 96/9/EC of the
55
+ European Parliament and of the Council of 11 March 1996 on the legal
56
+ protection of databases, and under any national implementation
57
+ thereof, including any amended or successor version of such
58
+ directive); and
59
+ vii. other similar, equivalent or corresponding rights throughout the
60
+ world based on applicable law or treaty, and any national
61
+ implementations thereof.
62
+
63
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
64
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
65
+ irrevocably and unconditionally waives, abandons, and surrenders all of
66
+ Affirmer's Copyright and Related Rights and associated claims and causes
67
+ of action, whether now known or unknown (including existing as well as
68
+ future claims and causes of action), in the Work (i) in all territories
69
+ worldwide, (ii) for the maximum duration provided by applicable law or
70
+ treaty (including future time extensions), (iii) in any current or future
71
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
72
+ including without limitation commercial, advertising or promotional
73
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
+ member of the public at large and to the detriment of Affirmer's heirs and
75
+ successors, fully intending that such Waiver shall not be subject to
76
+ revocation, rescission, cancellation, termination, or any other legal or
77
+ equitable action to disrupt the quiet enjoyment of the Work by the public
78
+ as contemplated by Affirmer's express Statement of Purpose.
79
+
80
+ 3. Public License Fallback. Should any part of the Waiver for any reason
81
+ be judged legally invalid or ineffective under applicable law, then the
82
+ Waiver shall be preserved to the maximum extent permitted taking into
83
+ account Affirmer's express Statement of Purpose. In addition, to the
84
+ extent the Waiver is so judged Affirmer hereby grants to each affected
85
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
86
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
87
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
+ maximum duration provided by applicable law or treaty (including future
89
+ time extensions), (iii) in any current or future medium and for any number
90
+ of copies, and (iv) for any purpose whatsoever, including without
91
+ limitation commercial, advertising or promotional purposes (the
92
+ "License"). The License shall be deemed effective as of the date CC0 was
93
+ applied by Affirmer to the Work. Should any part of the License for any
94
+ reason be judged legally invalid or ineffective under applicable law, such
95
+ partial invalidity or ineffectiveness shall not invalidate the remainder
96
+ of the License, and in such case Affirmer hereby affirms that he or she
97
+ will not (i) exercise any of his or her remaining Copyright and Related
98
+ Rights in the Work or (ii) assert any associated claims and causes of
99
+ action with respect to the Work, in either case contrary to Affirmer's
100
+ express Statement of Purpose.
101
+
102
+ 4. Limitations and Disclaimers.
103
+
104
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
+ surrendered, licensed or otherwise affected by this document.
106
+ b. Affirmer offers the Work as-is and makes no representations or
107
+ warranties of any kind concerning the Work, express, implied,
108
+ statutory or otherwise, including without limitation warranties of
109
+ title, merchantability, fitness for a particular purpose, non
110
+ infringement, or the absence of latent or other defects, accuracy, or
111
+ the present or absence of errors, whether or not discoverable, all to
112
+ the greatest extent permissible under applicable law.
113
+ c. Affirmer disclaims responsibility for clearing rights of other persons
114
+ that may apply to the Work or any use thereof, including without
115
+ limitation any person's Copyright and Related Rights in the Work.
116
+ Further, Affirmer disclaims responsibility for obtaining any necessary
117
+ consents, permissions or other rights required for any use of the
118
+ Work.
119
+ d. Affirmer understands and acknowledges that Creative Commons is not a
120
+ party to this document and has no duty or obligation with respect to
121
+ this CC0 or use of the Work.
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) <year> <copyright holders>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,16 @@
1
+ # SPDX-FileCopyrightText: 2025 Florian Best
2
+ # SPDX-License-Identifier: CC0-1.0
3
+
4
+ exclude create_sync.sh
5
+ exclude .gitignore
6
+ exclude Makefile
7
+ exclude .pre-commit-config.yaml
8
+ exclude pytest_benchmark.ini
9
+ exclude pytest.ini
10
+ exclude .readthedocs.yml
11
+ exclude tox.ini
12
+ recursive-exclude benchmarks *
13
+ recursive-exclude docs *
14
+ recursive-exclude .github *
15
+ recursive-exclude .reuse *
16
+ recursive-exclude tests *
freeiam-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,218 @@
1
+ Metadata-Version: 2.4
2
+ Name: freeiam
3
+ Version: 0.1.0
4
+ Summary: FreeIAM is a free and flexible Identity and Access Management solution.
5
+ Author-email: Florian Best <contact@freeiam.org>
6
+ Project-URL: homepage, https://freeiam.org
7
+ Project-URL: documentation, https://docs.freeiam.org
8
+ Project-URL: repository, https://github.com/Free-IAM/freeiam
9
+ Project-URL: changelog, https://github.com/Free-IAM/freeiam/blob/main/CHANGELOG.md
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: python-ldap
13
+ Provides-Extra: dev
14
+ Requires-Dist: build; extra == "dev"
15
+ Requires-Dist: cryptography; extra == "dev"
16
+ Requires-Dist: pytest; extra == "dev"
17
+ Requires-Dist: pytest-asyncio; extra == "dev"
18
+ Requires-Dist: pytest-benchmark; extra == "dev"
19
+ Requires-Dist: pytest-cov; extra == "dev"
20
+ Requires-Dist: pytest-timeout; extra == "dev"
21
+ Requires-Dist: tox; extra == "dev"
22
+ Requires-Dist: testcontainers[docker]; extra == "dev"
23
+ Requires-Dist: python-semantic-release; extra == "dev"
24
+ Provides-Extra: test
25
+ Requires-Dist: cryptography; extra == "test"
26
+ Requires-Dist: pytest; extra == "test"
27
+ Requires-Dist: pytest-asyncio; extra == "test"
28
+ Requires-Dist: pytest-benchmark; extra == "test"
29
+ Requires-Dist: pytest-cov; extra == "test"
30
+ Requires-Dist: pytest-timeout; extra == "test"
31
+ Requires-Dist: testcontainers[docker]; extra == "test"
32
+ Provides-Extra: docs
33
+ Requires-Dist: sphinx; extra == "docs"
34
+ Requires-Dist: furo; extra == "docs"
35
+ Provides-Extra: benchmark
36
+ Requires-Dist: ldap3; extra == "benchmark"
37
+ Requires-Dist: bonsai; extra == "benchmark"
38
+
39
+ [![CI](https://github.com/Free-IAM/freeiam/actions/workflows/ci.yml/badge.svg)](https://github.com/Free-IAM/freeiam/actions/workflows/ci.yml)
40
+ [![pre-commit](https://github.com/Free-IAM/freeiam/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/Free-IAM/freeiam/actions/workflows/pre-commit.yml)
41
+ [![Coverage](https://img.shields.io/codecov/c/github/Free-IAM/freeiam.svg)](https://codecov.io/gh/Free-IAM/freeiam)
42
+
43
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/release/python-3110/)
44
+ [![Docs](https://readthedocs.org/projects/free-iam/badge/?version=latest)](https://docs.freeiam.org/en/latest/)
45
+ [![Ruff](https://img.shields.io/badge/linter-ruff-blue)](https://docs.astral.sh/ruff/)
46
+
47
+ [![PyPI](https://img.shields.io/pypi/v/freeiam)](https://pypi.org/project/freeiam/)
48
+ [![Issues](https://img.shields.io/github/issues/Free-IAM/freeiam.svg)](https://github.com/Free-IAM/freeiam/issues)
49
+ [![Security Policy](https://img.shields.io/badge/security-policy-green)](https://github.com/Free-IAM/freeiam/security/policy)
50
+ [![REUSE status](https://api.reuse.software/badge/github.com/Free-IAM/freeiam)](https://api.reuse.software/info/github.com/Free-IAM/freeiam)
51
+
52
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
53
+ [![License: Apache 2](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
54
+
55
+ # Free IAM - Free Identity and Access Management.
56
+
57
+ **Free IAM** is a flexible and open identity and access management system designed for interoperability, extensibility, and simplicity.
58
+ It provides clean APIs, powerful abstractions, and deep integration with common identity schemata and directory services.
59
+
60
+ ## LDAP Client Library
61
+
62
+ FreeIAM offers both a asynchronous and synchronous LDAP client library for Python via `freeiam.ldap`, supporting the full range of client features.
63
+ For usage examples and detailed API documentation, please refer to the [official documentation](https://docs.freeiam.org/).
64
+
65
+ ```python
66
+ import asyncio
67
+
68
+ from freeiam import ldap
69
+
70
+
71
+ async def main():
72
+ async with ldap.Connection('ldap://localhost:389', timeout=30) as conn:
73
+ # TLS
74
+ conn.set_tls(ca_certfile='/path/to/ca.crt', require_cert=TLSOptionValue.Hard)
75
+ await conn.start_tls()
76
+
77
+ # authenticate
78
+ await conn.bind('cn=admin,dc=freeiam,dc=org', 'iamfree')
79
+
80
+ # search for DN and attrs
81
+ for entry in await conn.search(search_base, Scope.Subtree, '(&(uid=*)(objectClass=person))'):
82
+ print(entry.dn, entry.attr)
83
+
84
+ # search iterative for DN and attrs
85
+ async for entry in conn.search_iter(search_base, Scope.Subtree, '(&(uid=*)(objectClass=person))'):
86
+ print(entry.dn, entry.attr)
87
+
88
+ # search for DN
89
+ async for entry in conn.search_dn(search_base, Scope.Subtree, '(&(uid=*)(objectClass=person))'):
90
+ print(entry.dn)
91
+
92
+ # search paginated
93
+ async for entry in conn.search_paginated(
94
+ search_base,
95
+ Scope.Subtree,
96
+ '(&(uid=*)(objectClass=person))',
97
+ page_size=10,
98
+ ):
99
+ print(entry.dn, entry.attr)
100
+
101
+ # get a certain object, and use its attributes
102
+ obj = await conn.get('uid=max.mustermann,dc=freeiam,dc=org')
103
+ print(obj.dn, obj.attr)
104
+ print(obj.attr['cn'])
105
+
106
+ # get a attribute of an object
107
+ cn = await conn.get_attr('uid=max.mustermann,dc=freeiam,dc=org', 'commonName')
108
+ print(cn)
109
+
110
+
111
+ asyncio.run(main())
112
+ ```
113
+
114
+ The same API exists synchronously:
115
+ ```python
116
+ from freeiam import ldap
117
+
118
+
119
+ with ldap.Connection('ldap://localhost:389', timeout=30) as conn:
120
+ # TLS
121
+ conn.set_tls(ca_certfile='/path/to/ca.crt', require_cert=TLSOptionValue.Hard)
122
+ conn.start_tls()
123
+
124
+ # authenticate
125
+ conn.bind('cn=admin,dc=freeiam,dc=org', 'iamfree')
126
+
127
+ # search for DN and attrs
128
+ for entry in conn.search(search_base, Scope.Subtree, '(&(uid=*)(objectClass=person))'):
129
+ print(entry.dn, entry.attr)
130
+ ```
131
+
132
+ ## Documentation
133
+
134
+ Comprehensive documentation is available to help you get started quickly and to explore advanced features.
135
+ It includes usage guides, API references, and example code snippets.
136
+
137
+ Visit the official documentation site here: [https://docs.freeiam.org/](https://docs.freeiam.org/)
138
+
139
+ ## Changelog
140
+
141
+ This project follows [Semantic Versioning](https://semver.org/) to manage releases.
142
+
143
+ A detailed, human-readable changelog is maintained and can be found here: [CHANGELOG.md](CHANGELOG.md).
144
+
145
+ ## Contributing
146
+
147
+ Contributions are very welcome!
148
+
149
+ Please read our [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to get started, coding standards, and the pull request process.
150
+ If you want to report bugs, request features, or discuss improvements, please open an issue on GitHub.
151
+
152
+ ## License
153
+
154
+ This project is dual-licensed under the following licenses, giving fully flexibility:
155
+
156
+ - [MIT License](LICENSES/MIT.txt) ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
157
+ - [Apache License 2.0](LICENSES/Apache-2.0.txt) ![License: Apache 2](https://img.shields.io/badge/license-Apache%202.0-blue.svg)
158
+
159
+ See the LICENSES files for more details.
160
+
161
+ ## Test Coverage
162
+
163
+ The project currently maintains 100% test coverage, ensuring that all code paths are exercised by automated tests.
164
+ This helps guarantee reliability, correctness, and ease of future maintenance.
165
+
166
+ ## LDAP client benchmarks
167
+ Current benchmarks indicate that the synchronous non-iterable methods offer the best performance.
168
+ The benchmark suite compares FreeIAM (`freeiam.ldap`) against Python-LDAP (`ldap`), LDAP3 (`ldap3`), and Bonsai (`bonsai`).
169
+
170
+ Please note this is a work in progress (WIP) and the benchmark coverage and accuracy will be improved over time.
171
+
172
+ | Testname | Min (us) | Max (us) | Mean (us) | StdDev (us) | Median (us) | IQR (us) | Outliers | OPS | Rounds | Iterations |
173
+ |-----------------------------------|-----------|------------|-----------|-------------|-------------|----------|----------|----------|--------|------------|
174
+ | test_sync_search[ldap-noiter] | 336.42 | 1762.35 | 466.35 | 132.87 | 428.97 | 103.48 | 120;76 | 2144.33 | 1418 | 1 |
175
+ | test_sync_search[freeiam-noiter] | 381.79 | 1425.61 | 572.07 | 118.68 | 545.87 | 109.69 | 165;51 | 1748.04 | 1143 | 1 |
176
+ | test_sync_search[bonsai-noiter] | 446.28 | 1514.67 | 680.02 | 138.66 | 645.65 | 111.18 | 113;55 | 1470.55 | 861 | 1 |
177
+ | test_sync_search[freeiam-iter] | 692.62 | 2134.28 | 958.01 | 186.67 | 913.93 | 169.14 | 72;29 | 1043.83 | 488 | 1 |
178
+ | test_sync_search[ldap3-noiter] | 1181.49 | 3948.65 | 1603.93 | 333.01 | 1518.64 | 253.67 | 71;43 | 623.47 | 482 | 1 |
179
+ | test_async_search[freeiam-noiter] | 1577.63 | 6493.86 | 2659.18 | 634.62 | 2430.03 | 676.09 | 58;22 | 376.06 | 328 | 1 |
180
+ | test_async_search[freeiam-iter] | 2768.34 | 5792.08 | 3479.36 | 598.57 | 3279.16 | 579.05 | 34;11 | 287.41 | 169 | 1 |
181
+ | test_parallel_sync_search[freeiam] | 12317.69 | 46028.09 | 14145.28 | 4472.71 | 13232.57 | 972.18 | 1;4 | 70.70 | 55 | 1 |
182
+ | test_multiple_parallel_sync_search[freeiam] | 33453.03 | 39019.64 | 35980.09 | 1332.03 | 36083.70 | 1862.24 | 10;0 | 27.79 | 28 | 1 |
183
+
184
+ ## Project Goals
185
+ - Clean and extensible APIs and libraries
186
+ - Standards-first: implements what standards allow - no artificial limitations
187
+ - Identity and access management based on standardized object types:
188
+ - Users
189
+ - Groups
190
+ - Containers
191
+ - Organizational Units (OUs)
192
+ - etc.
193
+ - Authorizations
194
+ - Roles
195
+ - Full support for widely used directory schemata:
196
+ - POSIX
197
+ - Kerberos
198
+ - Samba
199
+ - FreeIPA
200
+ - Univention Corporate Server (UCS)
201
+ - Flexible composition of object classes (define your own object model)
202
+ - Compatibility with major LDAP servers:
203
+ - OpenLDAP
204
+ - 389 Directory Server
205
+ - Samba
206
+ - Microsoft Active Directory
207
+ - Data migration and synchronization connectors for diverse LDAP schemas
208
+ - Fully asynchronous, non-blocking I/O architecture
209
+ - HTTP API
210
+ - OAuth 2.0 SASL OAUTHBEARER bind support
211
+ - Integrated SCIM representation for modern interoperability
212
+ - Modular and configurable web UI:
213
+ - Configurable layouts: e.g. simple, advanced, wizard-based, profile views
214
+ - Customizable data representations and mappings
215
+ - Unified abstractions for common directory operations
216
+ - User-friendly and modern terminology
217
+ - Dynamic configuration via LDAP entries or static YAML files
218
+ - Maybe: Built-in event system for tracking object changes and triggers