Skip to content
Snippets Groups Projects
Commit 703db441 authored by nimrod's avatar nimrod
Browse files

Some pre-commit fixes.

parent a694e56d
Branches
No related tags found
No related merge requests found
Pipeline #2974 failed
...@@ -9,6 +9,7 @@ RUN apt-get update && \ ...@@ -9,6 +9,7 @@ RUN apt-get update && \
; ;
WORKDIR /wheels 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 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 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 FROM docker.io/library/python:3.10-slim-bullseye
...@@ -21,6 +22,7 @@ RUN apt-get update && \ ...@@ -21,6 +22,7 @@ RUN apt-get update && \
&& \ && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/* rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/*
COPY --from=wheels /wheels/*.whl /wheels/ COPY --from=wheels /wheels/*.whl /wheels/
# hadolint ignore=DL3042
RUN pip install /wheels/*.whl RUN pip install /wheels/*.whl
WORKDIR /app WORKDIR /app
COPY requirements.txt ./ COPY requirements.txt ./
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[![pipeline status](https://git.shore.co.il/shore/ldap-auth/badges/master/pipeline.svg)](https://git.shore.co.il/shore/ldap-auth/-/commits/master) [![pipeline status](https://git.shore.co.il/shore/ldap-auth/badges/master/pipeline.svg)](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. post](https://www.shore.co.il/blog/ldap-auth/) for further explanation.
## Configuration ## Configuration
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# pylint: disable=import-error # pylint: disable=import-error
import os import os
from flask import Flask from flask import Flask
from flask_simpleldap import LDAP from flask_simpleldap import LDAP
...@@ -44,6 +45,7 @@ def ping(): ...@@ -44,6 +45,7 @@ def ping():
@app.route("/validate") @app.route("/validate")
@ldap.basic_auth_required @ldap.basic_auth_required
def login(): def login():
"""Login to the app, requires LDAP authentication."""
return "OK" return "OK"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment