Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
ldap-auth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shore
ldap-auth
Commits
703db441
Commit
703db441
authored
2 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Some pre-commit fixes.
parent
a694e56d
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2974
failed
2 years ago
Stage: .pre
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+2
-0
2 additions, 0 deletions
Dockerfile
README.md
+1
-1
1 addition, 1 deletion
README.md
app.py
+2
-0
2 additions, 0 deletions
app.py
with
5 additions
and
1 deletion
Dockerfile
+
2
−
0
View file @
703db441
...
@@ -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 ./
...
...
This diff is collapsed.
Click to expand it.
README.md
+
1
−
1
View file @
703db441
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
[

](https://git.shore.co.il/shore/ldap-auth/-/commits/master)
[

](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
...
...
This diff is collapsed.
Click to expand it.
app.py
+
2
−
0
View file @
703db441
...
@@ -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
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment