Commit 703db441 authored by nimrod's avatar nimrod
Browse files

Some pre-commit fixes.

parent a694e56d
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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 ./
+1 −1
Original line number Diff line number Diff line
@@ -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)

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
+2 −0
Original line number Diff line number Diff line
@@ -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"