diff --git a/Dockerfile b/Dockerfile index 5eb5e2e45e79c7fa8e080e190d05346026b5ce64..bfb1c0e26399e765c75c1c02b01506f5af516b40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ RUN apt-get update && \ ; WORKDIR /wheels RUN python3 -m pip wheel https://github.com/python-ldap/python-ldap/releases/download/python-ldap-3.3.1/python-ldap-3.3.1.tar.gz +# hadolint ignore=DL3059 RUN python3 -m pip wheel git+https://github.com/adarnimrod/flask-simpleldap.git@ldapi-support#egg=flask-simpleldap FROM docker.io/library/python:3.10-slim-bullseye @@ -21,6 +22,7 @@ RUN apt-get update && \ && \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/* COPY --from=wheels /wheels/*.whl /wheels/ +# hadolint ignore=DL3042 RUN pip install /wheels/*.whl WORKDIR /app COPY requirements.txt ./ diff --git a/README.md b/README.md index 4361536615212c03295e9eff907b530f265a1255..32044caccac1cea92aca4ea23f2dcddb03d0a7f8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [](https://git.shore.co.il/shore/ldap-auth/-/commits/master) -LDAP authentication webserver to use with Nginx' auth\_request. See this [blog +LDAP authentication webserver to use with Nginx' auth_request. See this [blog post](https://www.shore.co.il/blog/ldap-auth/) for further explanation. ## Configuration diff --git a/app.py b/app.py index 965e807b7b4bdd8bca8cdc6d4aa787451be50530..5f93c0c71ba6b1376b63b6cedde276b8fc81f6e6 100644 --- a/app.py +++ b/app.py @@ -2,6 +2,7 @@ # pylint: disable=import-error import os + from flask import Flask from flask_simpleldap import LDAP @@ -44,6 +45,7 @@ def ping(): @app.route("/validate") @ldap.basic_auth_required def login(): + """Login to the app, requires LDAP authentication.""" return "OK"