Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to integrate Pulp with LDAP #1084

Merged
merged 1 commit into from
Sep 11, 2023
Merged

Conversation

git-hyagi
Copy link
Collaborator

This PR depends on pulp/pulp-oci-images#531. There is also a possible issue in the integration between Pulp and LDAPS/LDAP+TLS using django-auth-ldap.
While we don't find a solution, I could workaround the exceptions using:

FROM quay.io/pulp/pulp-minimal:3.32
RUN pip3 install django-auth-ldap==4.5.0
RUN sed -i '126i \            if options != None:' /usr/local/lib/python3.8/site-packages/django_auth_ldap/backend.py
RUN sed -i '127i \                options = {int(k):v for k,v in options.items()}' /usr/local/lib/python3.8/site-packages/django_auth_ldap/backend.py
RUN sed -i '859i \                optInt = int(opt)' /usr/local/lib/python3.8/site-packages/django_auth_ldap/backend.py
RUN sed -i '860s/opt, value/optInt, value/' /usr/local/lib/python3.8/site-packages/django_auth_ldap/backend.py

closes: #1042

Thank you for your contribution!

If your PR needs a changelog entry:

If not, please add [noissue] to your commit message

This PR depends on pulp/pulp-oci-images#531.
There is also a possible issue in the integration between Pulp and
LDAPS/LDAP+TLS using `django-auth-ldap`.
While we don't find a solution, I could workaround the exceptions using:
```
FROM quay.io/pulp/pulp-minimal:3.32
RUN pip3 install django-auth-ldap==4.5.0
RUN sed -i '126i \            if options != None:' /usr/local/lib/python3.8/site-packages/django_auth_ldap/backend.py
RUN sed -i '127i \                options = {int(k):v for k,v in options.items()}' /usr/local/lib/python3.8/site-packages/django_auth_ldap/backend.py
RUN sed -i '859i \                optInt = int(opt)' /usr/local/lib/python3.8/site-packages/django_auth_ldap/backend.py
RUN sed -i '860s/opt, value/optInt, value/' /usr/local/lib/python3.8/site-packages/django_auth_ldap/backend.py
```

closes: pulp#1042
@openshift-ci
Copy link

openshift-ci bot commented Sep 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: git-hyagi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@git-hyagi git-hyagi merged commit 9a492ea into pulp:main Sep 11, 2023
17 of 18 checks passed
@git-hyagi git-hyagi deleted the ldap-support branch September 11, 2023 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add LDAP support to pulp operator
1 participant