You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/06/28 13:24:41 UTC

[GitHub] [airflow] BasPH opened a new pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

BasPH opened a new pull request #8745:
URL: https://github.com/apache/airflow/pull/8745


   FAB supports authentication with LDAP, but running it with Python 3 gives an error: "Exception: No ldap library for python.". FAB does not install an LDAP library, the user of FAB has to install it himself. This PR installs `python-ldap` when installing Airflow with the `ldap` extra.
   
   This PR:
   
   1. Removes the ldap3 library which was used in the old auth_ldap module (removed in https://github.com/apache/airflow/commit/3a7b741ab9ed0937571c77a10b5d244f14eaf7db)
   2. Installs python-ldap (see [1](https://gitter.im/dpgaspar/Flask-AppBuilder?at=5cf4fc56cea8295279e53fce), [2](https://github.com/dpgaspar/Flask-AppBuilder/issues/200#issuecomment-128173774), [3](https://github.com/dpgaspar/Flask-AppBuilder/issues/806#issuecomment-421334361))
   
   Don't think we need to add tests here since it's more of a FAB thing than an Airflow thing.
   
   ---
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [x] Description above provides context of the change
   - [x] Unit tests coverage for changes (not needed for documentation changes)
   - [x] Target Github ISSUE in description if exists
   - [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [x] Relevant documentation is updated including usage instructions.
   - [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-704080992


   > Hello! I'm using stable helm chart (image: 1.10.12-python3.6) and when I tried to install python-ldap using extraPipPackage I got following:
   > 
   > unable to execute 'gcc': No such file or directory
   > error: command 'gcc' failed with exit status 1
   > 
   > Of course I can rebuild image and fix this error but maybe you also can fix it from your side?
   
   The production image has no "build essentials" in order to limit the size of it. It is highly optimized for size (following the best practices of container images). 
   
   If you need to add any extra that requires gcc or any other compiled extras you need to customize the image rather than extend it. In your case, this means that you have to rebuild the image with ADDITIONAL_EXTRAS build arg added. You can read more about it in https://github.com/apache/airflow/blob/master/IMAGES.rst#customizing-the-image and watch my talk explaining how the image is built and what's the difference between customising and extending the image here: https://s.apache.org/airflow-prod-image
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] stale[bot] commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-678690405


   This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pat-s commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
pat-s commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-711080959


   I built a new image using the following build-args
   
   ```
   docker build . \
     --build-arg ADDITIONAL_PYTHON_DEPS="python-ldap" \
     --build-arg ADDITIONAL_DEV_APT_DEPS="gcc python3-dev python2.7-dev libldap2-dev libsasl2-dev slapd ldap-utils tox lcov valgrind" 
   ```
   
   as suggested [here](https://www.python-ldap.org/en/python-ldap-3.3.0/installing.html#debian).
   This adds a substantial overhead to the image.
   Maybe this could be added to the docs to prevent people getting stuck in the first place.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] KIRY4 commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
KIRY4 commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-703981497


   Hello! I'm using stable helm chart (image: 1.10.12-python3.6) and when I tried to install python-ldap using extraPipPackage I got following:     
   --
   unable to execute 'gcc': No such file or directory
       error: command 'gcc' failed with exit status 1
   --
   Of course I can rebuild image and fix this error but maybe you also can fix it from your side?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] nathadfield commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
nathadfield commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-653489782


   This is definitely important given that the non FAB UI will ultimately be going away.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] KIRY4 edited a comment on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
KIRY4 edited a comment on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-703981497


   Hello! I'm using stable helm chart (image: 1.10.12-python3.6) and when I tried to install python-ldap using extraPipPackage I got following:     
   
   unable to execute 'gcc': No such file or directory
       error: command 'gcc' failed with exit status 1
   
   Of course I can rebuild image and fix this error but maybe you also can fix it from your side?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] flymg commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
flymg commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-650756874


   I would definitely vote to keep this open, a RBAC based security in combination with ldap is not working with ldap3 package.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] stale[bot] closed pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
stale[bot] closed pull request #8745:
URL: https://github.com/apache/airflow/pull/8745


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk edited a comment on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-711097101






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] pat-s commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
pat-s commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-713372915


   @potiuk Happy to help when I can.
   From my experience in the last weeks I suggest the following:
   
   - AFAIK LDAP does not work for > v1.10.x. However, it is still prominently advertised in the docs and it is a pain to find out that current stable versions do not support it by browsing issues. I suggest to add a info box stating this. This statement should also include that LDAP is again supported in v2.0.0
   - For the 2.0.0 docs, my suggestion would be to add a note that the docker image needs to be rebuild with the custom args I listed above. 
   
   Please correct me if anything of my observations are wrong. If you agree, I can issue a PR with a draft.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-650748223


   Is this change important to us?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] flymg edited a comment on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
flymg edited a comment on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-650756874


   @mik-laj I would definitely vote to keep this open, a RBAC based security in combination with ldap is not working with ldap3 package.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] stale[bot] commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-647055233


   This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-711096942


   > Maybe this could be added to the docs to prevent people getting stuck in the first place.
   
   Where do you think (and what more ) documentation do you this it is best to add ? For now In the master (and soon when we release 1.10.13 also there) we have this https://airflow.readthedocs.io/en/latest/production-deployment.html. 
   
   Do you think we need updates or corrections to that doc? Or maybe a reference somewhere? 
   
   Would you be so kind to add a PR describing it in the way that you'd look for? I found it super useful that people who have trouble finding the right docs are the best to add them in the very place needed and in the way that will be easiest to grasp. 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-711097101


   > This adds a substantial overhead to the image.
   
   BTW. Courious to hear more about the overhead? Fro the command you described, this is a good way to add it - seems like it should not add a lot to the final image


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #8745:
URL: https://github.com/apache/airflow/pull/8745#issuecomment-650777153


   @BasPH Can you do a rebase?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] stale[bot] closed pull request #8745: Install python-ldap library for FAB LDAP authorization with Python3

Posted by GitBox <gi...@apache.org>.
stale[bot] closed pull request #8745:
URL: https://github.com/apache/airflow/pull/8745


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org